net: lwm2m: Registration retry behavior on timeout #57114
-
There are some confusing and in my opinion redundant LwM2M retry settings in the LwM2M client code. First, there is the On the other hand there is the Timeouts do not result in
On reaching the
Steps to reproduce the behavior: Build with different settings of
Tested with release So to summarize, the question would be, whats does, or should |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thank you for the question @mlasch If you use non-secure LwM2M, these two values seem to do almost the same. CoAP retry can handle single packets dropped from the application layer traffic. If that can recover, then there is no network failures assumed. Here is a relevant piece from the state machine diagram: |
Beta Was this translation helpful? Give feedback.
-
Here is a Wireshark capture of the effect. Here CoAP retries fail to recover the connection, so we restart the DTLS and it recovers |
Beta Was this translation helpful? Give feedback.
Thank you for the question @mlasch
If you use non-secure LwM2M, these two values seem to do almost the same.
However, they do have different purposes and it is visible when you use DTLS.
CoAP retry can handle single packets dropped from the application layer traffic. If that can recover, then there is no network failures assumed.
But when network NAT timeout have happened, CoAP retry can not recover. But if there is still lifetime left, recovering the DTLS session might recover the LwM2M connection.
So the difference between CoAP retries and RD_CLIENT_MAX_RETRIES is that socket is closed in between RD client retries.
Here is a relevant piece from the state machine diagram: