1

I need to write a program, using ESP-IDF, which is able to update the firmware of an ESP32-S3-based device wirelessly, without having on-field access to Internet.

I googled and found the example project about OTA:

But this project seems to use the ESP32 as an HTTP client, connecting to a server running on a computer, and both the ESP32 and the computer being connected to the same local network created by a router acting as AP. For the firmware update on-field, I won't have access to Internet or a local network via a router, hence I will need to set up a direct connection between the ESP32 and my computer. I thought that I could do this by using the ESP32 as AP and then connect with my PC to the ESP32-created network.

For using ESP32 as AP, I found the following example project:

and for using ESP32 as HTTP server I found the following example project:

My idea was to try to combine code from the above 3 example projects in order to use the ESP32 as AP instead of as STA, run an HTTP server on ESP32, use a computer as HTTP client to connect to the ESP32 server, and from the computer browser to upload the new firmware file to the ESP32 server, and then copy the new firmware from a buffer to the ota flash partition.

As I don't have experience with OTA at all and less experience with ESP32, I wanted to first ask if the above idea is possible at all or there exists a simpler way to accomplish the OTA. If there is no simpler method, how can I use the OTA code with ESP32 being an HTTP server instead of HTTP client (as the OTA example seems to be coupled to an HTTP client) ?

P.S. Using the ESP32 as HTTP client seems not applicable to me because I will need to know in advance a certain permanent IP address for the computer acting as an HTTP server which I think I cannot have, but I am not sure if I am thinking correctly ?

2

0

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.