I have tried finding an answer to this question and my google-foo has let me down.
I am creating a product I would like to automatically update an ESP32 using OTA. How does the Arduino IDE autodetect available esp32-OTA? I assume it has to do with subscribing to broadcast mDNS messages over the network, or does it just brute-force check every IP on the subnet for the right open port and send a query?
To be clear: I have no trouble enabling OTA/web/programming examples on my module, and the Arduino IDE works just fine for dev, but I want to integrate that functionality into my standalone+idiotproof (c++) app.
I am sure this is a common problem/solution, sorry for the repeat.
Autodetecting OTA the way the Arduino IDE does
Re: Autodetecting OTA the way the Arduino IDE does
Google the source for Arduino OTA. Thats what I did when I had the same question as you.
Since then I just rolled my own
Since then I just rolled my own
-
- Posts: 831
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Autodetecting OTA the way the Arduino IDE does
The code is all open source. The device puts a multicast advertisement on mDNS, and the client just has to scan mDNS for the service.
https://github.com/espressif/arduino-es ... A.cpp#L135
https://github.com/espressif/arduino-es ... A.cpp#L135
Re: Autodetecting OTA the way the Arduino IDE does
perfect thank you this is just what I needed.
Who is online
Users browsing this forum: No registered users and 81 guests