-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum COAP message resending buffer size limited to 255 bytes. #4374
Comments
|
Hello, what is the situation regarding this change request? |
|
Hi, Thanks for you report. We haven't yet started to implementing this change but it will be part of upcoming releases. Thanks, |
Fixes error reported in Github. - PelionIoT/mbed-coap#24 - #4374
|
This fix is now part of mbed-os 5.5.6 release. |
|
ARM Internal Ref: MBOTRIAGE-334 |
Resolved |
Description
Enhancement
In the existing solution it is impossible for the maximum size of the COAP retransmission buffer to be bigger than 255 bytes. If you try to define YOTTA_CFG_COAP_RESENDING_QUEUE_SIZE_BYTES to be larger than 255 in application the value gets truncated to a uint8_t. This is probably because the sn_coap_resending_queue_bytes -variable is defined as uint8_t in:
mbed-os/features/FEATURE_COMMON_PAL/mbed-coap/source/include/sn_coap_protocol_internal.h
The maximum size of 255 bytes for the whole retransmission buffer can be too small for many applications especially when using COAP over WIFI or cellular network where multiple messages may require retransmission simultaneously. Even a single packet with a big payload (~512 bytes) can fill the whole buffer. The RAM available on many microcontrollers can easily handle a bigger buffer, so it should be possible to set the maximum size of the retransmission buffer to be bigger atleast using yotta config.
Suggested enhancement
Change the type of the sn_coap_resending_queue_bytes to be bigger to allow a bigger retransmission buffer if the programmer using the library so chooses. uint16_t or maybe even uint32_t should work better. The related unit test may also need to be changed.
Pros
Cons
The text was updated successfully, but these errors were encountered: