SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
Hands-on with Lightweight
M2M
Run a smartwatch on the Internet-of-Things
Agenda
Intro
CoAP & Lightweight M2M
Demo
Eclipse Leshan
Hands-on!
Eclipse Wakaama
Going further
Your devoted presenters
Julien Vermillard
Manuel Sangoï
Simon Bernard
Lightweight M2M
Open Mobile Alliance
Lightweight M2M - What is it?
A reboot of OMA-DM targeting M2M
Built on top of CoAP (RFC 7252) and DTLS (RFC 6347)
A REST API for device management and applications
Device management?
Operate, monitor, configure, upgrade fleets of
communicating objects
Device management
Firmware/software upgrade
Configure “OTA” the device
Monitor connectivity (signal, statistics,..)
Reboot, reset to factory
Rotate security keys
In a consistent way for different hardware
Based on CoAP?
The Constrained Application Protocol
A new protocol for a new world
Class 1 devices
~100KiB Flash
~10KiB RAM
Low-power networks
<100Bytes packets
Where old solutions doesn’t fit
Target
of less than $1
for IoT SoC
TCP and HTTP
are not a good fit
CoAP - RFC 7252
RESTful protocol designed from scratch
URIs, Internet Media Types
GET, POST, PUT, DELETE
Transparent mapping to HTTP
Additional features for M2M scenarios
Observe
Compact and binary
Binary protocol
- Low parsing complexity
- Small message size
Options
- Binary HTTP-like headers
0 – 8 Bytes Token
Exchange handle for client
4-byte Base Header
Version | Type | T-len | Code | ID
Options
Location, Max-Age, ETag, …
Marker
0xFF
Payload
Representation
CoAP Security
Based on DTLS 1.2 (TLS for Datagrams)
Focus on AES and Elliptic Curve Crypto (ECC)
Pre-shared secrets, X.509, or raw public keys
Hardware acceleration in IoT oriented SoC
LwM2M
An API on top of CoAP
Lightweight M2M
REST API for:
Security, Device, Server
Connectivity monitoring, Connectivity statistics
Location, Firmware Upgrade, Software management,
Swipe & Lock
But objects have a numerical identifier
LwM2M URLs
/{object}/{instance}/{resource}
Examples:
● "/6/0" the whole location object (binary record)
● "/6/0/1" only the longitude (degree)
Standard objects
Example: Device
Manufacturer
Model number
Serial number
Firmware version
Reboot
Factory reset
Power sources
Power V/A
Battery level
Memory free
Error code
Current time
UTC offset
Timezone
Custom objects
You can define your own objects
Discoverable using CoAP Link Format
IPSO Alliance Smart Objects:
accelerometer, temperature, sensors,...
Showtime!
The smartwatch demo
Eclipse Leshan
Lightweight M2M for Java
Leshan
Java library for implementing servers & clients
Friendly for any Java developer
Simple (no framework, few dependencies)
But also a Web UI for discovering and testing
Build using “mvn install”
Based on Californium and Scandium
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
LwM2M playground: Public sandbox
http://leshan.eclipse.org
Bleeding edge: deployed on master commit
IPv4 and IPv6
Press “CoAP messages” for low-level traces
Commiters
Simon Bernard - Sierra Wireless
Kai Hudalla - Bosch Software Innovations
Manuel Sangoï - Sierra Wireless
J.F. Schloman - Zebra Technologies, Zatar
Julien Vermillard - Sierra Wireless
Leshan Features
Client initiated bootstrap
Registration/Deregistration
Read, Write, Create objects
TLV encoding/decoding
OSGi friendly:
https://github.com/eclipse/leshan.osgi
Leshan security
DTLS Pre-Shared-Key
DTLS Raw-Public-Key
DTLS X.509
Maven modules
leshan-core commons elements
leshan-server-core server lwm2m logic
leshan-server-cf californium server
leshan-client-core client lwm2m logic
leshan-client-cf californium 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
Server API
// Build LWM2M server
lwServer = new LeshanServerBuilder().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");
Server API
// 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());
Implements your own store
ClientRegistry:
Store currently registered clients
SecurityRegistry:
Store security informations
Default implementations are “in-memory”
for demo only!
Client API
// Initialize object tree with device(3) and location(6) objects
List<ObjectEnabler> enablers = new ObjectsInitializer().create(3, 6);
// Create a client
LeshanClient client = new LeshanClient(new InetSocketAddress("127.0.0.1", 5683),
new ArrayList<LwM2mObjectEnabler>(enablers));
// Start it
client.start();
// Register to the server
RegisterResponse response = client.send(new RegisterRequest("myDevice"));
System.out.println("Response to register request from server : " + response.getCode());
Implements your own LwM2m Objects
Lwm2m Object instance are mapped on Java
instance.
Default implementation are just stupid mock for
demo only.
Hands-on!
Getting started
● Tutorial projects
From the USB stick
or
https://github.com/msangoi/leshan-tuto
● Launch Eclipse and import the projects
File > Import... > Existing projects into workspace
Step 1
Register a LWM2M client with a server
1. Complete the code
Send a registration request to the server
2. Run a local server (leshan standalone)
java -jar leshan-standalone.jar
Web UI available: http://localhost:8080/#/clients
3. Run the client
Step 2
Define your own Device standard object
1. Complete the code
a. Handle Read requests for some resources
(Manufacturer model, Current timestamp…)
b. Handle Write requests for Current timestamp resource
c. Handle Exec requests for Reboot resource
2. Run the client (same server as Step 1)
Step 3
Run a server synchronizing the current time of
each new registered client
1. Complete the code
a. Build a leshan server
b. Listen for new client registrations
c. Send a write request to synchronize the current time
of the client (resource with path /3/0/13)
2. Run the server
3. Test with the client from Step 2
Step 4
Observe the current time of a registered client
1. Update the client (from step 2) to notify when
the current time value has changed
2. Complete the server code
a. Listen for new observations and log the new value
when a new notification is received
b. Listen for new registrations and send an observe
request (path /3/0/13) to the new clients
Going further
Eclipse 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
Wakaama: Features
Register, registration update, deregister
Read, write resources
Read, write, create, delete object instances
TLV or plain text
Observe
Wakaama: Structure
core :
internals.h liblwm2m.c liblwm2m.h
list.c management.c objects.c observe.c
packet.c registration.c tlv.c transaction.c
uri.c utils.c
core/er-coap-13 :
er-coap-13.c er-coap-13.h
lwm2m_object_t * get_object_device()
{
lwm2m_object_t * deviceObj;
deviceObj = (lwm2m_object_t *)lwm2m_malloc(sizeof(lwm2m_object_t));
if (NULL != deviceObj)
{
memset(deviceObj, 0, sizeof(lwm2m_object_t));
deviceObj->objID = 3;
deviceObj->readFunc = prv_device_read;
deviceObj->writeFunc = prv_device_write;
deviceObj->executeFunc = prv_device_execute;
deviceObj->userData = lwm2m_malloc(sizeof(device_data_t));
if (NULL != deviceObj->userData)
{
((device_data_t*)deviceObj->userData)->time = 1367491215;
strcpy(((device_data_t*)deviceObj->userData)->time_offset, "+01:00");
}
else
{
lwm2m_free(deviceObj);
deviceObj = NULL;
}
}
return deviceObj;
}
Create objects!
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!
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
TinyDTLS
Eclipse Proposal
“Support session multiplexing in single-threaded
applications and thus targets specifically on
embedded systems.”
Examples for Linux, or Contiki OS
TLS_PSK_WITH_AES_128_CCM_8
TLS_ECDHE_ECDSA_WITH_AES128_CCM_8
In real hardware?
Spark Core:
Cortex-M3 STM32,
RAM/ROM 20/128k, 72MHz
WiFi
Arduino Mega
AVR, ATmega2560,
RAM/ROM 8/256k, 16MHz
Ethernet
Thank you!
Questions?
Hands on with lightweight m2m and Eclipse Leshan

