Trouble detecting files

8 posts / 0 new
Last post
pt2091
pt2091's picture
Trouble detecting files

Hi,

So I am trying to get the GUI examples for the alarm clock demo and helibot's other demo, but the files keep on dissapearing from view when I try to list them from the serial console. Sometimes it works though. 

Not sure why this is happening, when I plug the sd card back into my linux machine i can see the files. For instance, the alarm clock demo directs me to put the clk folder into my root SD card directory, and it doesn't show up when I ls it through the serial console

I also tried to modify the list GUI helibot made (through the config.ini file), but it would only show up on rs media when it was the exact file from the demo???

I'm using teraterm for the serial console, and my rs media is v1.

 

Basically, is there a reason why rs media won't detect certain files?  

thank you thank you thank you

Vader
Vader's picture

Are the contents of /mnt/sd showing up at all? From memory, there are some directories that ls won't work from unless you cd to that dir first (I think /tmp is one of them).

The other thing to check would be whether the SD (/dev/mmc) is actually being mounted as /mnt/sd. If RS Media doesn't detect an SD card, it will mount /dev/nand3 (The internal memory) as /mnt/sd instead. You can check this by using the mount command at the shell.

Make sure you SD card isn't larger than 1 GB.

pt2091
pt2091's picture

Sorry duplicate message

pt2091
pt2091's picture

Hi vader,

I just realized on startup the console outputs the following:

umount: /mnt/sd: Invalid argument

FAT: bogus logical sector size 56797

VFS: Can't find a valid FAT filesystem on dev 56:00.

mount: Mounting /dev/mmc on /mnt/sd failed: Invalid argument

SD card not exists!

 

Additionally this is what happens when I manually try to mount the dev/mmc to a tmp/sd directory:

# mount dev/mmc/ tmp/sd

Timeout DMA!!

end_request: I/O error, dev 56:00 (mmc), sector 2

EXT2-fs: unable to read superblock

cramfs: wrong magic

FAT: bogus logical sector size 56797

VFS: Can't find a valid FAT filesystem on dev 56:00.

UMSDOS: msdos_read_super failed, mount aborted.

FAT: bogus logical sector size 56797

VFS: Can't find a valid FAT filesystem on dev 56:00.

FAT: bogus logical sector size 56797

VFS:Can't find a valid FAT filesystem on dev

56:00.mount: Mounting /dev/mmc on /tmp/sd failed: Invalid argument

 

Not sure what this means, the filesystem on my sd card is FAT16 (and 1gb) when I look at it in disk utility of Ubuntu.

Vader
Vader's picture

mount dev/mmc/ tmp/sd should be:

mount /dev/mmc /mnt/sd -o ro,remount

Since /dev/nand3 is already mounted as /mnt/sd. You were also missing the / on /dev and /mnt.

Have you tried another SD? The fact that it works sometimes could be due to a problem with the SD or RS Media itself.

pt2091
pt2091's picture

Yep I think it's a problem with the SD card itself. I had a fresh one sitting around and it worked successfully, though after a few edits and insertions I was brought to the same error.

I reformatted the card to FAT16, copied the files, and it worked again! By the way,the card wasn't listing in rs media, but it was listing on my linux machine.

I used umount /dev/nand3 before I did mount, and it gave me errors, would that have been wrong?

Thanks for helping diagnose this Vader!

Helibot
Helibot's picture

Hi pt2091,
Its GREAT to hear your are trying some of the programs I have done :-)

I sometimes have problems where SDCards get corrupted and some files or some directories cant be read anymore. I find it can be minimised by doing the following:
1) Don't pull the SDcard out of RSMedia while he is running.
2) Don't pull the SDCard out of a PC Sdcard reader without making it safe (ie 'ejecting'it in linux or doing "Safely Remove Hardware" in Windows).
3) If you are writing to the SD card from the robot make sure to use the linux 'sync' before powering down/reseting the robot.

Cheers
Helibot

Helibot
Helibot's picture

Sorry - Please ignore this post - had to delete a double post