SlideShare uma empresa Scribd logo
1 de 43
Baixar para ler offline
Using Eclipse & Lua for the
Internet of Things
Benjamin Cabé
bcabe@sierrawireless.com
Who I am
•  Benjamin Cabé
•  Open Source M2M
Evangelist at Sierra Wireless
•  Long-time Eclipse lover
❝
M2M? IoT?
Technology that supports
wired or wireless
communication
between devices
Smart
Pill
Box
Heartbeat
Sensor
Weight
Scale
Blood
Pressure
Medical
Services
Gateway
Near field
Blood
Sugar
Internet
of Things
Patient
Clinical Trial
Doctor
Framework
Tools
3 projects
Protocols
M2M embedded
programming
•  low-level C
•  memory
management
•  multithreaded
programming
•  read sensor values
•  control actuators
•  consolidate data
•  communicate
Example: Sending an SMS
int main()	
{	
unsigned char char1[10];	
unsigned char char_buf[8]="AT+CSQn";	
// unsigned char sms_buf[20] = "AT+CMGS="xxxxxxxxx";	
	
int wc_fd;	
/********* Init of serial port ************/	
wc_fd = init_wc(wc_fd);	
sleep(3);	
//writing to serial port	
write(wc_fd,char_buf,sizeof(char_buf));	
usleep(40000);	
//reading from serial port	
read(wc_fd,char1,sizeof(char1));	
	
sleep(2);	
close(wc_fd);	
	
return 0;	
} // end of main	
	
// initialization of serial port	
	
struct termios options;	
	
ttys5_fd = open("/dev/ttyS5", O_RDWR );	
if (ttys5_fd < 0)	
sms.send(

'+33612345678’,

'My SMS’

)
Simplify M2M programming
What is Lua?
•  High-level programming language
•  Scripting
•  Simple
•  Extensible
•  Portable
Extensible by design
•  Small
– Trivial syntax and reduced keyword set
•  Simple but not stupid
– Simple enough for new users, powerful enough
for advanced users (first-class functions,
garbage collection, closures, tail calls, coercion,
coroutines, metatables)
•  Lua core is tiny
– Compiled size is ~150kB
– Lua uses libraries for its extensions
Lua vs. other high-level languages
•  Same core features as Python, Ruby,
Javascript 
•  Better concurrency management
– Built-in – doesn’t rely on the OS
•  Cutting-edge execution technology &
performances
Lua vs. other high-level languages
•  Restricted set of libraries
– Stay simple, the developer brings his own 
•  Designed for C integration
– Performance
– Legacy
Lua for embedded and M2M?
•  High-level languages usually trade
hardware resources for development &
maintenance resources
Lua allows to reconcile high-level
languages accomplishments
with embedded constraints
You need an IDE!
•  Project structure
•  Syntax coloring
•  Content assist
•  Code navigation
•  Code formatting
•  Documentation
•  Code templates
•  Debugger
•  Remote development
•  Embedded interpreter
June 2012: first release (0.8)
Dec. 2012: 0.9 release
June 2013: graduate w/ Kepler
60,000+ installations already! (Apr. 2013)
DEMO
Using Koneki LDT for
remote Lua development
101
•  http://www.eclipse.org/koneki/ldt
•  Download standalone IDE
•  Or install in existing Eclipse
–  from Juno repository (0.8.2)
–  from nightly/milestones repositories (1.0M1)
•  Execution environments on Koneki wiki
–  http://goo.gl/f6T80 
•  Contact the team
–  http://eclipse.org/forums/eclipse.koneki
http://www.sxc.hu/photo/1036004
•  Messaging protocol
•  Low-bandwidth / Low-power
•  Payload agnostic
•  Adjustable QoS
•  Large ecosystem
broker broker
(optional) bridge
publish
subscribe
keepalive
last will & testament
username/password
topic/subtopic
topic/#
M3DA Overview
Compact … because in the wireless world, data overhead costs money
–  Efficient in the transport of binary M2M data
Interoperable … because the M2M communication chain is heterogeneous
–  Language-independent
–  Tolerant to data schema changes
–  Agnostic to transport layer (TCP, HTTP, SMS, …)
Secure … because security is #1 concern for M2M adopters
–  Ensure integrity and confidentiality of customer data
–  Message ticket-id to enable acknowledgement
Open … because vendor lock-in hinders M2M adoption
–  Open specification
–  Open-source, royalty-free, implementations
101
•  http://eclipse.org/paho/
•  Free brokers hosted at Eclipse:
m2m.eclipse.org
•  Contact the team
– paho-dev mailing-list
Lua VM + a Paho client to go?
Application framework for M2M
•  Set of libraries providing building blocks
to develop M2M applications:
– Serial and I/O management, 
– Networking (FTP, HTTP, e-mail, …),
– GPS, 
– Cryptography, 
– Modbus, 
– Local storage
– etc.
 http://www.eclipse.org/mihini
