Skip to content

Loop Firmware v1.0.1.60

Choose a tag to compare

@NickEngmann NickEngmann released this 08 Jul 23:38

fix(ota_serial): auto-retry the first chunk on a transient 5xx (ota_begin flake) (#51)

The first chunk (offset 0) does esp_ota_begin — erasing the device's inactive
OTA slot — which can transiently fail with 'HTTP 500 ota_write/recv failed' (a
C6-SDIO / ota_begin hiccup, seen repeatably on the P4X's first chunk). The old
code treated ALL HTTP errors as hard fails (correct for a 4xx wrong-variant
reject) and aborted the whole OTA. Now post_chunk(retry_5xx=True) for offset 0
retries a 5xx up to 3× (offset 0 re-begins the OTA cleanly, so re-sending is
safe); 4xx stays a hard fail. Mid-stream chunks are unchanged.

Validated live during the v1.0.1.59 end-to-end release→OTA test: the P4X's
first chunk 500'd, 'retry 1/3 after ota_begin flake' recovered it, OTA
completed. (Before this, the same flake aborted the OTA and needed a manual
re-run.)

Claude-Session: https://claude.ai/code/session_01QYRWm2rbLEWHAqCW3RgM3B


Pushed to main by Cyril Engmann — commit 7c99f444001e7fc5dd7ddf9676e1433dda829800