zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.97k stars 6.68k forks source link

LwM2M: Support Queue Mode Operation #6162

Closed rbtchc closed 2 years ago

rbtchc commented 6 years ago

Queue Mode offers functionality for a LwM2M client to inform the LwM2M server that it may be disconnected for an extended period of time and also when it becomes reachable again. The LwM2M server uses this information to adjust timers and relay messages from and to the client accordingly.

The feature allows a device to enter the power saving mode while queuing the incoming requests at the server.

TODOs

  1. Send “UQ” binding mode to server at registration time
  2. A mechanism to determine when a client goes offline and online
    • Wait at least MAX_TRANSMIT_WAIT [CoAP] from the last CoAP message it sent to the server
    • Wake up before lifetime or observation (if any) expires
    • Suspend/resume will involve re-initialize the network interface and DTLS handshaking
  3. A mechanism to inform the server that the client is back online
    • Registration update with confirmable CoAP message (already have)

References:

  1. 6014

  2. OMA-TS-LightweightM2M-V1_0_1-20170704-A, Sec 8.3
SeppoTakalo commented 2 years ago

I believe that this has already been implemented. Queue mode with DTLS session resumption is already working.

Please see following PRs: