feat(protocol): add bounded Block1 POST uploads - #50
Open
Jason-Morcos wants to merge 3 commits into
Open
Conversation
Jason-Morcos
force-pushed
the
codex/coap-block1-post
branch
from
August 18, 2026 21:27
79de898 to
b7a8f81
Compare
This was referenced Aug 18, 2026
This was referenced Aug 21, 2026
Owner
|
Not reviewed yet, same as #48. #56 holds the order. The claim I want to confirm on hardware before this lands is the motivating one: that Samsung's IoTivity server will not reconstruct an oversized CoAP message split across DTLS application-data records, so a body over one 1024-byte block needs Block1 framing with a stable token. If you have a capture of the failure without Block1, link it. I have a dryer and an oven I can try it against. Like #49 this stays on the transport side of #28. Block1 framing is a primitive; the credential and ownership payloads that motivate it are a separate question. |
Jason-Morcos
force-pushed
the
codex/coap-block1-post
branch
from
August 23, 2026 21:46
b7a8f81 to
a2db6d3
Compare
Jason-Morcos
force-pushed
the
codex/coap-block1-post
branch
from
August 23, 2026 21:53
a2db6d3 to
1f5b959
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
This implements the Block1 path used by my working Home Assistant integration for the local washer/dryer connection flow. The transport keeps each block as its own confirmable CoAP exchange instead of relying on one oversized request being reconstructed across DTLS application-data records.
I do not currently have a shareable A/B capture of the same oversized body failing without Block1 and succeeding with Block1. QuiteYellow offered to run that comparison on a dryer and oven in the review; that remains the hardware gate before merge.
This PR adds only the transport primitive. The credential or ownership payload that a caller may send, and any decision to perform that write, remain outside this change.
Current base and retry behavior
This branch is restacked on #49 and the merged #54/#57/#58 substrate. Bodies through 1024 bytes still use the #54 ordinary POST loop unchanged. A larger body branches before an ordinary token, MID, or pending exchange is allocated.
Each Block1 chunk registers once in the shared token/MID registry, reuses one encoded datagram across its bounded retries, stops retransmitting after an empty ACK, surfaces RST by MID, and waits through
_wait_live. The Block1 retry count is independent ofwrite_max_attempts.The Block1-only commit is
1f5b959.Stack / merge order
Merge #50 after #49.
Validation
b5e25d7against this exact source tree