Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By RichardS
#57639 If you have a .bin file in the SPIFFS file system that you want to upgrade the ESP8266 with... how can this be done?

I see a Update class... I see MD5.h.... in source codes for updates that typically occur over TCP/IP mechanisms and not direct from a file....

How to proceed?

RichardS
User avatar
By mrburnette
#57655 I'm embarrassed to say that I have never done a WiFi OTA update, but the mechanism that allows the binary data to stream into flash surely should be capable of being "hooked" so that an existing SPIFFS binary file can be moved from one spot in flash to another (separate pages.)

So... are you thinking that you would have this binary waiting in flash and ready to pounce into action? Like an upgrade of capabilities after someone pays a fee to go from eval to commercial version? It is intriguing.


Ray
User avatar
By martinayotte
#57659 Yes, it should be doable.
All OTA example in Arduino, either BasicOTA, or HTTPUpdater are using Updater as the base class.
All mechanism is based on an handler which receive the START/WRITE/END/ABORT status and the handler is calling Updater accordingly.
So, in theory, your handler should open the SPIFF file, query its size, pass it to Updater.begin(), then loop some Updater.write() until the end of file, and finally call Updater.end() when finished.