Hasty Briefsbeta

双语

We broke an Over-The-Air update on the ESP32 on purpose

a day ago
  • OTA updates are crucial for connected products to fix issues after shipping, ensuring devices always have the latest fixes.
  • The OTA mechanism must be completely reliable, surviving interruptions like partial downloads or power cuts without bricking the device.
  • Automatic testing on every system change is essential, simulating worst-case interruptions to ensure recovery.
  • The ESP32-C6 uses ESP-IDF with dual flash partitions (ota_0 and ota_1) for safe updates; the bootloader only switches after verification.
  • Three interruption methods were tested: software reset, hardware reset-pin toggle, and hard power cut, all successfully recovered in 18 trials.
  • Recovery time varied by interruption method (hard power cut fastest at ~94-100s, others ~155-166s) and by interruption timing (earlier cuts recovered faster).
  • Thorough testing included an additional update from v2 to v3 to ensure future update capability wasn't lost.
  • The experiment demonstrated that ESP-IDF's rollback mechanism reliably handles interrupted updates, even with rollback disabled, providing confidence in the system's stability.