Skip to content

Commit 199d86d

Browse files
author
Cruz Monrreal
authored
Merge pull request #8020 from anttiylitokola/update_coap_to_4.6.3
Update mbed-coap to version 4.6.3
2 parents 27f3fd9 + 4249318 commit 199d86d

File tree

4 files changed

+85
-16
lines changed

4 files changed

+85
-16
lines changed

features/frameworks/mbed-coap/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## [v4.6.3](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.6.3)
4+
5+
- Bug fix: Remove timed out blockwise message from resend queue. If blockwise message was timed out message was still kept in the resend queue which causes unnecessary reconnections on client side.
6+
- Documentation: Document all the available macros.
7+
8+
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.6.2...v4.6.3)
9+
310
## [v4.6.2](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.6.2)
411

512
Do not clear block2 in subsequent block request.

features/frameworks/mbed-coap/mbed-coap/sn_config.h

Lines changed: 76 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
/**
3838
* \def SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE
39-
*
4039
* \brief For Message blockwising
4140
* Init value for the maximum payload size to be sent and received at one blockwise message
4241
* Setting of this value to 0 with SN_COAP_BLOCKWISE_ENABLED will disable this feature, and
@@ -45,19 +44,8 @@
4544
*/
4645
#undef SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE /* 0 */ // < Must be 2^x and x is at least 4. Suitable values: 0, 16, 32, 64, 128, 256, 512 and 1024
4746

48-
/**
49-
* \def COAP_DISABLE_OBS_FEATURE
50-
*
51-
* \brief Disables CoAP 'obs' sending feature
52-
* as part of registration message, this might be
53-
* needed to be enabled for some strict LWM2M server implementation.
54-
* By default, this feature is disabled.
55-
*/
56-
#undef COAP_DISABLE_OBS_FEATURE
57-
5847
/**
5948
* \def SN_COAP_DISABLE_RESENDINGS
60-
*
6149
* \brief Disables resending feature. Resending feature should not be needed
6250
* when using CoAP with TCP transport for example. By default resendings are
6351
* enabled. Set to 1 to disable.
@@ -66,15 +54,20 @@
6654

6755
/**
6856
* \def SN_COAP_RESENDING_QUEUE_SIZE_MSGS
69-
*
7057
* \brief Sets the number of messages stored
7158
* in the resending queue. Default is 2
7259
*/
7360
#undef SN_COAP_RESENDING_QUEUE_SIZE_MSGS /* 2 */ // < Default re-sending queue size - defines how many messages can be stored. Setting this to 0 disables feature
7461

62+
/**
63+
* \def DEFAULT_RESPONSE_TIMEOUT
64+
* \brief Sets the CoAP re-send interval in seconds.
65+
* By default is 10 seconds.
66+
*/
67+
#undef DEFAULT_RESPONSE_TIMEOUT
68+
7569
/**
7670
* \def SN_COAP_RESENDING_QUEUE_SIZE_BYTES
77-
*
7871
* \brief Sets the size of the re-sending buffer.
7972
* Setting this to 0 disables this feature.
8073
* By default, this feature is disabled.
@@ -83,7 +76,6 @@
8376

8477
/**
8578
* \def SN_COAP_MAX_INCOMING_MESSAGE_SIZE
86-
*
8779
* \brief Sets the maximum size (in bytes) that
8880
* mbed Client will allow to be handled while
8981
* receiving big payload in blockwise mode.
@@ -115,6 +107,75 @@
115107
*/
116108
#undef SN_COAP_BLOCKWISE_ENABLED /* 0 */
117109

