OTA Update Strategy Discussion

It would be interesting to see this OTA firmware update tool for ESP8266 – BitBumper Ingenieurbüro app works to upload a BIN file?

@Badge

I learned about OTA for ESP32 and ESP8266 using Arduino IDE from YouTube’s Andreas Spiess.
His #332 video includes a small library sketch that I #include in all my sketches today. It’s simple, relies on the standard ArduinoOTA.h library, and offers TelNetStream communications using the TelnetStream.h library.

Simple, effective, no BIN files, no web interface. This OTA update works directly with Arduino IDE. I found his video and code extremely clear and helpful. It works on both ESP32 and ESP8266.

I did modify his sketch a bit, and included it in my Github link, above. My mod to his sketch simply comments out the WiFi setup as that’s already accomplished using Blynk_WiFIManager.

All of my Blynk ESP devices are connected to WiFi behind my firewall. ArduinoOTA offers password protection which I have found to be sufficient for me. Hope this is helpful.

1 Like

@Badge to answer your question about the BitBumper tool - yes, it can upload .bin files to ESP8266 devices on the same network, I’ve just tried it.
Not sure if it can do the same with ESP32 devices though, I might try that later if I get time.

The BitBumper tool is a bit clunky though, no ability to browse to a folder and select a file name, and it doesn’t show available devices listening for OTA updates in the same way that the Arduino IDE does.

One thing to look out for with OTA, which isn’t very well documented, is that the ArduinoOTA.begin(); command must be executed AFTER you’ve established the WiFi connection (or after Blynk.begin() if that’s how your establishing your WiFi connection). This wasn’t the case with some earlier versions of the ESP8266 core and I’d adopted the practice of putting my ArduinoOTA.begin(); at the beginning of void setup, immediately after my Serial.begin command, and this doesn’t work with recent ESP core versions.

Pete.

Thanks Pete,

I use the BitBumper tool in the case where I just want to pass on the BIN file to someone to maintain/update their system with the latest version of code.

The original question was, that I was just interested to see if the BitBumber tool would work on the Sonoff. I don’t see a reason why it should not but I was just curious. I think there was probably a misunderstanding :grinning:

Let me know if you have any success with a ESP32 module…

Les

It’ll work on a Sonoff smart switch (Basic, S20 etc) as they use ESP8266’s or ESP8285’s which are essentially the same from a C++ programming perspective.
But, the Sonoff must first of all of all have been hacked to run an OTA sketch.

The other alternative to BitBumper is to use HTTP OTA where the device ‘phones home’ to check if an updated.bin file is available and installs if available.
This could be a regular check (every night maybe) or triggered via a physical or Blynk widget button.
You’d then just need to drop the .bin file on your HTTP server and let the Sonoff download and install it.

Pete.

Mmm interesting, I will definitely check out the HTTP OTA option.

Thanks

We seem to have hijacked @thorathome’s project showcase topic with discussions about OTA strategies, so I’ve split this discussion off into a topic of its own.

Pete.

Hah! Now you two have me interested in web-portal-based OTA.