nanocoap: Add blockwise transfer block2 support#21
nanocoap: Add blockwise transfer block2 support#21bergzand wants to merge 11 commits intokaspar030:masterfrom
Conversation
|
I need a small bit of advise before continuing with the size2 option. The problem with both the block2 and the size2 option is that the value needs to be adjusted after the payload is inserted. The block2 header needs adjustment if the last block is reached and the size2 requires the full size of the payload. This problem can be resolved with #18, finding these options again after the payload is written and adjusting them is possible with this. Furthermore, the two additional fields in the So with this in mind, should I continue with a rebase on #18 and assume that it will be merged eventually? |
Yes! |
|
Thanks for tackling this. |
a49ecab to
8f6890f
Compare
8f6890f to
b7c5c36
Compare
|
Rebased and adjusted for |
|
Still contains a few bugs with larger resources where the option length is longer than 1. |
|
Tested some more with really huge transfers, everything seems to work now. If somebody could check if r421 is endianess proof, I'd be happy. |
|
Closing this now that it is merged in RIOT. |
This PR adds block2 support for nanocoap. This facilitates larger transfers such as a large /.well-know/core payload.
I've tried to make it as easy as possible for a handler to support blockwise transfer. As an example I rewrote the /.well-known/core handler with block2 support.
I've added two extra fields to the
coap_pkt_tstruct, but with #18 merged, it should be possible to remove these fields.