Hi Sara & Rui,
Thanks a lot for you great job (Build Web Server with ESP32 and ESP8266) and the add on of version 2 !
I have had some compilation problem using PlatformIO with GxEPD2 library, so I decided to come back to Arduino IDE for my project.
Now, i’d like to use AsyncElegantOTA. It works great and the firmware upload is easy, but how to built the littleFS binary file with Arduino IDE (without upload of course) so I can upload it using OTA ?
Thanks a lot for your answer,
It looks like AsyncElegantOTA is just a wrapper around the standard OTA that gives a nicer interface.
There are a few OTA updaters that also update SPIFFS files.
One is esp32HttpJsonOTA which only appears to support SPIFFS.
I have been looking into OTAdrive but now I think it doesn’t support either SPIFFS or LittleFS.
Finally, I have been using IOTAppStory which has been updated recently and supports SPIFFS.
I was wrong about OTAdrive. It does appear to support at least SPIFFS (And maybe LittleFS) with its “Device Resource File Manager”.
To upload files, you need to create a data folder inside your Arduino sketch with all the files you want to upload.
After this, with the ESP8266 disconnected from your computer (that’s the whole purpose of OTA), click on ESP8266 LittleFS Data Upload.
You’ll get an error because there isn’t any ESP8266 board connected to your computer – don’t worry.
Scroll up on the debugging window until you find the .mklittlefs.bin file location. That’s that file that you should upload (in our case, the file is called Web_Server_OTA_ESP8266_Example_2.mklittlefs.bin.
And this is the path where our file is located:
To access that file on my computer, I need to make hidden files visible (the AppData folder was not visible). Check if that’s also your case.
Once you reach the folder path, you want to get the file with .mklittlefs.bin extension.
To make things easier, you can copy that file to your project folder.
Now that we have a .bin file from the data folder, we can upload that file. Go to your ESP8266 IP address followed by /update. Make sure you have the Filesystem option selected.
Then, select the file with the .mklittlefs.bin extension.
And that’s it.
I hope this helps.