Julien Vermillard from Sierra Wireless presented during the Open Mobile Alliance LwM2M Workshop event on January 28, 2015. This is a copy of the slides presented for his session titled, "OMA LwM2M Projects in Eclipse Foundation".
2. Julien Vermillard / @vrmvrm
Software Engineer at Sierra Wireless
http://airvantage.net M2M Cloud
Apache foundation member
Eclipse committer on Californium, Wakaama
Eclipse Leshan project lead
3. Eclipse Foundation & Eclipse IoT
Open Standards and Open Source for the Internet of Things
5-Nov-2014
4. Eclipse History
• Launched by IBM in 2001
– Initial release of the Eclipse technology platform (Platform,
JDT,PDT)
– Founding consortium board comprised Borland, IBM, Red
Hat, …
• Eclipse Foundation formed in 2004
– Independent not-for-profit organization formed in 2004
– Definition of bylaws, membership model, initial IP process
• Eclipse Foundation today, 2014
– Members include IBM, Oracle, SAP, CA, Google, Bosch, etc.
– 204 members, (10 strategic members), ~1000 committers
– ~270 Open Source Projects
2Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
5. Eclipse at a Glance
• Organization
– 501(c)6 not-for-profit, USA (Delaware) incorporated,
headquarters in Ottawa, Canada
– 18 employees
• License
– Eclipse Public License is the default
– Other licenses possible by approval of the Board
• Focus areas
– Most project implementations are in Java, but starting to
move into web (JavaScript) and C/C++
– “Eclipse plug-in model”
– Development tools, modeling tools, runtimes, web
development, IoT, Cloud
3Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
6. Eclipse: a sustainable ecosystem
“Eclipse is a vendor-neutral consortium of major
software vendors, solution providers,
corporations, educational and research institutions
and individuals working together
to create a sustainable eco-system that enhances,
promotes and cultivates the Eclipse open platform
with complementary products, services and capabilities.”
4Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
7. Governance
IP Mgt
& Licensing
Projects &
Process
Ecosystem
Development
Infrastructure
What do you need for open
collaboration?
5Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
8. Governanc
e
IP Mgt
& Licensing
Projects &
Process
Ecossytem
Developmen
t
Infra-
structure
Eclipse Working Groups
• Eclipse is the industry’s best model for vendor-
neutral collaboration
• Eclipse Working Groups:
– Licensing model for sharing co-developed innovation
– IP management to maximize commercialization opportunities
– Project model for coordinating investments and activities
– Governance model to ensure a level playing field for all participants
Eclipse gives you these “out of the box”
6Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
9. 7Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0
10. IoT Architectures
Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 8
New and existing
devices
IoT Gateways Backend systemsNetwork carriers
11. Open Source, Open Standards and Community
for IoT
IoT Architectures
Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 9
New and existing
devices
IoT Gateways Backend systemsNetwork carriers
12. Protocols
• MQTT
– OASIS standard
– Client and server implementations in Paho,
Mosquitto and Moquette
– Wide commercial adoption: IBM MessageSight,
Facebook Messenger, Eurotech ESF, Sierra Wireless
AirVantage, …
• CoAP
– IETF standard
– Java implementation in Californium
– Lots of traction in the WSN space (Thingsquare,
Everythng, …)
– Foundation for LWM2M – supported by
Sierra Wireless, Bosch SI, Zebra Technologies
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 10
13. Frameworks
• Application framework for IoT: Kura
– Built on top of Java and OSGi
– Foundation for Eurotech’s Everyware Software
Framework
• ETSI SmartM2M and oneM2M
implementation: OM2M
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 11
14. Solutions
• Home Automation: Eclipse SmartHome
– Based on Java and OSGi
– Very active community with ~100 home automation
driver implementations
– Foundation for Deutsche Telekom’s QIVICON
• IoT network management: Krikkit
– Rules engine for IoT devices
– Powering Cisco’s Data in Motion.
• Industrial control: EclipseSCADA
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 12
15. Tools
• Eclipse Vorto
– Information model for « things » + code generators
– Bosch SI leading
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 13
16. Eclipse IoT Members
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 14
17. Eclipse IoT in Numbers
• 17 projects
• 90+ committers & contributors
• 1.7 Million lines of code
• 700K+ combined unique visitors
• 3 developer sandboxes (MQTT, CoAP, LWM2M)
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 15
18. iot.eclipse.org
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 16
19. Thanks! Questions?
5 June 2014 Copyright (c) 2014, Eclipse Foundation, Inc. Made available under the Eclipse Public License 1.0 17
21. Directly as a library?
Copy/pasted some code? Like TLV parser?
Testing?
Leshan: Who is using it?
?
22. Leshan
A Java library for implementing LwM2M
servers (and clients)
Friendly for any Java developer (no framework,
few dependencies)
But also a Web UI for discovering and testing
the protocol
23. History
Started 22 Jul. 2013 @ Sierra Wireless
First external contribution 10 March 2014
Public sandbox Jul. 2014
Proposed as an Eclipse project Sep. 2014
Client contributed Oct. 2014
25. Committers
Simon Bernard - Sierra Wireless
Kai Hudalla - Bosch Software Innovations
J.F. Schloman - Zebra Technologies, Zatar
Manuel Sangoï - Sierra Wireless
Julien Vermillard - Sierra Wireless
28. Modules
leshan-core commons elements
leshan-server-core server lwm2m logic
leshan-server-cf californium server
leshan-client client
leshan-all everything above in 1 jar
leshan-client-example
leshan-standalone application with web UI
leshan-bs-server standalone bootstrap
leshan-integration-tests
29. Server
Simple Java library
Build using “mvn install”
Based on Californium and Scandium
Under refactoring for accepting other CoAP lib
30. Server API example
public void start() {
// Build LWM2M server
LeshanServerBuilder builder = new LeshanServerBuilder();
lwServer = builder.build();
lwServer.getClientRegistry().addListener(new ClientRegistryListener() {
@Override
public void registered(Client client) {
System.out.println("New registered client with endpoint: " + client.getEndpoint());
}
@Override
public void updated(Client clientUpdated) {
System.out.println("Registration updated”);
}
@Override
public void unregistered(Client client) {
System.out.println("Registration deleted”);
}
});
// start
lwServer.start();
System.out.println("Demo server started");
}
31. Server API example
// prepare the new value
LwM2mResource currentTimeResource = new LwM2mResource(13,
Value.newDateValue(new Date()));
// send a write request to a client
WriteRequest writeCurrentTime = new WriteRequest(client, 3, 0, 13,
currentTimeResource, ContentFormat.TEXT, true);
ClientResponse response = lwServer.send(writeCurrentTime);
System.out.println("Response to write request from client " +
client.getEndpoint() + ": " + response.getCode());
32. Implements your own store
ClientRegistry:
Store currently registered clients
SecurityRegistry:
Store security informations
Default implementations are “in-memory”
for demo only!
33. Client
Under construction! API will probably change
Create objects, answer to server requests
DTLS supported in master
Checkout: leshan-client-example
35. How to help?
Use it! Report bugs, issue, missing features
Write documentation
Talk about it (in your company, IoT meetup,...)
Contribute code
Questions?
https://dev.eclipse.org/mailman/listinfo/leshan-dev
37. Wakaama: Who is using it?
Directly as a library?
Copy/pasted some code?
Testing?
?
38. Wakaama
A C client and server implementation of LwM2M
Not a shared library (.so/.dll)
Embedded friendly but using malloc/free
Plug your own IP stack and DTLS implementation
39. History
Started as liblwm2m by Intel on May 2013
https://github.com/01org/liblwm2m
Proposed as Eclipse project Dec. 2013
Code imported at Eclipse July 2014
45. objArray[0] = get_object_device();
if (NULL == objArray[0])
{
fprintf(stderr, "Failed to create Device objectrn");
return -1;
}
objArray[1] = get_object_firmware();
if (NULL == objArray[1])
{
fprintf(stderr, "Failed to create Firmware objectrn");
return -1;
}
objArray[2] = get_test_object();
if (NULL == objArray[2])
{
fprintf(stderr, "Failed to create test objectrn");
return -1;
}
lwm2mH = lwm2m_init(prv_connect_server, prv_buffer_send, &data);
if (NULL == lwm2mH)
{
fprintf(stderr, "lwm2m_init() failedrn");
return -1;
}
result = lwm2m_configure(lwm2mH, "testlwm2mclient", BINDING_U, NULL, OBJ_COUNT, objArray);
...
result = lwm2m_start(lwm2mH);
Configure
Wakaama
46. while (0 == g_quit)
{
struct timeval tv;
tv.tv_sec = 60;
tv.tv_usec = 0;
/*
* This function does two things:
* - first it does the work needed by liblwm2m (eg. (re)sending some packets).
* - Secondly it adjust the timeout value (default 60s) depending on the state of the transaction
* (eg. retransmission) and the time between the next operation
*/
result = lwm2m_step(lwm2mH, &tv);
if (result != 0)
{
fprintf(stderr, "lwm2m_step() failed: 0x%Xrn", result);
return -1;
}
Active loop