Using a ESP8266 NodeMCU LUA CP2102 ESP-12E. First time with littleFS having previously used SPIFFS.
Installed the "ESP8266 LittleFS Data Upload", seems to work:
[LittleFS] data : /home/andy/Arduino/oiltank3/data
[LittleFS] size : 2024
[LittleFS] page : 256
[LittleFS] block : 8192
/ssid.txt
/settings.txt
[LittleFS] upload : /tmp/arduino_build_348749/oiltank3.mklittlefs.bin
[LittleFS] address : 0x200000
[LittleFS] reset : --before default_reset --after hard_reset
[LittleFS] port : /dev/ttyUSB0
[LittleFS] speed : 115200
[LittleFS] python : /home/andy/.arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3
[LittleFS] uploader : /home/andy/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/upload.py
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: cc:50:e3:c7:03:c2
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 2072576 bytes to 2793...
Writing at 0x00200000... (100 %)
Wrote 2072576 bytes (2793 compressed) at 0x00200000 in 0.2 seconds (effective 66558.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
V similar topic here https://forum.arduino.cc/t/littlefs-not-showing-uploaded-files/704027
Borrowed the function void littleFsListDir(const char * dirname) in the link:
void littleFsListDir(const char * dirname) {
Serial.printf("Listing directory: %s\n", dirname);
Dir root = LittleFS.openDir(dirname);
while (root.next()) {
File file = root.openFile("r");
Serial.print(" FILE: ");
Serial.print(root.fileName());
Serial.print(" SIZE: ");
Serial.println(file.size());
file.close();
}
Serial.println("");
}
and ran it in my setup function to try and find my files:
LittleFSstart(); // start the file system
Serial.println("list empty dir");
littleFsListDir("");
Serial.println("list root dir");
littleFsListDir("/");
Serial.println("list data dir");
littleFsListDir("/data");
no sign of settings.txt or ssid.txt in the serial output (format.txt is a file I had previously created):
list empty dir
Listing directory:
FILE: format.txt SIZE: 17
list root dir
Listing directory: /
FILE: format.txt SIZE: 17
list data dir
Listing directory: /data
I did find this on the web:
Before you upload data to LittleFS make sure to put your NodeMCU into flashmode (do this by: hold flash and reset, then release flash) When you have done these steps, just reboot your NodeMCU. And plug it back into your OTGW, and hook it up.
No idea if this is relevant or exactly what it means.
What am I doing wrong?