Page 1 of 1

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

Posted: Sun Oct 23, 2022 12:47 pm
by A001FF
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.

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

Posted: Sun Oct 23, 2022 4:02 pm
by wuyuanyi
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