110+
/**
111+
* \def SN_COAP_RESENDING_MAX_COUNT
112+
* \brief Defines how many times CoAP library tries to re-send the CoAP packet.
113+
* By default value is 3.
114+
*/
115+
#undef SN_COAP_RESENDING_MAX_COUNT /* 3 */
116+
117+
/**
118+
* \def SN_COAP_MAX_ALLOWED_RESENDING_COUNT
119+
* \brief Maximum allowed count of re-sending that can be set at runtime via
120+
* 'sn_coap_protocol_set_retransmission_parameters()' API.
121+
* By default value is 6.
122+
*/
123+
#undef SN_COAP_MAX_ALLOWED_RESENDING_COUNT /* 6 */
124+
125+
/**
126+
* \def SN_COAP_MAX_ALLOWED_RESPONSE_TIMEOUT
127+
* \brief Maximum allowed re-send interval in seconds that can be set at runtime via
128+
* 'sn_coap_protocol_set_retransmission_parameters()' API.
129+
* By default value is 40.
130+
*/
131+
#undef SN_COAP_MAX_ALLOWED_RESPONSE_TIMEOUT /* 40 */
132+
133+
/**
134+
* \def SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_MSGS
135+
* \brief Maximum allowed count of messages that can be stored into resend buffer at runtime via
136+
* 'sn_coap_protocol_set_retransmission_buffer()' API.
137+
* By default value is 6.
138+
*/
139+
#undef SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_MSGS /* 6 */
140+
141+
/**
142+
* \def SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_BYTES
143+
* \brief Maximum size of messages in bytes that can be stored into resend buffer at runtime via
144+
* 'sn_coap_protocol_set_retransmission_buffer()' API.
145+
* By default value is 512.
146+
*/
147+
#undef SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_BYTES /* 512 */
148+
149+
/**
150+
* \def SN_COAP_MAX_ALLOWED_DUPLICATION_MESSAGE_COUNT
151+
* \brief Maximum allowed number of saved messages for message duplicate searching
152+
* that can be set via 'sn_coap_protocol_set_duplicate_buffer_size' API.
153+
* By default value is 6.
154+
*/
155+
#undef SN_COAP_MAX_ALLOWED_DUPLICATION_MESSAGE_COUNT
156+
157+
/**
158+
* \def SN_COAP_DUPLICATION_MAX_TIME_MSGS_STORED
159+
* \brief Maximum time in seconds howe long message is kept for duplicate detection.
160+
* By default 60 seconds.
161+
*/
162+
#undef SN_COAP_DUPLICATION_MAX_TIME_MSGS_STORED
163+
164+
/**
165+
* \def SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
166+
* \brief Maximum time in seconds how long (messages and payload) are be stored for blockwising.
167+
* Longer time will increase the memory consumption in lossy networks.
168+
* By default 60 seconds.
169+
*/
170+
#undef SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED
171+
172+
/**
173+
* \def SN_COAP_MAX_INCOMING_BLOCK_MESSAGE_SIZE
174+
* \brief Maximum size of blockwise message that can be received.
175+
* By default 65535 bytes.
176+
*/
177+
#undef SN_COAP_MAX_INCOMING_BLOCK_MESSAGE_SIZE
178+
118179
#ifdef MBED_CLIENT_USER_CONFIG_FILE
119180
#include MBED_CLIENT_USER_CONFIG_FILE
120181
#endif

features/frameworks/mbed-coap/module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mbed-coap",
3-
"version": "4.6.2",
3+
"version": "4.6.3",
44
"description": "COAP library",
55
"keywords": [
66
"coap",

features/frameworks/mbed-coap/source/sn_coap_protocol.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,7 @@ static void sn_coap_protocol_handle_blockwise_timout(struct coap_s *handle)
15591559
/* Notify the application about the time out */
15601560
removed_blocwise_msg_ptr->coap_msg_ptr->coap_status = COAP_STATUS_BUILDER_BLOCK_SENDING_FAILED;
15611561
removed_blocwise_msg_ptr->coap_msg_ptr->msg_id = removed_blocwise_msg_ptr->msg_id;
1562+
sn_coap_protocol_delete_retransmission(handle, removed_blocwise_msg_ptr->msg_id);
15621563
handle->sn_coap_rx_callback(removed_blocwise_msg_ptr->coap_msg_ptr, NULL, removed_blocwise_msg_ptr->param);
15631564
}
15641565

0 commit comments

Comments
 (0)