eclipse-leshan / leshan

Java Library for LWM2M
https://www.eclipse.org/leshan/
BSD 3-Clause "New" or "Revised" License
652 stars 407 forks source link

client update registration #516

Closed cyh2018git closed 6 years ago

cyh2018git commented 6 years ago

When I use my own client connecting to leshan server demo, I got the information below when I send command to my client:

"Unable to read resource xxx for yyy : 400 Invalid request:The destination client is sleeping, request cannot be sent."

and this happens a lot. What cause this problem?

sbernard31 commented 6 years ago

At registration time, your client says it uses Queue mode. (See the LWM2M spec to better understand what it is)

In queue mode, your can send request to client only after it just communicates otherwise it is considering as sleeping/absent.

To avoid this you can change the binding mode of your client from UQ to U.

cyh2018git commented 6 years ago

Thanks a lot!