Smart agent for M2M
•  M2M data queues
•  Network bearers
•  Device management
•  Application container
•  Application configuration
http://www.eclipse.org/mihini
Overall architecture
Asset management
•  User applications use an API to
communicate with Mihini
– Send data or events
– Register listeners to handle data writing or
commands
•  The Mihini agent takes care of network
connection, buffering and reliable
storage of unsent data, etc.
Asset management
local gh_asset = asset_mgt.newAsset("greenhouse")
gh_asset:start()
gh_asset:pushdata("sensors.temperature", 22, "now")
gh_asset:pushdata("sensors.humidity", 89, "hourly")
Device management
•  A Tree Manager presents device's data
as
– variables,
– organized in a hierarchical tree,
– that can be read, written, and monitored for
changes by user applications.
Device management
local devicetree = require 'devicetree'
local APN = 'system.cellular.apn.apn'
local RSSI = 'system.cellular.link.rssi'
local apn = devicetree.get (APN)
log(LOG_NAME, "INFO", "Configure APN: %s", apn)
local function print_callback (values)
for name, value in pairs(values) do
log (LOG_NAME, "INFO",
" - Variable %s changed: %s",name, value)
end
end
devicetree.register(RSSI, print_callback)
devicetree.set(APN, 'foo')
Application Management
•  Language-agnostic application
container
– install/uninstall
– start/stop, auto-start on boot
– restart on failure
•  Agent handles over-the-air software
download and update mechanism
•  Remote script execution
101
•  http://www.eclipse.org/proposals/
technology.mihini
•  http://eclipse.org/mihini
•  Code will be available (very) soon
– Initial contribution is pending IP review at Eclipse
Let me
show you!
Roadmap
•  Protocols
– CoAP, LWM2M 
•  REST API
– Ease the communication of 3rd party apps with the
Agent
– Provide better tooling
•  Polyglot framework
– C and Java on their way
Wrapping up
•  Developing an M2M app in Lua with
Mihini is simple
– Demo app written in a couple of hours
•  Mihini apps are portable
•  Mihini itself is easily portable
– make install J
•  Koneki provides support for editing,
debugging and deploying M2M apps
Join the party!
Thank you!

Mais conteúdo relacionado

Mais procurados

Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of thingsCharles Gibbons
 
Lecture28 cc-security3
Lecture28 cc-security3Lecture28 cc-security3
Lecture28 cc-security3Ankit Gupta
 
Lightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New Features
Lightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New FeaturesLightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New Features
Lightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New FeaturesAVSystem
 
Advanced Cryptography for Cloud Security
Advanced Cryptography for Cloud SecurityAdvanced Cryptography for Cloud Security
Advanced Cryptography for Cloud SecurityNeel Chakraborty
 
Hands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse LeshanHands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse LeshanJulien Vermillard
 
Is your MQTT broker IoT ready?
Is your MQTT broker IoT ready?Is your MQTT broker IoT ready?
Is your MQTT broker IoT ready?Eurotech
 
DSD-INT 2021 Towards a Deltares cloud computing service - Elzinga
DSD-INT 2021 Towards a Deltares cloud computing service - ElzingaDSD-INT 2021 Towards a Deltares cloud computing service - Elzinga
DSD-INT 2021 Towards a Deltares cloud computing service - ElzingaDeltares
 
