Tried all of the above - nothing works. N2+ 4.3 and 4.2.2.
Same here, this is very frustrating. Especially since i just spent $70 on N+2 not even 40min ago.
Common guys.

  | ||||||||||||||
36 replies to this topic
#21Posted 13 July 2013 - 07:43 PM
Same here, this is very frustrating. Especially since i just spent $70 on N+2 not even 40min ago.
Common guys. #22Posted 22 July 2013 - 05:34 PM I ran into the same problem and here is how I fixed it on my Netduino Plus 2 (v4.2.2.2)
I was writing an SDTest.txt dummy file to a 2GB micro SD as the first thing in my Main(), and it didn't work - then after the board had been in active for a while the file was there - even after reset. So I start the program with Thread.Sleep(10000); and now it just Works - files are created with content, deleted etc instantly. I suspect the SD interface takes a while to fully initialize in debug mode.
I can fully recreate the original bug. It's quite persistent on this hardware.
Hope this helps. #23Posted 26 August 2013 - 03:49 AM I experience the same problem on firmware 4.2.2.2 N2P While the software is running, i can access the files and contents i have written before. The moment i turn off the netduino, everything is gone. In some cases, some or all files stay on the sd card. ( but i have no idea why.. same code, 1 out of 20 times ) Different to others, it doesn't matter if i am in debug mode or in release mode. Everything works fine on firmware 4.2.1.1 !! ( but i can't use it because of the streamreader.readline peak overflow-bug ) And its't not working on 4.2.2.2 and 4.3 beta1. I have three Netduino 2 plus here. one of them with 4.2.1.1. two with 4.2.2.2. The same code works on 4.2.1.1 and won't write a file to 4.2.2.2 (I am using vb.net ) I really would need a fix for that ( or at least an explanation, workaround etc ). Regards, Alex #24Posted 26 September 2013 - 05:00 AM I have encountered the exact same problem. Secret Labs should address this non-trivial issue. #25Posted 26 September 2013 - 05:09 AM Me too #26Posted 26 September 2013 - 07:40 AM I also tried all of the above on my N2+ 4.2.2, and none of them worked. Putting it in release mode did not work either.
#27Posted 12 November 2013 - 04:37 AM So I am new the NetDuino and just purchased a N+2 and was told after my first post (where I was having trouble getting started) to search the forums for solutions and read the MS MF help files.
This tread, among many other on this forum, proves that SL is very lacking in support for their new products. I wonder if if is because they are deep into development to production of the Agent Watch, which looks very cool BTW. However, prototype boards like the NetDuino (and Arduino), in my opinion, are to allow us developers/engineers to build/create solutions/products, not go deep driving into framework source code to figure out why it does work. As much as I would rather do my work in C# and VS, my may have to return to C/C++ with Arduino to continue working on my modbus project and get my $70 back for the N+2.
So back to the topic... I tried all the suggestions above and I cannot get a file to actually be saved on the N+2 either. Frustrated. #28Posted 12 November 2013 - 07:04 AM Hi everyone
Does this help as a workaround?
[font="consolas;"][color=#0000FF;]new[/color][/font] Microsoft.SPOT.IO.[font="consolas;"][color=rgb(43,145,175);]VolumeInfo[/color][/font][font="consolas;"][color=#000000;]([/color][/font][font="consolas;"][color=rgb(163,21,21);]"SD"[/color][/font][font="consolas;"][color=#000000;]).FlushAll();[/color][/font]
Best regards
Cuno #29Posted 12 November 2013 - 04:10 PM Hello all. I am seeing the same issues. I originally thought it was a bug in the FTP server I am running as I have changed several things in the server as I have found a few issues, but the SD issue seems a bit deeper.
One observation I have found is after receiving a file via FTP (the server creates a file on the SD, writes the bytes received to the file, flushes, closes etc). I check the SD card with a FTP client and the file "exists" to the FTP client. I assume at this point the file is in RAM and not yet committed to the card. If I power off the Netduino (+2) and reapply power the file is gone. I have checked the card with power off as well as via the FTP server after it comes back online and in either case the file is MIA.
The curious part is, if I repeat the test above, but wait a few minutes before dropping power to the Netduino, the file will actually be written to the SD card. I assume there is some delay or time period that the Netduino firmware waits to commit data in RAM to the SD to prevent excess writing to the card, but the time is much too long IMO.
Cheers! #30Posted 12 November 2013 - 09:08 PM
Yes, we have seen the same effect on our Mountaineer boards. Either it is an explicit delay for the reason you mentioned, or it is a bug (e.g. the flush may later be triggered by the finalization phase of a garbage collection run).
Anyway, the workaround in my previous post seems to work for Mountaineer boards. As the problem is probably in the porting kit and not Netduino-specific, it should also work on Netduinos. I have posted an issue here: http://netmf.codeple...m/workitem/2149
Cuno
#31Posted 13 November 2013 - 12:26 AM Cuno,
Thanks so much. That works like a champ. I added that into the FTP server after any file operation and it works great.
I really appreciate your quick work around. Hopefully the Netduino folks will get a built in fix for the issue in the future but it's great to have a quick workaround for my product.
Thanks again! #32Posted 23 January 2014 - 08:25 PM
This worked for me. Using a Netduino plus 2 firmware v4.2.2.2
#33Posted 29 January 2014 - 02:50 AM Does anyone know if this problem has been resolved? I have worked through a ton of examples and honestly it seems hit or miss on weather the file is visible.
Nelson #35Posted 27 May 2014 - 07:24 PM it's an essential problem. I just wonder to buy N+2, but after read this thread.... I think twice, maybe it's ok to keep develop my project using N+ #36Posted 28 May 2014 - 03:07 AM
It works fine if you flush afterwards, eg: public void writeToFile(string data) { using (FileStream filestream = new FileStream(filename, FileMode.Append)) { using (StreamWriter write = new StreamWriter(filestream)) { write.WriteLine(DateTime.Now + "," + data); } } VolumeInfo.GetVolumes()[0].FlushAll(); // Force write to sd card } In any case, even if you do not flush, the card will be written to eventually. I believe the data is buffered in memory and then written to when it reaches a certain level. I think this is to avoid too many short read/write operations to the SD Card which will probably impact on performance.
#37Posted 19 June 2014 - 04:58 PM 600mL... you made my day! Thank you very much for this precious line of code:
VolumeInfo.GetVolumes()[0].FlushAll();
I really was about to throw my N+2 out of the window... but now it gets a second chance After having a lot of trouble with the GPS module, SD card was the next big problem. But that looks good now as well. Let´s see what comes next
Daniel
0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||