1

I know there is an ArduinoOTA library for sending OTA update to Arduino framework based board (ESP32). To best of my knowledge, the device needs to have static IP address to get the OTA update using this library.

However, If a client device use dynamic IP - like sometime WiFi or cellular network internet, is there any solution, preferably using MQTT message, to send OTA to the client device.

4
  • the ArduinoOTA library is for upload from IDE. The library propagates an MDNS record and the IDE reads this record and puts a \network port' in Tools menu. this doesn't require a static IP address. other two OTA libraries are ESP8266httpUpdate for HTTP download of update bin file from a server and ESP8266HTTPUpdateServer for bin upload over a web page. the bin can be 1 MB large. I don't know if MQTT message can be so large. Commented Nov 28, 2019 at 6:26
  • sorry ESP32 has only the library HTTPUpdate and WebUpdate example in the WebServer library Commented Nov 28, 2019 at 12:30
  • You probably don't want to try to push an update through MQTT, at least unless you split it into small chunks. More likely you would send a message telling the device to go fetch an update from some authenticated server. Some schemes may not even both with the push message but just have the device periodically check the server for indication that a new version is available. Commented Nov 30, 2019 at 21:52
  • If I break down my problem, I am using esp32 for sending sensor data from garden to MQTT broker, and I have an android MQTT client app subscribing to the broker to monitor the live data from the garden. I often need to upload a sketch having new features to the esp32. So I wonder If there is any way to send the new sketch to esp32 remotely even when I am at work(Public network). Commented Dec 2, 2019 at 10:08

1 Answer 1

0

Your best bet will be to use Mongoose OS Implementation on ESP32. The tutorial is here: https://mongoose-os.com/docs/mongoose-os/userguide/ota.md

MQTT is not suitable, but doable. As MQTT just sends messages, it can't send whole files. Though you may be able to send the whole contents of your OTA file and then save it on the other end as the OTA file with proper extension and do the OTA from that point on.

Thank You. Naveen PS.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.