DFU totalSize bugfix #1

Merged
elara6331 merged 1 commit from mikaelf/itd:dfu-bugfix-totalSize into master 2026-06-04 21:13:01 +00:00
Contributor

Fix special case when firmware size aligns with dfu transfer size.

Without this fix, doing a dfu with a firmware size that is exactly
one multiple of the chunk size, itd would give the following result:

427400 / 427596 B
|------------------------------------------------------------------------>|
99.95% 0s
3:15PM FTL Error while running app error="unexpected dfu response 100301
(expected 11)"

With this change, itd no longer waits for a 0x11 packet receipt when the
current packet also completes the firmware image.

After all firmware bytes are sent, it now explicitly waits for
dfuResponseRecvFwImgSuccess (0x10 0x03 0x01) before moving on to
validation.

Note: I used Codex to diagnose this problem and implement a fix.

Fix special case when firmware size aligns with dfu transfer size. Without this fix, doing a dfu with a firmware size that is exactly one multiple of the chunk size, itd would give the following result: 427400 / 427596 B |------------------------------------------------------------------------>| 99.95% 0s 3:15PM FTL Error while running app error="unexpected dfu response 100301 (expected 11)" With this change, itd no longer waits for a 0x11 packet receipt when the current packet also completes the firmware image. After all firmware bytes are sent, it now explicitly waits for dfuResponseRecvFwImgSuccess (0x10 0x03 0x01) before moving on to validation. Note: I used Codex to diagnose this problem and implement a fix.
Fix special case when firmware size aligns with dfu transfer size.

Without this fix, doing a dfu with a firmware size that is exactly
one multiple of the chunk size, itd would give the following result:

427400 / 427596 B
|------------------------------------------------------------------------>|
99.95% 0s
3:15PM FTL Error while running app error="unexpected dfu response 100301
(expected 11)"

With this change, itd no longer waits for a 0x11 packet receipt when the
current packet also completes the firmware image.

After all firmware bytes are sent, it now explicitly waits for
dfuResponseRecvFwImgSuccess (0x10 0x03 0x01) before moving on to
validation.
Owner

That looks good to me, merging!

That looks good to me, merging!
elara6331 merged commit b3a84770a5 into master 2026-06-04 21:13:01 +00:00
elara6331 referenced this pull request from a commit 2026-06-04 21:13:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
elara6331/itd!1
No description provided.