Henrik,
With DTLS, session resumption is recommended in
section 8.3 of OMA-TS-LightweightM2M-V1_0_1-20170704-A.:
At some point in time the LwM2M Client wakes up again and transmits a registration update message. Note: During the time the LwM2M Client has been sleeping the IP address assigned
to it may have been released and / or existing NAT bindings may have been released. If this is the case, then the client needs to re-run the DTLS handshake with the LwM2M Server since an IP address and/or port number change will destroy the existing security
context. For performance and efficiency reasons it is RECOMMENDED to utilize the DTLS session resumption.
In this case I don’t think my answer for a dynamic IP address applies.
Regards,
Scott
From: wakaama-dev-bounces@xxxxxxxxxxx <wakaama-dev-bounces@xxxxxxxxxxx>
On Behalf Of Henrik A
Sent: Thursday, September 6, 2018 8:51 AM
To: wakaama-dev@xxxxxxxxxxx
Subject: Re: [wakaama-dev] Best practice of life time parameter
Thanks for you very detailed answer.
We actually have use cases for both DTLS and plain coap, but DTLS is our preferred way.
Thanks,
Henrik
On 2018-09-06 14:35, Scott Bertin wrote:
Henrik,
I'll try to answer both of your emails at once.
You don’t say if you are using DTLS or not, so I will assume you are not.
With the device sleeping with the network connection closed, you should be using Queue Mode as specified in section 8.3 of OMA-TS-LightweightM2M-V1_0_1-20170704-A. This means you should be sending a registration update every time you
wake up. As long as the server life time is greater than your report interval you should be good. With cellular not being 100% reliable, you may want to make it several times the reporting interval to allow some number of failed attempts before needing a new
registration. This is largely dependent on your requirements. Calling lwm2m_update_registration once you have opened the socket again will send the registration update.
If have a dynamic IP address, you are probably getting a different IP address every time. In this case, the server life time is pretty much a non-issue. According to section 8.2.4 of OMA-TS-LightweightM2M-V1_0_1-20170704-A, a new registration
would be required on each connection:
When a new DTLS Session is started, or in NoSec mode when the LwM2M Client IP address changes, the Client MUST
register again to the LwM2M Server.
To force a new registration in Wakaama, it looks like you would call lwm2m_close to free the context and start over. You could also go through the context and reset everything manually.
Regards,
Scott Bertin
![telular1532373393.png]()
|
Scott Bertin
Senior Firmware Engineer
Telular
D: 678.264.2042
telular.com
|
|
_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wakaama-dev