Weitere ähnliche Inhalte

Was ist angesagt?

Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchKeira Zhou
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPYouness Boukouchi
 
Kamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficKamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficDaniel-Constantin Mierla
 
Enterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQEnterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQelliando dias
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013mumrah
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsBiju Nair
 
Distributed Tracing with Jaeger
Distributed Tracing with JaegerDistributed Tracing with Jaeger
Distributed Tracing with JaegerInho Kang
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsJulien Bataillé
 
NFF-GO (YANFF) - Yet Another Network Function Framework
NFF-GO (YANFF) - Yet Another Network Function FrameworkNFF-GO (YANFF) - Yet Another Network Function Framework
NFF-GO (YANFF) - Yet Another Network Function FrameworkMichelle Holley
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchTe-Yen Liu
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleMihai Criveti
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency CephShapeBlue
 
What's new with MQ on z/OS 9.3 and 9.3.1
What's new with MQ on z/OS 9.3 and 9.3.1What's new with MQ on z/OS 9.3 and 9.3.1
What's new with MQ on z/OS 9.3 and 9.3.1Matt Leming
 
Alphorm.com Formation Docker (1/2) : Installation et Administration
Alphorm.com Formation Docker (1/2) : Installation et AdministrationAlphorm.com Formation Docker (1/2) : Installation et Administration
Alphorm.com Formation Docker (1/2) : Installation et AdministrationAlphorm
 
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...NETWAYS
 

