• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

AsyncElegantOTA

Q&A Forum › AsyncElegantOTA
0 Vote Up Vote Down
Jean-Michel Haution asked 4 years ago

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,
Regards,
JM 
 

13 Answers
0 Vote Up Vote Down
Steve Mercer answered 4 years ago

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.

0 Vote Up Vote Down
Steve Mercer answered 4 years ago

I was wrong about OTAdrive. It does appear to support at least SPIFFS (And maybe LittleFS) with its “Device Resource File Manager”.

0 Vote Up Vote Down
Steve Mercer answered 4 years ago

Ah, whilst it can, you have to pay for that feature.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Jean-Michel
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.

ESP8266 LittleFS Data Upload Arduino IDE


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.

Get LittleFS Bin File Path ESP8266


And this is the path where our file is located:

C:\Users\sarin\AppData\Local\Temp\arduino_build_375940\Web_server_OTA_ESP8266_Example_2.mklittlefs.bin


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.


Arduino IDE ESP32 ESP8266 NodeMCU Board Add-on fix install


Once you reach the folder path, you want to get the file with .mklittlefs.bin extension.

LittleFS Bin File ESP8266


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.

Upload Files Filesystem ElegantOTA ESP8266


Then, select the file with the .mklittlefs.bin extension.

And that’s it.

I hope this helps.

Regards,
Sara

0 Vote Up Vote Down
Jean-Michel Haution answered 4 years ago

Thanks Sara, you are right, it works!
regards
JM

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great!
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

0 Vote Up Vote Down
aage answered 4 years ago

Hi Sara
when I try to compile your example code for ESP32 OTA I get the error for ws.cleanupClients();
class AsyncWebSocket’ has no member named ‘cleanupClients’
 

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
Did you install the ESPAsyncWebServer library? The ESP32 OTA is based on that library, so you need to install it.
Regards,
Sara

0 Vote Up Vote Down
aage answered 4 years ago

Hi
yes I use ESPAsyncWebServer library in several of my Projecter (thanks to your courses).
if I comment ws.cleanupClients (); out the code works perfectly

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great!
Maybe there was some library update.
Thanks for letting us know.
I’ll have to test the project and find out if the same error happens to me.
Regards,
Sara
 

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi again.
I tested our code, and it is working fine for me.
Is this the sketch that you are using?
https://raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP32/AsyncElegantOTA/ESP32_Web_Server_LED_OTA/ESP32_Web_Server_LED_OTA.ino
Regards,
Sara

0 Vote Up Vote Down
aage answered 4 years ago

Hi
i deleted all the libraries for this code and reinstalled them and now it works fine.
thanks for the help
/ Aage

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Great!
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.