Smart home and smartfactory intelligent systems
Smart home and smartfactory intelligent systemsSmart home and smartfactory intelligent systems
Smart home and smartfactory intelligent systemsLorenzo Maiorfi
 
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTTIn search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTTDominik Obermaier
 

Mais procurados (12)

Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
Lecture28 cc-security3
Lecture28 cc-security3Lecture28 cc-security3
Lecture28 cc-security3
 
Lightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New Features
Lightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New FeaturesLightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New Features
Lightweight M2M 1.1 - LwM2M 1.1 Protocol Overview & New Features
 
Advanced Cryptography for Cloud Security
Advanced Cryptography for Cloud SecurityAdvanced Cryptography for Cloud Security
Advanced Cryptography for Cloud Security
 
End to end IoT Solution using Mongoose OS.
End to end IoT Solution using Mongoose OS.End to end IoT Solution using Mongoose OS.
End to end IoT Solution using Mongoose OS.
 
Hands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse LeshanHands on with lightweight m2m and Eclipse Leshan
Hands on with lightweight m2m and Eclipse Leshan
 
Is your MQTT broker IoT ready?
Is your MQTT broker IoT ready?Is your MQTT broker IoT ready?
Is your MQTT broker IoT ready?
 
DSD-INT 2021 Towards a Deltares cloud computing service - Elzinga
DSD-INT 2021 Towards a Deltares cloud computing service - ElzingaDSD-INT 2021 Towards a Deltares cloud computing service - Elzinga
DSD-INT 2021 Towards a Deltares cloud computing service - Elzinga
 
Smart home and smartfactory intelligent systems
Smart home and smartfactory intelligent systemsSmart home and smartfactory intelligent systems
Smart home and smartfactory intelligent systems
 
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTTIn search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
In search of the perfect IoT Stack - Scalable IoT Architectures with MQTT
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
 

Semelhante a Using Eclipse and Lua for the Internet of Things - JAX2013

Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Benjamin Cabé
 
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012Benjamin Cabé
 
Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days
Open source Tools and Frameworks for M2M - Sierra Wireless Developer DaysOpen source Tools and Frameworks for M2M - Sierra Wireless Developer Days
Open source Tools and Frameworks for M2M - Sierra Wireless Developer DaysBenjamin Cabé
 
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsJava in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsEurotech
 
People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013Eurotech
 
Introducing the Open Edge Module
Introducing the Open Edge ModuleIntroducing the Open Edge Module
Introducing the Open Edge ModuleIvan Zoratti
 
Manta Unleashed BigDataSG talk 2 July 2013
Manta Unleashed BigDataSG talk 2 July 2013Manta Unleashed BigDataSG talk 2 July 2013
Manta Unleashed BigDataSG talk 2 July 2013Christopher Hogue
 
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus KhalidCloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus KhalidOpenNebula Project
 
Edge Computing Platforms and Protocols - Ph.D. thesis
Edge Computing Platforms and Protocols - Ph.D. thesisEdge Computing Platforms and Protocols - Ph.D. thesis
Edge Computing Platforms and Protocols - Ph.D. thesisNitinder Mohan
 
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...Benjamin Cabé
 
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBMData Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBMmfrancis
 
2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red HatShawn Wells
 
Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...Matthew Vaughn
 
Ultralight data movement for IoT with SDC Edge. Guglielmo Iozzia - Optum
Ultralight data movement for IoT with SDC Edge. Guglielmo Iozzia - OptumUltralight data movement for IoT with SDC Edge. Guglielmo Iozzia - Optum
Ultralight data movement for IoT with SDC Edge. Guglielmo Iozzia - OptumData Driven Innovation
 
Presentation ING for ISC2 Secure Summits EMEA
Presentation ING for ISC2 Secure Summits EMEAPresentation ING for ISC2 Secure Summits EMEA
Presentation ING for ISC2 Secure Summits EMEAThijs Ebbers
 

