2

I want to be able to program my ESP32 (same for ESP8266) remotely, I have used ArduinoOTA without problems, and I can upload the file into the ESP selecting the local file that I want to flash.

However I want something different. I want that the ESP downloads the new firmware located in my github repository.

Arduino OTA is just a small webserver that uploads the file from my computer to the ESP and then flashes it.

Is there a library where I can specify a web address and then it downloads the file from there?

1 Answer 1

1

Since you've already used ArduinoOTA the answer is actually right under your nose!

OTA update as download

OTA update as download

The WiFi101OTA and ArduinoOTA libraries were created for upload from IDE. But in some scenarios as for example deployed sleeping battery powered devices it is better to have the update available for download by the device.

In advanced section of examples you can find examples of sketch update over download from a http server. One example shows update over the InternalStorage object of the ArduinoOTA library. The example for update over SD card doesn't use this library at all.

OTASketchDownload examples ArduinoHttpClient include fixed

There are 2, one mentioning SD cards, the other not:

OTASketchDownload.ino

This example downloads sketch update over network. It doesn't start the OTA upload sever of the ArduinoOTA library, it only uses the InternalStorage object of the library to store and apply the downloaded binary file

3
  • Checked that. GitHub doesn't work with HTTP but needs HTTPS, so I managed to make a program to reflash the ESP when a newer version is commited to GitHub. Commented Jul 30, 2020 at 15:03
  • So you got it working? Well done ;-) would you like to share your program?
    – Geoff
    Commented Jul 30, 2020 at 15:05
  • Please share how you accomplished this.
    – tavis
    Commented Aug 12, 2020 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.