- New API to control whether coap itself sends a next GET(block2) request or not
- Fixes error IOTCLT-2203 mbed-coap does not handle PUT or POST if they indicate a smaller block size preference
This PR implement https://tools.ietf.org/html/rfc7959#section-2.5
"The error code 4.13 (Request Entity Too Large) can be returned at any
time by a server that does not currently have the resources to store
blocks for a block-wise request payload transfer that it would intend
to implement in an atomic fashion. (Note that a 4.13 response to a
request that does not employ Block1 is a hint for the client to try
sending Block1, and a 4.13 response with a smaller SZX in its Block1
Option than requested is a hint to try a smaller SZX.)
Fixes errors reported in Github
- #4798
- Fixed Lwm2m blockwise data transfer (using Block1 option) with Leshan
- ARMmbed/mbed-client#512
- Fixed an ongoing blocktransfer (Block 1 option) interruption by out of order Block to return error 4.08 Request Entity Incomplete as specified in the coap specification.
- ARMmbed/mbed-client#511
- Fixed detected duplicate message duplications will not stop mbed-client
This commit includes:
* Add support for sending response to duplicate messages
* Add randomness for retransmission time
* Fix usage sn coap blockwise max time data stored
* CoAP parser option handler does not seem to handle "Option Length" completely according to spec
* Handle '0' value if duplication buffer size is set through the sn_coap_protocol_set_duplicate_buffer_size()
This commit includes
- Removing CoAP sources from mbed-client-c to its own repository.
- mbed-client-c is moved outside of mbed-os source tree because it is used by mbed-client, so
it will be part of mbed-client offering.
- CoAP sources are used by coap-service which is a part of nanostack deliveries hence coap now existing
as independent module under mbed-coap.
- Commit handles the interdepdency of coap-service with mbed-client-c because of coap sources, coap-service
header files are now fixed to point to right header directory.