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

The demo server can't communicate with connected devices #1650

Closed max-pv closed 2 months ago

max-pv commented 2 months ago

Version(s)

baa124fda5f7145f18ff82a5981d70aa1f28e922

Which components

Leshan Server Demo

Tested With

Leshan Client Demo (leshan-2.0.0-M16)

What happened

When the client is connected without the -q option, the server can not communicate with the device. Constantly getting "Device is not awake" alert.

I think this issue is caused by this commit: baa124fda5f7145f18ff82a5981d70aa1f28e922. On my local machine I reset this commit, and I can communicate with Leshan Demo Client (this is also reproducible with Anjay client, which I assume means will be reproducible by any LwM2M client, including Wakaama).

How to reproduce

Device is not in "queue mode"

  1. Start the Leshan Server Demo (without args)
  2. Start the Leshan Client Demo (without args)
  3. Go the connected device in the Demo, attempt to read any resource
  4. See the "Device is not awake" alert (which doesn't make sense - the device is currently connected)

Device is in "queue mode"

  1. Start the Leshan Server Demo (without args)
  2. Start the Leshan Client Demo with -q argument
  3. Go the connected device in the Demo, attempt to read any resource
  4. Observe that there are no issues
sbernard31 commented 2 months ago

Thx a lot for taking time to report this bug ! :pray: That's really help !

I will fix that now.

sbernard31 commented 2 months ago

This should be fixed in master by 7a52fbf100b9fc7072f99f2d906e381c89819ad1. Leshan sandbox will be automatically redeploy in few minutes and so fixed too.

Thx again for reporting that.

max-pv commented 2 months ago

@sbernard31 Thanks for the quick fix, really appreciate it!