From 175dd50ba2a2a6c8d033a9fd4e91f4823f9e210a Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sat, 20 Jun 2026 13:03:23 -0500 Subject: firmware: OTA firmware updates via POST /firmware + rollback Streams the raw .bin to the inactive ota_0/ota_1 slot via esp_ota_*, flips otadata, replies 200, reboots after 500 ms. Single-shot guarded by atomic_flag (409 on concurrent). CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE armed: new images boot pending-verify and ota_arm_healthy_timer marks them valid after 30 s of healthy uptime; otherwise the bootloader reverts on next reset. /state gains ota_state. --- sdkconfig.defaults | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sdkconfig.defaults') diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 1ba8375..a32a88e 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -51,3 +51,9 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 # Log level CONFIG_LOG_DEFAULT_LEVEL_INFO=y + +# OTA: dual-partition layout in partitions.csv. Rollback marks new +# images as PENDING_VERIFY at first boot; ota_arm_healthy_timer flips +# them to VALID after 30 s of healthy uptime, otherwise the bootloader +# reverts to the previous slot on the next reset. +CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y -- cgit v1.2.3