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.

Related