Semelhante a Using Eclipse and Lua for the Internet of Things - JAX2013 (20)

Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013
 
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
 
Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days
Open source Tools and Frameworks for M2M - Sierra Wireless Developer DaysOpen source Tools and Frameworks for M2M - Sierra Wireless Developer Days
Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days
 
IoT meets Big Data
IoT meets Big DataIoT meets Big Data
IoT meets Big Data
 
Smartblitzmerker
SmartblitzmerkerSmartblitzmerker
Smartblitzmerker
 
Brad stack - Digital Health and Well-Being Festival
Brad stack - Digital Health and Well-Being Festival Brad stack - Digital Health and Well-Being Festival
Brad stack - Digital Health and Well-Being Festival
 
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring StationsJava in the Air: A Case Study for Java-based Environment Monitoring Stations
Java in the Air: A Case Study for Java-based Environment Monitoring Stations
 
People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013People Counting: Internet of Things in Motion at JavaOne 2013
People Counting: Internet of Things in Motion at JavaOne 2013
 
Grid Computing
Grid ComputingGrid Computing
Grid Computing
 
Introducing the Open Edge Module
Introducing the Open Edge ModuleIntroducing the Open Edge Module
Introducing the Open Edge Module
 
Manta Unleashed BigDataSG talk 2 July 2013
Manta Unleashed BigDataSG talk 2 July 2013Manta Unleashed BigDataSG talk 2 July 2013
Manta Unleashed BigDataSG talk 2 July 2013
 
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus KhalidCloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
 
Edge Computing Platforms and Protocols - Ph.D. thesis
Edge Computing Platforms and Protocols - Ph.D. thesisEdge Computing Platforms and Protocols - Ph.D. thesis
Edge Computing Platforms and Protocols - Ph.D. thesis
 
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
 
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBMData Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
 
2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat2012-03-15 What's New at Red Hat
2012-03-15 What's New at Red Hat
 
Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...Jetstream: Accessible cloud computing for the national science and engineerin...
Jetstream: Accessible cloud computing for the national science and engineerin...
 
Cisco project ideas
Cisco   project ideasCisco   project ideas
Cisco project ideas
 
Ultralight data movement for IoT with SDC Edge. Guglielmo Iozzia - Optum
Ultralight data movement for IoT with SDC Edge. Guglielmo Iozzia - OptumUltralight data movement for IoT with SDC Edge. Guglielmo Iozzia - Optum
Ultralight data movement for IoT with SDC Edge. Guglielmo Iozzia - Optum
 
Presentation ING for ISC2 Secure Summits EMEA
Presentation ING for ISC2 Secure Summits EMEAPresentation ING for ISC2 Secure Summits EMEA
Presentation ING for ISC2 Secure Summits EMEA
 

Mais de Benjamin Cabé

IoT Developer Survey 2018
IoT Developer Survey 2018IoT Developer Survey 2018
IoT Developer Survey 2018Benjamin Cabé
 
Open Source for Industry 4.0 – Open IoT Summit NA 2018
Open Source for Industry 4.0 – Open IoT Summit NA 2018Open Source for Industry 4.0 – Open IoT Summit NA 2018
Open Source for Industry 4.0 – Open IoT Summit NA 2018Benjamin Cabé
 
JVM-Con 2017 – Java and IoT, will it blend?
JVM-Con 2017 – Java and IoT, will it blend?JVM-Con 2017 – Java and IoT, will it blend?
JVM-Con 2017 – Java and IoT, will it blend?Benjamin Cabé
 
Examining the emergent open source IoT ecosystem - IoT World Europe 2016
Examining the emergent open source IoT ecosystem - IoT World Europe 2016Examining the emergent open source IoT ecosystem - IoT World Europe 2016
Examining the emergent open source IoT ecosystem - IoT World Europe 2016Benjamin Cabé
 
Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...
Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...
Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...Benjamin Cabé
 
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016Benjamin Cabé
 
On making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in handOn making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in handBenjamin Cabé
 
