Do you NEED to enable rollback?

mattlogue
Posts: 4
Joined: Sat Mar 02, 2019 1:54 am

Do you NEED to enable rollback?

Postby mattlogue » 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.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Do you NEED to enable rollback?

Postby Ritesh » Sat Jun 22, 2019 11:06 am

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.
Regards,
Ritesh Prajapati

helpwithesp32
Posts: 7
Joined: Wed Jan 18, 2023 5:55 am

Re: Do you NEED to enable rollback?

Postby helpwithesp32 » 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?

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Do you NEED to enable rollback?

Postby Ritesh » Sun Feb 05, 2023 6:17 am

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.
Regards,
Ritesh Prajapati

Who is online

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