ESP32 DISCUSSION

When should an ESP32 OTA image be marked valid after its first boot?

Started by shahira ESP32 OTArollbackimage validationfirmware updatesrecovery testing
3 replies 248 views 4 participants
Latest activity · 27 Sep 2026

When should an ESP32 OTA image be marked valid after its first boot?

shahira ESP32 Forum
#1

Community replies 3

Re: When should an ESP32 OTA image be marked valid after its first boot?

#2

Use a short, bounded self-test for the functions required to keep the device operational. Check essential configuration access, task startup and critical peripheral initialization. Separate local health from an external service outage; an unreachable server alone may say nothing about the new image's integrity.

Re: When should an ESP32 OTA image be marked valid after its first boot?

#3

Follow the ESP-IDF image-state flow and call esp_ota_mark_app_valid_cancel_rollback only after the selected checks pass. Review bootloader configuration and partition layout as part of the release. Rollback availability depends on the actual configuration and usable fallback image, not just an API call in application code.

Re: When should an ESP32 OTA image be marked valid after its first boot?

#4

Test interrupted downloads, reset during first-boot checks and repeated boot failure on a development unit. Also test configuration compatibility when an older image is restored. A firmware rollback cannot automatically undo an incompatible data migration, so preserve a recoverable configuration format.

TEP COMMUNITY