-
Notifications
You must be signed in to change notification settings - Fork 409
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. These 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)
(Some reasons to no use demo in a product)
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. We can change it at any moment even for minor or bugfix release.
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.
Leshan libraries are using SLF4J as logging facade, meaning that you can use any compatible backend for your application.
Our demos are using logback backend.
Since 2.0.0-M5 a verbosity option(-v, -vv , ...) allow to change log level.
To activate more logs for those demos, look at this or read logback documentation.
Old Client demo (before 2.0.0-M5) is using simple logger backend.
See Adding-new-objects.
See Request-Timeout.
See Server Failover.
See LWM2M observe.
See LWM2M-Devices-with-Dynamic-IP
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.
Developers team never tested it.
But we activate animal-sniffer-maven-plugin for ensure we don't use class which are not present in android, so we should be compliant with Android 4.4.2 (API level 19).
We also know there are some project/demo which are using leshan with android : leshan-android-demo, LwM2MDemoClientAndroid.
(see #573 for more details)
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. LWM2M 1.1 bring LWM2M over CoAP+tcp and LWM2M 1.2 bring it over MQTT and HTTP.
-
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). But with LWM2M 1.1/1.2 there is TCP(TLS) support too with CoAP+tcp, MQTT and HTTP as LWM2M transport layer. (There is ever Non-IP transport layer)
-
Theorically using CoAP over UDP should make LWM2M more adapted to constraint environment. In real world, IF(only 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).
(Some additional resources : Comparison and Evaluation of LwM2M and MQTT in Low-Power Wide-Area Networks.pdf by Alessandro Parmigiani)
Look a Using CoAP Block Wise to transfer large file ? wiki page.
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.