Sub-IoT / Sub-IoT-Stack

Sub-IoT: Open Source Stack for Dash7 Alliance Protocol
https://sub-iot.github.io/Sub-IoT-Stack/
Other
150 stars 90 forks source link

Fragmentation #100

Open pnunes30 opened 3 years ago

pnunes30 commented 3 years ago

This PR provides an implementation proposal regarding the new fragmentation feature explained in the PAG mailing list. As a preliminary, this PR comes with a series of different fixes.

Some of them are coming from our porting of the D7A stack to RIOT. Thus, the patch fb4ea08 "d7a: registration is only possible when the stack is completely initialized" turned out to be necessary when we operate in a multi-thread RTOS (eg RIOT) where the D7A stack is initialized independently to the client application.

One fix deserves a special attention since it may be CORTUS specific: 68f2e45 fix Cortus build due to missing symbol regarding the d7ap_fs buffers At least with the CORTUS toolchain, we have to reorder the libraries during the link. To be checked with the other platforms.

Feel free to review them and to cherry-pick them to master independently to the fragmentation feature.

This PR introduces also some missing aspects of the D7A spec, like the retry counter per request, the Execution Delay Timeout (Te)...

This PR has been tested in the case where all fragments are successfully received. The retry mechanism based on the ACK bitmap still requires to be tested. Meanwhile, I propose this PR for review. Thanks!