-
Notifications
You must be signed in to change notification settings - Fork 408
F.A.Q.
Eclipse Leshan™ is an OMA Lightweight M2M server and client Java implementation.
This is a not standalone server and client but a set of java libraries which help people to develop their own Lightweight M2M server and client. So to use Leshan, you need to write java code!
Leshan demos are a good way to explore LWM2M or quickly test interoperability but this should not be reused for production. This are just demos. There is no effort about scalability and they could be completely modify between 2 releases. However you could look at the code as an example of the Leshan API.
(It's still not clear see this discussion)
Yes, there is, but as explained above we don't encourage you to use it. This API is just here to be used by our Web UI demos.
If you still want to use it, it is available at http://yourhost:8080/api/*.
E.g. :
- http://localhost:8080/api/clients to get all registered clients.
-
http://localhost:8080/api/clients/endpointname to get the registration of the
endpointname
client. -
http://localhost:8080/api/clients/endpointname/3/0/1 to read the resource /3/0/1 of
endpointname
registered client.
To explore all the API, the easy way is to use web development tools of your browser(like firefox) and see REST request sent when using the leshan-*-demo web UI.
See Adding-new-objects.
See Request-Timeout.
See Server Failover.
See LWM2M observe.
Meaning the time during Leshan server consider the device present when using queue mode.
The default value is 93000ms but you could change this value :
builder.setClientAwakeTimeProvider(new StaticClientAwakeTimeProvider(60000));
This is out of the spec but you could see how to have a dynamic per client awake time here.
See Using-Leshan-server-in-a-cluster.
See https://github.com/eclipse/leshan/issues/563.
-
LWM2M and MQTT are not really at same level. This would be more relevant to compare CoAP and MQTT. MQTT is just a communication protocol and does not define data meaning. LWM2M talk about device, location, firmware update, bootstrap devices ... This makes probably MQTT more flexible but less interoperable than LWM2M. Some time ago there was discussion about doing LWM2M over MQTT. (like there is LWM2M over CoAP+tcp in LWM2M v1.1)
-
LWM2M is mainly designed for device management but you could use it for application management. MQTT is just a publish/subscribe protocol.
-
In LWM2M 1.0, only CoAP is supported. This means LWM2M run over UDP(DTLS) and MQTT over TCP(TLS).
-
Theorically using CoAP over UDP should make LWM2M more adapted to constraint environment. In real world, IF you begin to use all the available features (CoAP observe/CoAP blockwise transfer/ DTLS role exchange ...), this is maybe not so true.
-
In LWM2M 1.0, requests are mainly sent by the server. Server send READ, WRITE. If you need to send data from device to server, this is no so adapted. You can eventually fiddle with OBSERVE but this is not so good. LWM2M 1.1 fix this "issue" by adding the SEND request (from device to server).
All contributions you make to our web site (including this wiki) are governed by our Terms of Use, so please take the time to actually read it. Your interactions with the Eclipse Foundation web properties and any information you may provide us about yourself are governed by our Privacy Policy.