Page 1 of 1

Do you NEED to enable rollback?

Posted: Fri Jun 21, 2019 6:04 am
by mattlogue
I am lazy and don't want to mess around with kConfig. The Expressif doc'n is a bit unclear as to whether rollbacks occur by default if there is a upload failure, OR application crash / abort(). CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is the command it refers to.

Re: Do you NEED to enable rollback?

Posted: Sat Jun 22, 2019 11:06 am
by Ritesh
mattlogue wrote:
Fri Jun 21, 2019 6:04 am
I am lazy and don't want to mess around with kConfig. The Expressif doc'n is a bit unclear as to whether rollbacks occur by default if there is a upload failure, OR application crash / abort(). CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is the command it refers to.
Hello,

Please look few more informations regarding that.
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE
Enable app rollback support

Found in: Bootloader config

After updating the app, the bootloader runs a new app with the “ESP_OTA_IMG_PENDING_VERIFY” state set. This state prevents the re-run of this app. After the first boot of the new app in the user code, the function should be called to confirm the operability of the app or vice versa about its non-operability. If the app is working, then it is marked as valid. Otherwise, it is marked as not valid and rolls back to the previous working app. A reboot is performed, and the app is booted before the software update. Note: If during the first boot a new app the power goes out or the WDT works, then roll back will happen. Rollback is possible only between the apps with the same security versions.
https://docs.espressif.com/projects/esp ... ack-enable

It has been mentioned that itg will be worked with state flag which is described into above contents.

So, Please verify and then let ESP32 SDK team know if still it is not working as per your requirement for roolback mechanism.

Re: Do you NEED to enable rollback?

Posted: Wed Jan 18, 2023 6:01 am
by helpwithesp32
I know this is rehashing an old post, but the answer is not clear to me. On the ESP32 (micropython, not Arduino) for OTA updates, do rollbacks occur by default, or does the CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE need to be set in the menuconfig for this to happen? Also, does any manual code need to be added to the firmware for rollback to occur?

Re: Do you NEED to enable rollback?

Posted: Sun Feb 05, 2023 6:17 am
by Ritesh
helpwithesp32 wrote:
Wed Jan 18, 2023 6:01 am
I know this is rehashing an old post, but the answer is not clear to me. On the ESP32 (micropython, not Arduino) for OTA updates, do rollbacks occur by default, or does the CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE need to be set in the menuconfig for this to happen? Also, does any manual code need to be added to the firmware for rollback to occur?
Hello,

Would you please check latest documentation for OTA with rollback mechanism into Espressif Read the Docs? As there are all steps have been mentioned and you can check code samples into Examples of ESP32 IDF.