New firmware is ok , but old firmware is booting after power off/on.

A001FF
Posts: 12
Joined: Sat Apr 02, 2022 3:41 pm

New firmware is ok , but old firmware is booting after power off/on.

Postby A001FF » Sun Oct 23, 2022 12:47 pm

Hi,
I used:
https://github.com/espressif/arduino-es ... e/examples
for http firmware udate.
"OTA done!"
"Update successfully completed. Rebooting."
after ESP.restart() line, ESP rebooting Ok with the new firmware.

But after power off/on the old firmware is executed :)
Where I am wrong ?
Thanks.

wuyuanyi
Posts: 28
Joined: Wed Mar 09, 2022 11:54 am

Re: New firmware is ok , but old firmware is booting after power off/on.

Postby wuyuanyi » Sun Oct 23, 2022 4:02 pm

Not answering from the Arduino perspective but it seems that you did not invoke

Code: Select all

esp_ota_mark_app_valid_cancel_rollback();
after booting from the new image.

See https://github.com/espressif/esp-idf/bl ... ple.c#L308

Who is online

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