Was ist angesagt? (20)

Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & Elasticsearch
 
Appalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSPAppalications JEE avec Servlet/JSP
Appalications JEE avec Servlet/JSP
 
Kamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade TrafficKamailio - SIP Firewall for Carrier Grade Traffic
Kamailio - SIP Firewall for Carrier Grade Traffic
 
Enterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQEnterprise Messaging with Apache ActiveMQ
Enterprise Messaging with Apache ActiveMQ
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentals
 
Distributed Tracing with Jaeger
Distributed Tracing with JaegerDistributed Tracing with Jaeger
Distributed Tracing with Jaeger
 
Json Web Token - JWT
Json Web Token - JWTJson Web Token - JWT
Json Web Token - JWT
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL Endpoints
 
NFF-GO (YANFF) - Yet Another Network Function Framework
NFF-GO (YANFF) - Yet Another Network Function FrameworkNFF-GO (YANFF) - Yet Another Network Function Framework
NFF-GO (YANFF) - Yet Another Network Function Framework
 
spring-api-rest.pdf
spring-api-rest.pdfspring-api-rest.pdf
spring-api-rest.pdf
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image Lifecycle
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency Ceph
 
What's new with MQ on z/OS 9.3 and 9.3.1
What's new with MQ on z/OS 9.3 and 9.3.1What's new with MQ on z/OS 9.3 and 9.3.1
What's new with MQ on z/OS 9.3 and 9.3.1
 
Virtualization basics
Virtualization basics Virtualization basics
Virtualization basics
 
Alphorm.com Formation Docker (1/2) : Installation et Administration
Alphorm.com Formation Docker (1/2) : Installation et AdministrationAlphorm.com Formation Docker (1/2) : Installation et Administration
Alphorm.com Formation Docker (1/2) : Installation et Administration
 
spring-boot-fr.pdf
spring-boot-fr.pdfspring-boot-fr.pdf
spring-boot-fr.pdf
 
Oracle Cluster Rac
Oracle Cluster RacOracle Cluster Rac
Oracle Cluster Rac
 
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
 

Ähnlich wie Hands on with lightweight m2m and Eclipse Leshan

Manage all the things, small and big, with open source LwM2M implementations ...
Manage all the things, small and big, with open source LwM2M implementations ...Manage all the things, small and big, with open source LwM2M implementations ...
Manage all the things, small and big, with open source LwM2M implementations ...Benjamin Cabé
 
