MCPcopy Index your code
hub / github.com/eclipse-leshan/leshan

github.com/eclipse-leshan/leshan @leshan-2.0.0-M18

Chat with this repo
repository ↗ · DeepWiki ↗ · release leshan-2.0.0-M18 ↗ · + Follow
7,039 symbols 29,110 edges 959 files 1,381 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OpenSSF Scorecard OpenSSF Best Practices Quality Gate Status

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

What is OMA LWM2M ?
LWM2M Specifications.

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.

| LWM2M Version

Targeted | Leshan

Version | Minimal

Java Version | Development

State | Build Status | Standalone

Demos | | - | - | - | - | - | - | | v1.0.x | v1.x

Supported features | Java 7 (more details) | stable released | jenkins-1.x | server-demo

client-demo

bsserver-demo | | v1.1.x| v2.x (master)

Supported features | Java 8 (more details) | in development |jenkins-master | server-demo

client-demo

bsserver-demo |

Release (stable and milestones) are available on maven central.
Nightly build (snapshot) are available on eclipse repo. (more details)

The Leshan Documentation is available in our wiki :blue_book:.

Contact

If you have any questions, feedback or bugs to report, please use github issue.
For vulnerabilities, have a look at our Security Policy.
If you want to contribute, take a look at our Contribution Guide.

We also have a mail list but it is not so much used : Join the project mailing list : subscribe.
Mail address: leshan-dev@eclipse.org.
Access to leshan-dev archives.

License

This work is dual-licensed under the Eclipse Public License v2.0 and Eclipse Distribution License v1.0

SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause

Test Server Sandbox

You can try live our servers demos instances:

  • The lwm2m server at https://leshan.eclipseprojects.io/
    (coap://leshan.eclipseprojects.io:5683 and coaps://leshan.eclipseprojects.io:5684)
  • The bootstrap server at https://leshan.eclipseprojects.io/bs/
    (coap://leshan.eclipseprojects.io:5783 and coaps://leshan.eclipseprojects.io:5784)

(Automatic deployment of master branch)

Leshan

Test Leshan Demos locally

Get and run the last binary of our demo server :

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

Get and run the last binary of our demo client :

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

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

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

:information_source: : All the demos have a --help option.

Compile Leshan & Run Demos

Get sources :

#using ssh
git clone git@github.com:eclipse/leshan.git

or

#using https
git clone https://github.com/eclipse/leshan.git

Compile it, by running in leshan root folder :

mvn clean install

Run demo server:

java -jar leshan-demo-server/target/leshan-demo-server-*-SNAPSHOT-jar-with-dependencies.jar 

Connect on Leshan demo UI: http://localhost:8080
Leshan server Demo 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-demo-client/target/leshan-demo-client-*-SNAPSHOT-jar-with-dependencies.jar 

or trying the Eclipse Wakaama test client.

You can also try our bootstrap demo server:

java -jar leshan-demo-bsserver/target/leshan-demo-bsserver-*-SNAPSHOT-jar-with-dependencies.jar 

Let's start to code !

Now you played a bit with our demo, you should start to code your own server or client using our Getting-started guide.

Extension points exported contracts — how you extend this code

Authorizer (Interface)
This class is responsible to authorize up-link request from LWM2M client. [6 implementers]
leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/security/Authorizer.java
CriteriaBasedOnValueChecker (Interface)
A CriteriaBasedOnValueChecker MUST evaluate new value based on Notification LwM2mAttribute and previous [7 implementers]
leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/notification/checker/CriteriaBasedOnValueChecker.java
BootstrapHandlerFactory (Interface)
Creates BootstrapHandler. @see DefaultBootstrapHandler [10 implementers]
leshan-lwm2m-bsserver/src/main/java/org/eclipse/leshan/bsserver/BootstrapHandlerFactory.java
ServerEndpointNameProvider (Interface)
Since LWM2M v1.1, endpoint name is optional in REGISTER and BOOTSTRAP request. An ServerEndpointNameProvider is [7 implementers]
leshan-lwm2m-servers-shared/src/main/java/org/eclipse/leshan/servers/ServerEndpointNameProvider.java
DownlinkBootstrapRequest (Interface)
A Downlink Bootstrap Lightweight M2M request. This is a request sent from server to client to interact with the clie [29 …
leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/request/DownlinkBootstrapRequest.java
CoapResponseCallback (Interface)
On success callback for request. [13 implementers]
leshan-tl-cf-shared/src/main/java/org/eclipse/leshan/transport/californium/CoapResponseCallback.java
OscoreStore (Interface)
(no doc) [6 implementers]
leshan-tl-cf-shared-oscore/src/main/java/org/eclipse/leshan/transport/californium/oscore/cf/OscoreStore.java
CaliforniumBootstrapServerEndpointFactory (Interface)
(no doc) [6 implementers]
leshan-tl-cf-bsserver-coap/src/main/java/org/eclipse/leshan/transport/californium/bsserver/endpoint/CaliforniumBootstrapServerEndpointFactory.java

Core symbols most depended-on inside this repo

Shape

Method 5,890
Class 918
Interface 162
Function 38
Enum 31

Languages

Java99%
TypeScript1%

Modules by API surface

leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/util/cf/LockstepEndpoint.java170 symbols
leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/node/codec/LwM2mNodeDecoderTest.java79 symbols
leshan-lwm2m-server-redis/src/main/java/org/eclipse/leshan/server/redis/RedisRegistrationStore.java71 symbols
leshan-lwm2m-server/src/main/java/org/eclipse/leshan/server/registration/Registration.java50 symbols
leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/engine/DefaultRegistrationEngine.java42 symbols
leshan-lwm2m-core/src/main/java/org/eclipse/leshan/core/node/LwM2mNodeUtil.java39 symbols
leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/security/X509Test.java39 symbols
leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/resource/BaseObjectEnabler.java36 symbols
leshan-integration-tests/src/test/java/org/eclipse/leshan/integration/tests/util/LeshanTestClientBuilder.java35 symbols
leshan-lwm2m-core/src/test/java/org/eclipse/leshan/core/datatype/NumberUtilTest.java33 symbols
leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/object/LwM2mTestObject.java33 symbols
leshan-lwm2m-client/src/main/java/org/eclipse/leshan/client/LeshanClient.java32 symbols

For agents

$ claude mcp add leshan \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page