Open Source Internet of Things 101 – EclipseCon 2016
Open Source Internet of Things 101 – EclipseCon 2016Open Source Internet of Things 101 – EclipseCon 2016
Open Source Internet of Things 101 – EclipseCon 2016Benjamin Cabé
 
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015Benjamin Cabé
 
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTDevoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTBenjamin Cabé
 
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é
 
End-to-end IoT solutions with Java and the Eclipse IoT stack
End-to-end IoT solutions with Java and the Eclipse IoT stackEnd-to-end IoT solutions with Java and the Eclipse IoT stack
End-to-end IoT solutions with Java and the Eclipse IoT stackBenjamin Cabé
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialBenjamin Cabé
 
Open-source IoT cookbook
Open-source IoT cookbookOpen-source IoT cookbook
Open-source IoT cookbookBenjamin Cabé
 
Building the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetupBuilding the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetupBenjamin Cabé
 
Building the Internet of Things with Eclipse IoT - JavaLand 2014
Building the Internet of Things with Eclipse IoT - JavaLand 2014Building the Internet of Things with Eclipse IoT - JavaLand 2014
Building the Internet of Things with Eclipse IoT - JavaLand 2014Benjamin Cabé
 
What's new at Eclipse IoT - EclipseCon 2014
What's new at Eclipse IoT - EclipseCon 2014What's new at Eclipse IoT - EclipseCon 2014
What's new at Eclipse IoT - EclipseCon 2014Benjamin Cabé
 
Overview of Eclipse IoT projects - IoT Day Grenoble
Overview of Eclipse IoT projects - IoT Day GrenobleOverview of Eclipse IoT projects - IoT Day Grenoble
Overview of Eclipse IoT projects - IoT Day GrenobleBenjamin Cabé
 
Open (source) API for the Internet of Things - APIdays 2013
Open (source) API for the Internet of Things - APIdays 2013Open (source) API for the Internet of Things - APIdays 2013
Open (source) API for the Internet of Things - APIdays 2013Benjamin Cabé
 
A guided tour of Eclipse M2M - EclipseCon Europe 2013
A guided tour of Eclipse M2M - EclipseCon Europe 2013A guided tour of Eclipse M2M - EclipseCon Europe 2013
A guided tour of Eclipse M2M - EclipseCon Europe 2013Benjamin Cabé
 

Mais de Benjamin Cabé (20)

IoT Developer Survey 2018
IoT Developer Survey 2018IoT Developer Survey 2018
IoT Developer Survey 2018
 
Open Source for Industry 4.0 – Open IoT Summit NA 2018
Open Source for Industry 4.0 – Open IoT Summit NA 2018Open Source for Industry 4.0 – Open IoT Summit NA 2018
Open Source for Industry 4.0 – Open IoT Summit NA 2018
 
JVM-Con 2017 – Java and IoT, will it blend?
JVM-Con 2017 – Java and IoT, will it blend?JVM-Con 2017 – Java and IoT, will it blend?
JVM-Con 2017 – Java and IoT, will it blend?
 
Examining the emergent open source IoT ecosystem - IoT World Europe 2016
Examining the emergent open source IoT ecosystem - IoT World Europe 2016Examining the emergent open source IoT ecosystem - IoT World Europe 2016
Examining the emergent open source IoT ecosystem - IoT World Europe 2016
 
Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...
Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...
Running UK railway with Eclipse Paho and Eclipse Mosquitto – Eclipse IoT Day ...
 
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
The Right Tools for IoT Developers – Dan Gross @ Eclipse IoT Day ThingMonk 2016
 
On making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in handOn making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in hand
 
Open Source Internet of Things 101 – EclipseCon 2016
Open Source Internet of Things 101 – EclipseCon 2016Open Source Internet of Things 101 – EclipseCon 2016
Open Source Internet of Things 101 – EclipseCon 2016
 
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
 
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTDevoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
 
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 ...
 
End-to-end IoT solutions with Java and the Eclipse IoT stack
End-to-end IoT solutions with Java and the Eclipse IoT stackEnd-to-end IoT solutions with Java and the Eclipse IoT stack
End-to-end IoT solutions with Java and the Eclipse IoT stack
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
 