Automated Application Management with SaltStack
Automated Application Management with SaltStackAutomated Application Management with SaltStack
Automated Application Management with SaltStackinovex GmbH
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
Device Management with OMA Lightweight M2M
Device Management with OMA Lightweight M2MDevice Management with OMA Lightweight M2M
Device Management with OMA Lightweight M2MHannes Tschofenig
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppetbuildacloud
 
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCONMicroservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCONAdrian Cockcroft
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1Hajime Tazaki
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDNOpenStack Korea Community
 
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDNSungman Jang
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platformnirajrules
 
Automating CloudStack and hypervisor installation and configuration
Automating CloudStack and hypervisor installation and configurationAutomating CloudStack and hypervisor installation and configuration
Automating CloudStack and hypervisor installation and configurationDag Sonstebo
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Julien Vermillard
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comVan-Duyet Le
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyPuppet
 
Keeping your options open
Keeping your options openKeeping your options open
Keeping your options openDoug Tidwell
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
End-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTEnd-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTBenjamin Cabé
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginnersEnoch Joshua
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) serverDmitry Lyfar
 

Ähnlich wie Hands on with lightweight m2m and Eclipse Leshan (20)

Manage all the things, small and big, with open source LwM2M implementations ...
Manage all the things, small and big, with open source LwM2M implementations ...Manage all the things, small and big, with open source LwM2M implementations ...
Manage all the things, small and big, with open source LwM2M implementations ...
 
Deltacloud API
Deltacloud APIDeltacloud API
Deltacloud API
 
Automated Application Management with SaltStack
Automated Application Management with SaltStackAutomated Application Management with SaltStack
Automated Application Management with SaltStack
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
Device Management with OMA Lightweight M2M
Device Management with OMA Lightweight M2MDevice Management with OMA Lightweight M2M
Device Management with OMA Lightweight M2M
 
Automating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with PuppetAutomating Your CloudStack Cloud with Puppet
Automating Your CloudStack Cloud with Puppet
 
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCONMicroservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
 
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
Automating CloudStack and hypervisor installation and configuration
Automating CloudStack and hypervisor installation and configurationAutomating CloudStack and hypervisor installation and configuration
Automating CloudStack and hypervisor installation and configuration
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
 
Keeping your options open
Keeping your options openKeeping your options open
Keeping your options open
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
End-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoTEnd-to-end IoT solutions with Java and Eclipse IoT
End-to-end IoT solutions with Java and Eclipse IoT
 
NodeJS guide for beginners
NodeJS guide for beginnersNodeJS guide for beginners
NodeJS guide for beginners
 
Omaha (Google Update) server
Omaha (Google Update) serverOmaha (Google Update) server
Omaha (Google Update) server
 

Mehr von Julien Vermillard

The 5 elements of IoT security
The 5 elements of IoT securityThe 5 elements of IoT security
The 5 elements of IoT securityJulien Vermillard
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and CaliforniumJulien Vermillard
 
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?Julien Vermillard
 
IoT Toulouse : introduction à mqtt
IoT Toulouse : introduction à mqttIoT Toulouse : introduction à mqtt
IoT Toulouse : introduction à mqttJulien Vermillard
 
M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014
M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014
M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014Julien Vermillard
 
Introduction to CoAP the REST protocol for M2M
Introduction to CoAP the REST protocol for M2MIntroduction to CoAP the REST protocol for M2M
Introduction to CoAP the REST protocol for M2MJulien Vermillard
 

Mehr von Julien Vermillard (6)

The 5 elements of IoT security
The 5 elements of IoT securityThe 5 elements of IoT security
The 5 elements of IoT security
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
 
IoT Toulouse : introduction à mqtt
IoT Toulouse : introduction à mqttIoT Toulouse : introduction à mqtt
IoT Toulouse : introduction à mqtt
 
M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014
M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014
M2M, IoT, Device management: one protocol to rule them all? - EclipseCon 2014
 
Introduction to CoAP the REST protocol for M2M
Introduction to CoAP the REST protocol for M2MIntroduction to CoAP the REST protocol for M2M
Introduction to CoAP the REST protocol for M2M
 

