Pages: [1]   Go Down
Author Topic: FAT file name restrictions?  (Read 2427 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Been working with the Arduino for simple things for some time now, this is my first real project with storage and multiple peripheral devices. Long story short, I'm trying to read MP3s off a microSD card using the Sparkfun MP3 shield. Using the library provided by Bill Porter (http://www.billporter.info/sparkfun-mp3-shield-arduino-library/) I'm able to get a track playing as long as:
1) the file name follows the 8.3 format (8-character file name, 3-character file extension) and
2) it is in the root directory

Is there a way to read file names that have an n.3 format and aren't in the root directory? It seems to me that this is a restriction with the FAT library included in the example sketch but I don't know enough to say precisely. Any help would be greatly appreciated in this effort... I've been reading quite a bit and it seems that there may be other libraries that can navigate nested folders but they aren't available for download anymore.  smiley-sad

[EDIT]
After some more digging, I've found the SD library included with the Arduino install package has the capability to navigate nested folders but is still restricted to the 8.3 naming format. Is there any way around that??
« Last Edit: May 08, 2012, 11:04:18 am by scoobydrvr » Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1604
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

SdFat and the arduino SD library which is a wrapper for SdFat are restricted to 8.3 names.

I am the author of SdFat and decided not to support long filenames since substantial memory is required for long file names.

Very few people have requested long file names so I have not added this feature.

Here is the Long Filename Specification http://www.osdever.net/documents/LongFileName.pdf.  It is not straight forward since multiple 8.3 directory entries are used.

I am writing an ARM version of SdFat that will support long filenames and may make long filenames an option for avr arduinos.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the reply!It looks like I'm pretty much stuck with the 8.3 file names then.

Forgive my ignorance as I'm still new to working with these file systems (and don't have a way to test until later this evening) but what would displayed if a long file name were to be read by the SD lib? Does it just truncate the name at 8 characters of is it illegible?
Logged

0
Offline Offline
Edison Member
*
Karma: 63
Posts: 1604
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Open fails unless its argument is a valid 8.3 filename.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Forgive my ignorance as I'm still new to working with these file systems (and don't have a way to test until later this evening) but what would displayed if a long file name were to be read by the SD lib? Does it just truncate the name at 8 characters of is it illegible?

You can only open a long filename file if you use the short filename equivalent. Use DIR /X in a Command Prompt to find out what it is. e.g. fur_elise.mp3 would be something like FUR_EL~1.MP3.


Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1867
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi fat16lib,

THANKS! for your great work with SdFAT!  I have it worked well with several cards as documented here: http://arduino-info.wikispaces.com/SD-Cards

BUT, a 1Gb card formatted FAT16 that works fine with SdFAT QuickStart and TinyFAT, fails to ever initialize with fat16lib.   What might be happening here? Could it be SPI speed?

Any suggestions appreciated!  Any critique/suggestions of the Wiki page would be appreciated.
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We will be releasing a Long File Name version of SDFat shortly.
For File/Directory reading,writing,removing.  It has been working great here in our test labs.

Glenn Kreisel
glennkreisel@yahoo.com
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 828
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am writing an ARM version of SdFat that will support long filenames and may make long filenames an option for avr arduinos.

Has this come to fruition? An LFN version would be convenient for many applications, especially for the ARM processors where ram is potentially much less of an issue. I'd like to implement an mp3 player using a teensy3.0 where the user could navigate the files for playing etc. using the LFNs, for example.
Logged

WiFi shields/Yun too expensive? Embeddedcoolness.com is now selling the RFXduino nRF24L01+ <-> TCP/IP Linux gateway: Simpler, more affordable, and even more powerful wireless Internet connectivity for *all* your Arduino projects! (nRF24L01+ shield and dev board kits available too.)

Pages: [1]   Go Up
Jump to: