Lwm2m client not working great with Lifetime > 2 min

I'm working with a lwm2m client using the LwM2M client utils library to connect with a lwm2m leshan server.

Everything works great with LIFETIME = 30sec (default setting)

Well, now i want to make the LIFETIME higher. The problem is : the higher the LIFETIME, the more instable the connection is.

For instance, when i choose LIFETIME = 3600, i can't read any ressources. The server has no problem since i can see all the requests on wireshark, but the lwm2m client on the nrf9160 is not responding at all. 

I'm using Zephyr 3.0.0 with nrf sdk v2.0.0

This is in lwm2m.engine.c file in zephyr/subsys/net/lwm2m folder.

It looks like the socket_recv_message in socket_loop() work loop is not reacting to any of the request made by the server.

  • Hi MCDes,
    I just update the code to be compliant with nRF SDK 2.0.
    Btw, keep in mind that the evaluation version of Iowa is limited to 2 minutes sessions (so maybe you won't be able to check :( )
    One more point, if you are using UDP, this kind of behavior is not unusual (depends on NAT rules expiration timeout)
    To isolate your issue:
    - Test with TCP instead of UDP (if apply)
    - Test on a different server (https://iowa-server.ioterop.com/ could fit your needs Wink )
    Hope this helps!
    BR,
    OlivierG

    PS: On cellular IOT devices, we usually set the lifetime value to ...86400 (1 day)

Related