Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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


Back to the top