Open-source IoT cookbook
Open-source IoT cookbookOpen-source IoT cookbook
Open-source IoT cookbook
 
Building the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetupBuilding the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetup
 
Building the Internet of Things with Eclipse IoT - JavaLand 2014
Building the Internet of Things with Eclipse IoT - JavaLand 2014Building the Internet of Things with Eclipse IoT - JavaLand 2014
Building the Internet of Things with Eclipse IoT - JavaLand 2014
 
What's new at Eclipse IoT - EclipseCon 2014
What's new at Eclipse IoT - EclipseCon 2014What's new at Eclipse IoT - EclipseCon 2014
What's new at Eclipse IoT - EclipseCon 2014
 
Overview of Eclipse IoT projects - IoT Day Grenoble
Overview of Eclipse IoT projects - IoT Day GrenobleOverview of Eclipse IoT projects - IoT Day Grenoble
Overview of Eclipse IoT projects - IoT Day Grenoble
 
Open (source) API for the Internet of Things - APIdays 2013
Open (source) API for the Internet of Things - APIdays 2013Open (source) API for the Internet of Things - APIdays 2013
Open (source) API for the Internet of Things - APIdays 2013
 
A guided tour of Eclipse M2M - EclipseCon Europe 2013
A guided tour of Eclipse M2M - EclipseCon Europe 2013A guided tour of Eclipse M2M - EclipseCon Europe 2013
A guided tour of Eclipse M2M - EclipseCon Europe 2013
 

