when I try to upload a sketch to the Yun which has a www folder I get the error:
'Problem accessing board folder /www/sd'
The sketch loads without problems. This is what I tried so far:
The SD card is formatted as FAT32. This is what mount spits out:
/dev/sda1 on /mnt/sda1 type vfat (rw,sync,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
I have created /mnt/sda1/arduino/www/
root@YuFly:/mnt/sda1/arduino/www# pwd
/mnt/sda1/arduino/www
Permissions look like this:
root@YuFly:/mnt/sda1# ls -la
drwxr-xr-x 3 root root 32768 Feb 15 16:45 .
drwxr-xr-x 1 root root 0 Feb 15 16:07 ..
drwxr-xr-x 3 root root 32768 Feb 15 16:46 arduino
What is a bit strange is that I can not change permissions but since everything runs as root anyway this should not be a problem.
When I upload a sketch per Wifi no problem. If I add the www/ folder in the project directory I get the error: problem accessing board folder /www/sd
Arduino version 1.5.5, OSX 10.9.1
Thanks for your help!
Solution:
A bit strange but it works now: '/mnt/sda1' is linked to '/mnt/sd'. After creating a folder 'www' in 'sd' it works. But the files still end up in /mnt/sd/arduino/www// and not in /mnt/sd/www/
I just created a folder 'arduino/www' starting from the root file system for a USB drive and plugged it into the Yun, and it works exactly like uploading to an SD card when programming over WiFI
poesel:
Solution:
A bit strange but it works now: '/mnt/sda1' is linked to '/mnt/sd'. After creating a folder 'www' in 'sd' it works. But the files still end up in /mnt/sd/arduino/www// and not in /mnt/sd/www/
That's exactly the expected behaviour. This way you can access your sketch files with a url like http:///sd/
My advice after messing about with SD cards that will not write files is to Reset the Yun, i.e. press the reset button by the row of LEDs.
I have recently started using the Yun, and tried to benchmark the writing speed of different SD cards. Being spoiled with Arduino resetting itself after uploading sketches, and generally being able to switch Sd cards on the go, I switched SD cards without resetting, and as a result could not write files. I guess the more competent Linux users would mount/umount the drives, but resetting works OK for me!
Actually, umounting is not necessary if you haven't tuned the linux machine too much. Every access to the SD card is synchronized: if at instant 0 you have written a byte and at instant 1 you remove the SD card and plug it into your pc, you'll see that byte. The yun should take half a second to understand that the SD card is no more there and do the cleanup
Well, at least I managed to mess it up. I was trying different SD cards of different brands and sizes to figure out if there were any differences in write speed between Class 4 and Class 10 cards when using the bridge (there were none), and perhaps it was the different cards that caused the problem. Anyway, rebooting Linino helped on that occasion.