Page 1 of 1

ESP32 and OTA

Posted: Tue Nov 07, 2023 8:02 pm
by Kralik
I'm working on a project, that requires the ability to occasionally update the firmware. My question is, what is the best practise for this? Ideally, the user would not have to connect the device to wifi, (device has no keyboard, so connecting to wifi is rather hard). My idea was to generate its own webserver, where the user will connect to the esp32's wifi, go on a website and drag-and-drop a new firmware into a designated spot. But I have read online that this is not the best for security reasons? What are your thoughts?

Re: ESP32 and OTA

Posted: Sun Nov 19, 2023 10:30 pm
by thezcx
Do you need to update the whole code or just some variables?

Re: ESP32 and OTA

Posted: Sun Nov 19, 2023 10:35 pm
by MicroController
Kralik wrote:
Tue Nov 07, 2023 8:02 pm
(device has no keyboard, so connecting to wifi is rather hard)
Have you checked https://docs.espressif.com/projects/esp ... oning.html, specifically https://docs.espressif.com/projects/esp ... oning.html?

Re: ESP32 and OTA

Posted: Mon Nov 20, 2023 3:24 pm
by mbratch
Kralik wrote:
Tue Nov 07, 2023 8:02 pm
I'm working on a project, that requires the ability to occasionally update the firmware. My question is, what is the best practise for this? Ideally, the user would not have to connect the device to wifi, (device has no keyboard, so connecting to wifi is rather hard). My idea was to generate its own webserver, where the user will connect to the esp32's wifi, go on a website and drag-and-drop a new firmware into a designated spot. But I have read online that this is not the best for security reasons? What are your thoughts?
I'm not sure I'm following. You are saying the device has no keyboard, so connecting to wifi is difficult. But you are suggesting that the user could alternatively connect to the devices web page over wifi, which means it does have a wifi connection.

If your ESP32 device has a web page, you can set up a page that tells the device to pull a firmware file from a web server somewhere (you would need a web server accessible to the device). I do this with my devices. I have an embedded web page that allows me to specify a URL for a firmware file, and the device can do the firmware update via OTA.