Último

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
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Último (20)

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
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
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
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Using Eclipse and Lua for the Internet of Things - JAX2013

  • 1. Using Eclipse & Lua for the Internet of Things Benjamin Cabé bcabe@sierrawireless.com
  • 2. Who I am •  Benjamin Cabé •  Open Source M2M Evangelist at Sierra Wireless •  Long-time Eclipse lover
  • 3. ❝ M2M? IoT? Technology that supports wired or wireless communication between devices
  • 4.
  • 5.
  • 6.
  • 7.
  • 9.
  • 11. M2M embedded programming •  low-level C •  memory management •  multithreaded programming •  read sensor values •  control actuators •  consolidate data •  communicate
  • 12. Example: Sending an SMS int main() { unsigned char char1[10]; unsigned char char_buf[8]="AT+CSQn"; // unsigned char sms_buf[20] = "AT+CMGS="xxxxxxxxx"; int wc_fd; /********* Init of serial port ************/ wc_fd = init_wc(wc_fd); sleep(3); //writing to serial port write(wc_fd,char_buf,sizeof(char_buf)); usleep(40000); //reading from serial port read(wc_fd,char1,sizeof(char1)); sleep(2); close(wc_fd); return 0; } // end of main // initialization of serial port struct termios options; ttys5_fd = open("/dev/ttyS5", O_RDWR ); if (ttys5_fd < 0) sms.send(
 '+33612345678’,
 'My SMS’
 )
  • 14. What is Lua? •  High-level programming language •  Scripting •  Simple •  Extensible •  Portable
  • 15. Extensible by design •  Small – Trivial syntax and reduced keyword set •  Simple but not stupid – Simple enough for new users, powerful enough for advanced users (first-class functions, garbage collection, closures, tail calls, coercion, coroutines, metatables) •  Lua core is tiny – Compiled size is ~150kB – Lua uses libraries for its extensions
  • 16. Lua vs. other high-level languages •  Same core features as Python, Ruby, Javascript •  Better concurrency management – Built-in – doesn’t rely on the OS •  Cutting-edge execution technology & performances
  • 17. Lua vs. other high-level languages •  Restricted set of libraries – Stay simple, the developer brings his own •  Designed for C integration – Performance – Legacy
  • 18. Lua for embedded and M2M? •  High-level languages usually trade hardware resources for development & maintenance resources Lua allows to reconcile high-level languages accomplishments with embedded constraints
  • 19. You need an IDE! •  Project structure •  Syntax coloring •  Content assist •  Code navigation •  Code formatting •  Documentation •  Code templates •  Debugger •  Remote development •  Embedded interpreter June 2012: first release (0.8) Dec. 2012: 0.9 release June 2013: graduate w/ Kepler 60,000+ installations already! (Apr. 2013)
  • 20. DEMO Using Koneki LDT for remote Lua development
  • 21. 101 •  http://www.eclipse.org/koneki/ldt •  Download standalone IDE •  Or install in existing Eclipse –  from Juno repository (0.8.2) –  from nightly/milestones repositories (1.0M1) •  Execution environments on Koneki wiki –  http://goo.gl/f6T80 •  Contact the team –  http://eclipse.org/forums/eclipse.koneki
  • 23. •  Messaging protocol •  Low-bandwidth / Low-power •  Payload agnostic •  Adjustable QoS •  Large ecosystem
  • 24. broker broker (optional) bridge publish subscribe keepalive last will & testament username/password topic/subtopic topic/#
  • 25. M3DA Overview Compact … because in the wireless world, data overhead costs money –  Efficient in the transport of binary M2M data Interoperable … because the M2M communication chain is heterogeneous –  Language-independent –  Tolerant to data schema changes –  Agnostic to transport layer (TCP, HTTP, SMS, …) Secure … because security is #1 concern for M2M adopters –  Ensure integrity and confidentiality of customer data –  Message ticket-id to enable acknowledgement Open … because vendor lock-in hinders M2M adoption –  Open specification –  Open-source, royalty-free, implementations
  • 26. 101 •  http://eclipse.org/paho/ •  Free brokers hosted at Eclipse: m2m.eclipse.org •  Contact the team – paho-dev mailing-list
  • 27. Lua VM + a Paho client to go?
  • 28. Application framework for M2M •  Set of libraries providing building blocks to develop M2M applications: – Serial and I/O management, – Networking (FTP, HTTP, e-mail, …), – GPS, – Cryptography, – Modbus, – Local storage – etc. http://www.eclipse.org/mihini
  • 29. Smart agent for M2M •  M2M data queues •  Network bearers •  Device management •  Application container •  Application configuration http://www.eclipse.org/mihini
  • 31.
  • 32. Asset management •  User applications use an API to communicate with Mihini – Send data or events – Register listeners to handle data writing or commands •  The Mihini agent takes care of network connection, buffering and reliable storage of unsent data, etc.
  • 33. Asset management local gh_asset = asset_mgt.newAsset("greenhouse") gh_asset:start() gh_asset:pushdata("sensors.temperature", 22, "now") gh_asset:pushdata("sensors.humidity", 89, "hourly")
  • 34. Device management •  A Tree Manager presents device's data as – variables, – organized in a hierarchical tree, – that can be read, written, and monitored for changes by user applications.
  • 35. Device management local devicetree = require 'devicetree' local APN = 'system.cellular.apn.apn' local RSSI = 'system.cellular.link.rssi' local apn = devicetree.get (APN) log(LOG_NAME, "INFO", "Configure APN: %s", apn) local function print_callback (values) for name, value in pairs(values) do log (LOG_NAME, "INFO", " - Variable %s changed: %s",name, value) end end devicetree.register(RSSI, print_callback) devicetree.set(APN, 'foo')
  • 36. Application Management •  Language-agnostic application container – install/uninstall – start/stop, auto-start on boot – restart on failure •  Agent handles over-the-air software download and update mechanism •  Remote script execution
  • 37. 101 •  http://www.eclipse.org/proposals/ technology.mihini •  http://eclipse.org/mihini •  Code will be available (very) soon – Initial contribution is pending IP review at Eclipse
  • 39.
  • 40. Roadmap •  Protocols – CoAP, LWM2M •  REST API – Ease the communication of 3rd party apps with the Agent – Provide better tooling •  Polyglot framework – C and Java on their way
  • 41. Wrapping up •  Developing an M2M app in Lua with Mihini is simple – Demo app written in a couple of hours •  Mihini apps are portable •  Mihini itself is easily portable – make install J •  Koneki provides support for editing, debugging and deploying M2M apps