ESP32 and OTA

Kralik
Posts: 2
Joined: Thu Nov 04, 2021 1:36 pm

ESP32 and OTA

Postby Kralik » 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?

User avatar
thezcx
Posts: 16
Joined: Mon May 01, 2023 12:21 am

Re: ESP32 and OTA

Postby thezcx » Sun Nov 19, 2023 10:30 pm

Do you need to update the whole code or just some variables?

MicroController
Posts: 1696
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP32 and OTA

Postby MicroController » Sun Nov 19, 2023 10:35 pm

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?

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

Re: ESP32 and OTA

Postby mbratch » Mon Nov 20, 2023 3:24 pm

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.

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 114 guests