Updates: resume a broken download #54

Open
opened 2026-10-06 13:08:27 +00:00 by twisla · 0 comments
Owner

Idea

When the Wi-Fi drops in the middle of a 1.9 MB release download, carry on from where it stopped instead of starting over (#6, Q173).

Why

A download goes straight into the inactive slot (Q167), so a failure means starting again. On a good link it takes seconds; on a weak one it might never complete.

What's known

  • The server supports ranges: a Range: bytes=0-0 request gets 206 with Content-Range.
  • The Update File's parser hashes the image as it streams: resuming means keeping its state (the SHA-256 context and the offset in the slot) across the break, and trusting that the file hasn't changed meanwhile (the ETag).
  • The ESP-IDF OTA handle can write on after a pause; it can't be reopened at an offset.

Questions

  1. Is it worth the state, or is "try again" enough?
  2. Where is the state kept if the device restarts in between?

Related

docs/milestones/R1.md (Q167, Q173), #6, lib/ota/src/update_parser.h.

## Idea When the Wi-Fi drops in the middle of a 1.9 MB release download, carry on from where it stopped instead of starting over (#6, Q173). ## Why A download goes straight into the inactive slot (Q167), so a failure means starting again. On a good link it takes seconds; on a weak one it might never complete. ## What's known - The server supports ranges: a `Range: bytes=0-0` request gets `206` with `Content-Range`. - The Update File's parser hashes the image as it streams: resuming means keeping its state (the SHA-256 context and the offset in the slot) across the break, and trusting that the file hasn't changed meanwhile (the `ETag`). - The ESP-IDF OTA handle can write on after a pause; it can't be reopened at an offset. ## Questions 1. Is it worth the state, or is "try again" enough? 2. Where is the state kept if the device restarts in between? ## Related `docs/milestones/R1.md` (Q167, Q173), #6, `lib/ota/src/update_parser.h`.
twisla added this to the R1 Releases milestone 2026-10-06 13:08:27 +00:00
twisla added the
kind
feature
area/ota-debug
status
needs-design
priority
low
area/gitea
labels 2026-10-06 13:08:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#54