Leshan is a OMA Lightweight M2M server and client java implementation.
What is OMA LWM2M ?
The specification.
Introduction to LWM2M.
Leshan provides libraries which help people to develop their own Lightweight M2M server and client.
The project also provides a client, a server and a bootstrap server demonstration as an example of the Leshan API and for testing purpose.
Join the project mailing list : subscribe.
Mail address: leshan-dev@eclipse.org.
Access to leshan-dev archives.
You can try live our servers demos instances:
- The lwm2m server at http://leshan.eclipse.org/
(coap://leshan.eclipse.org:5683 and coaps://leshan.eclipse.org:5684) - The bootstrap server at http://leshan.eclipse.org/bs/
(coap://leshan.eclipse.org:5783 and coaps://leshan.eclipse.org:5784)
(Automatic deployment of master branch)
Get and run the last binary of our demo server :
wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-standalone.jar
java -jar ./leshan-standalone.jar
Get and run the last binary of our demo client :
wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-client-example.jar
java -jar ./leshan-client-example.jar
Get and run the last binary of our boostrap demo server :
wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-bs-server.jar
java -jar ./leshan-bs-server.jar
mvn clean install
Run demo server:
java -jar target/leshan-standalone-*-SNAPSHOT-jar-with-dependencies.jar
Connect on Leshan demo UI: http://localhost:8080
Leshan provides a very simple UI to get the list of connected clients and interact with clients resources.
Now you can register a LWM2M client by running our client example:
java -jar target/leshan-client-example-*-SNAPSHOT-jar-with-dependencies.jar
or trying the Eclipse Wakaama test client or script samples of its lua binding [lualwm2m] (https://github.com/sbernard31/lualwm2m).
You can also try our bootstrap demo server:
java -jar target/leshan-bs-server-*-SNAPSHOT-jar-with-dependencies.jar
You need to add the M2_REPO to your java classpath variables. To do that you can execute the following command:
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
An eclipse restart is needed (if you already have it open).
You can also do that inside eclipse: From the menu bar, select Window > Preferences. Select the Java > Build Path > Classpath Variables page.
Now, you need to eclipsify leshan java projects,so run:
mvn eclipse:eclipse
Leshan-core
: commons elements.
Leshan-server-core
: server lwm2m logic.
Leshan-server-cf
: server implementation based on californium.
Leshan-client-core
: client lwm2m logic.
Leshan-client-cf
: client implementation based on californium.
Leshan-all
: every previous modules in 1 jar.
Leshan-client-example
: a simple demo client.
Leshan-standalone
: a lwm2m demo server with a web UI.
Leshan-bs-server
: a bootstarp demo server with a web UI.
Leshan-integration-tests
: integration automatic tests.