Kürzlich hochgeladen

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Hands on with lightweight m2m and Eclipse Leshan

  • 1. Hands-on with Lightweight M2M Run a smartwatch on the Internet-of-Things
  • 2. Agenda Intro CoAP & Lightweight M2M Demo Eclipse Leshan Hands-on! Eclipse Wakaama Going further
  • 3. Your devoted presenters Julien Vermillard Manuel Sangoï Simon Bernard
  • 5. Lightweight M2M - What is it? A reboot of OMA-DM targeting M2M Built on top of CoAP (RFC 7252) and DTLS (RFC 6347) A REST API for device management and applications
  • 6. Device management? Operate, monitor, configure, upgrade fleets of communicating objects
  • 7. Device management Firmware/software upgrade Configure “OTA” the device Monitor connectivity (signal, statistics,..) Reboot, reset to factory Rotate security keys In a consistent way for different hardware
  • 8. Based on CoAP? The Constrained Application Protocol
  • 9. A new protocol for a new world Class 1 devices ~100KiB Flash ~10KiB RAM Low-power networks <100Bytes packets
  • 10. Where old solutions doesn’t fit Target of less than $1 for IoT SoC TCP and HTTP are not a good fit
  • 11. CoAP - RFC 7252 RESTful protocol designed from scratch URIs, Internet Media Types GET, POST, PUT, DELETE Transparent mapping to HTTP Additional features for M2M scenarios Observe
  • 12. Compact and binary Binary protocol - Low parsing complexity - Small message size Options - Binary HTTP-like headers 0 – 8 Bytes Token Exchange handle for client 4-byte Base Header Version | Type | T-len | Code | ID Options Location, Max-Age, ETag, … Marker 0xFF Payload Representation
  • 13. CoAP Security Based on DTLS 1.2 (TLS for Datagrams) Focus on AES and Elliptic Curve Crypto (ECC) Pre-shared secrets, X.509, or raw public keys Hardware acceleration in IoT oriented SoC
  • 14. LwM2M An API on top of CoAP
  • 15. Lightweight M2M REST API for: Security, Device, Server Connectivity monitoring, Connectivity statistics Location, Firmware Upgrade, Software management, Swipe & Lock But objects have a numerical identifier
  • 16. LwM2M URLs /{object}/{instance}/{resource} Examples: ● "/6/0" the whole location object (binary record) ● "/6/0/1" only the longitude (degree)
  • 17. Standard objects Example: Device Manufacturer Model number Serial number Firmware version Reboot Factory reset Power sources Power V/A Battery level Memory free Error code Current time UTC offset Timezone
  • 18. Custom objects You can define your own objects Discoverable using CoAP Link Format IPSO Alliance Smart Objects: accelerometer, temperature, sensors,...
  • 21. Leshan Java library for implementing servers & clients Friendly for any Java developer Simple (no framework, few dependencies) But also a Web UI for discovering and testing Build using “mvn install” Based on Californium and Scandium
  • 22. 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
  • 23. LwM2M playground: Public sandbox http://leshan.eclipse.org Bleeding edge: deployed on master commit IPv4 and IPv6 Press “CoAP messages” for low-level traces
  • 24. Commiters Simon Bernard - Sierra Wireless Kai Hudalla - Bosch Software Innovations Manuel Sangoï - Sierra Wireless J.F. Schloman - Zebra Technologies, Zatar Julien Vermillard - Sierra Wireless
  • 25. Leshan Features Client initiated bootstrap Registration/Deregistration Read, Write, Create objects TLV encoding/decoding OSGi friendly: https://github.com/eclipse/leshan.osgi
  • 26. Leshan security DTLS Pre-Shared-Key DTLS Raw-Public-Key DTLS X.509
  • 27. Maven modules leshan-core commons elements leshan-server-core server lwm2m logic leshan-server-cf californium server leshan-client-core client lwm2m logic leshan-client-cf californium 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
  • 28. Server API // Build LWM2M server lwServer = new LeshanServerBuilder().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");
  • 29. Server API // 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());
  • 30. Implements your own store ClientRegistry: Store currently registered clients SecurityRegistry: Store security informations Default implementations are “in-memory” for demo only!
  • 31. Client API // Initialize object tree with device(3) and location(6) objects List<ObjectEnabler> enablers = new ObjectsInitializer().create(3, 6); // Create a client LeshanClient client = new LeshanClient(new InetSocketAddress("127.0.0.1", 5683), new ArrayList<LwM2mObjectEnabler>(enablers)); // Start it client.start(); // Register to the server RegisterResponse response = client.send(new RegisterRequest("myDevice")); System.out.println("Response to register request from server : " + response.getCode());
  • 32. Implements your own LwM2m Objects Lwm2m Object instance are mapped on Java instance. Default implementation are just stupid mock for demo only.
  • 34. Getting started ● Tutorial projects From the USB stick or https://github.com/msangoi/leshan-tuto ● Launch Eclipse and import the projects File > Import... > Existing projects into workspace
  • 35. Step 1 Register a LWM2M client with a server 1. Complete the code Send a registration request to the server 2. Run a local server (leshan standalone) java -jar leshan-standalone.jar Web UI available: http://localhost:8080/#/clients 3. Run the client
  • 36. Step 2 Define your own Device standard object 1. Complete the code a. Handle Read requests for some resources (Manufacturer model, Current timestamp…) b. Handle Write requests for Current timestamp resource c. Handle Exec requests for Reboot resource 2. Run the client (same server as Step 1)
  • 37. Step 3 Run a server synchronizing the current time of each new registered client 1. Complete the code a. Build a leshan server b. Listen for new client registrations c. Send a write request to synchronize the current time of the client (resource with path /3/0/13) 2. Run the server 3. Test with the client from Step 2
  • 38. Step 4 Observe the current time of a registered client 1. Update the client (from step 2) to notify when the current time value has changed 2. Complete the server code a. Listen for new observations and log the new value when a new notification is received b. Listen for new registrations and send an observe request (path /3/0/13) to the new clients
  • 40. Eclipse 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
  • 41. Wakaama: Features Register, registration update, deregister Read, write resources Read, write, create, delete object instances TLV or plain text Observe
  • 42. Wakaama: Structure core : internals.h liblwm2m.c liblwm2m.h list.c management.c objects.c observe.c packet.c registration.c tlv.c transaction.c uri.c utils.c core/er-coap-13 : er-coap-13.c er-coap-13.h
  • 43. lwm2m_object_t * get_object_device() { lwm2m_object_t * deviceObj; deviceObj = (lwm2m_object_t *)lwm2m_malloc(sizeof(lwm2m_object_t)); if (NULL != deviceObj) { memset(deviceObj, 0, sizeof(lwm2m_object_t)); deviceObj->objID = 3; deviceObj->readFunc = prv_device_read; deviceObj->writeFunc = prv_device_write; deviceObj->executeFunc = prv_device_execute; deviceObj->userData = lwm2m_malloc(sizeof(device_data_t)); if (NULL != deviceObj->userData) { ((device_data_t*)deviceObj->userData)->time = 1367491215; strcpy(((device_data_t*)deviceObj->userData)->time_offset, "+01:00"); } else { lwm2m_free(deviceObj); deviceObj = NULL; } } return deviceObj; } Create objects!
  • 44. 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!
  • 45. 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
  • 46. TinyDTLS Eclipse Proposal “Support session multiplexing in single-threaded applications and thus targets specifically on embedded systems.” Examples for Linux, or Contiki OS TLS_PSK_WITH_AES_128_CCM_8 TLS_ECDHE_ECDSA_WITH_AES128_CCM_8
  • 48. Spark Core: Cortex-M3 STM32, RAM/ROM 20/128k, 72MHz WiFi Arduino Mega AVR, ATmega2560, RAM/ROM 8/256k, 16MHz Ethernet