ESP32S3 Multithreaded OTA Example

kekykeke
Posts: 7
Joined: Fri Nov 24, 2023 1:37 pm

ESP32S3 Multithreaded OTA Example

Postby kekykeke » Mon Jun 10, 2024 7:36 am

I working on a circuit which will be in a confined environment so after it is assembled I will rely on OTA to do all the firmware updates.


Is there more up to date version of doing OTA for the new boards like the ESP32S3 than this old tutorial:

https://lastminuteengineers.com/esp32-o ... duino-ide/

As he explains:

Code: Select all

This is because the delay() function pauses the program. If the next OTA request is generated while the ESP32 is paused waiting for the delay() to complete, your program will miss that request.
My code has delays in it so due to this OTA rarely ever works.

Can be the OTA process put into a single task which is called with xTaskcreate? :?:

So it is never blocked.

eriksl
Posts: 116
Joined: Thu Dec 14, 2023 3:23 pm
Location: Netherlands

Re: ESP32S3 Multithreaded OTA Example

Postby eriksl » Mon Jun 10, 2024 3:13 pm

I don't see the problem, at all? If only because delay() is not an RTOS function, nor an IDF API function? If you're talking about Arduino (which it looks like), you might want to describe your issue as such.

FYI I have a similar situation, but no Arduino (lucky me...) and then this just works. Upload the firmware, reboot, confirm, done.

kekykeke
Posts: 7
Joined: Fri Nov 24, 2023 1:37 pm

Re: ESP32S3 Multithreaded OTA Example

Postby kekykeke » Tue Jun 11, 2024 4:54 pm

Better solution I found is just go with WebOTA as the code already is using the Asyncwebserver :D

https://github.com/ayushsharma82/ElegantOTA

Who is online

Users browsing this forum: Bing [Bot] and 159 guests