Current Lua downloadable firmware will be posted here

User avatar
By thePiGrepper
#70481 I'm using the nodeMCU environment to write some lua script for the ESP8266. It uses the FATfs module to create several files, like:
LOG_xxxxyymmdd_hhmmss.txt where: xxxx: #file(incremental), and the rest is a timestamp.

I was running a test: creating one file,filling it with small amount of data(~200bytes), closing it, and repeating this for X time. After the first hour had passed, the files stopped being created. here is the list of files created successfully:
https://pastebin.com/0xn3MBQt , and here are some filenames it couldnt create after those files were created: LOG_0193000101_005909.txt
LOG_0194000101_005908.txt
LOG_0000000000_000000.txt
LOG.txt

I'm really troubled by this. Is there some kind of filename size limit so that when searching for files during open(), it returns error because of ambiguity or something like that?? If anyone has a clue about this, please tell me so I can test it. thanks

PD: maybe there's some kind of filename size limitation from the filesystem itself. I dont understand why is this happening. any clue?
User avatar
By marcelstoer
#70557
schufti wrote:Try moving your data to a subdirectory.


Not quite...http://nodemcu.readthedocs.io/en/latest/en/sdcard/

Accessing files on external SD cards is currently only supported from the file module. This imposes the same overall restrictions of internal SPIFFS to SD cards:

  • no support for sub-folders
  • no timestamps
  • no file attributes (read-only, system, etc.)


SPIFFS has no notion of (sub) folders even though a file name like '/foo/bar.txt' would make you think that '/foo' be a directory.
User avatar
By rudy
#70563
thePiGrepper wrote:PD: maybe there's some kind of filename size limitation from the filesystem itself. I dont understand why is this happening. any clue?


I think there is a limit in name size. I'm pretty sure I saw that and made sure the path/filename was not too long. I am not certain what the current situation is.