Eclipse Leshan is an OMA Lightweight M2M (LWM2M) implementation in Java.
Java JavaScript HTML CSS
Latest commit 9f6bd6e May 3, 2017 @boaks boaks committed with sbernard31 Remove stale response listener.
Not longer supported.

Signed-off-by: Achim Kraus <achim.kraus@bosch-si.com>
Permalink
Failed to load latest commit information.
eclipse Remove unnecessary casts and warn about them Feb 3, 2017
leshan-all Update model, load only core objects by default, demos load more objects Mar 30, 2017
leshan-bsserver-demo Rename serverPublicKeyOrId to serverPublicKey to align with spec Apr 25, 2017
leshan-client-cf Log Client endpoint in client demo. Apr 25, 2017
leshan-client-core Log Client endpoint in client demo. Apr 25, 2017
leshan-client-demo Return more demo device data Mar 31, 2017
leshan-core-cf Use str.format like constructor for cancelled-rejected-timeout expection Apr 12, 2017
leshan-core #331: Fix memory consumption issue in DefaultLwM2mNodeEncoder. Apr 25, 2017
leshan-integration-tests Clean up old PSK id when changing id for existing endpoint Apr 25, 2017
leshan-server-cf Use ObservationUtil shallowClone() instead of serialize/parse. Apr 28, 2017
leshan-server-cluster Error message fixes Apr 26, 2017
leshan-server-core Remove stale response listener. May 18, 2017
leshan-server-demo Error message fixes Apr 26, 2017
.gitignore Add cfg parameter and use json format for bootstrap server config file Mar 21, 2016
CONTRIBUTING.md contribution guide Feb 11, 2015
README.md add leshan-code-cf to list of modules in the readme. Feb 20, 2017
about.html Initial contribution Feb 7, 2015
edl-v10 Initial contribution Feb 7, 2015
epl-v10 Initial contribution Feb 7, 2015
notice.html Initial contribution Feb 7, 2015
pom.xml Adopt changes in DTLSConnector constructors. Mar 20, 2017

README.md

Build Status

Leshan

Eclipse Leshan™ is an OMA Lightweight M2M server and client Java implementation.

What is OMA LWM2M ?
The specification.
Object and Resource Registry.

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.

Contact

Join the project mailing list : subscribe.
Mail address: leshan-dev@eclipse.org.
Access to leshan-dev archives.

Test Server Sandbox

You can try live our servers demos instances:

(Automatic deployment of master branch)

Test Leshan locally

Get and run the last binary of our demo server :

wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-server-demo.jar
java -jar ./leshan-server-demo.jar

Get and run the last binary of our demo client :

wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-client-demo.jar
java -jar ./leshan-client-demo.jar

Get and run the last binary of our bootstrap demo server :

wget https://hudson.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-bsserver-demo.jar
java -jar ./leshan-bsserver-demo.jar

Compile & Run

mvn clean install

Run demo server:

java -jar leshan-server-demo/target/leshan-server-demo-*-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 demo:

java -jar leshan-client-demo/target/leshan-client-demo-*-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 leshan-bsserver-demo/target/leshan-bsserver-demo-*-SNAPSHOT-jar-with-dependencies.jar 

Leshan

Code with eclipse

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

Modules

leshan-core : commons elements.
leshan-core-cf : commons elements which depend on californium.
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-demo : a simple demo client.
leshan-server-demo : a lwm2m demo server with a web UI.
leshan-bsserver-demo : a bootstarp demo server with a web UI.
leshan-integration-tests : integration automatic tests.