open source tools and frameworks for m2m - sierra wireless developer days
DESCRIPTION
On June 14, 2013 were the first Sierra Wireless Developer Days. This is the presentation I gave about Sierra Wireless Open-Source activities, and the technologies being delivered together with the Eclipse M2M Industry Working Group. Join our developer community at http://developer.sierrawireless.comTRANSCRIPT
![Page 1: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/1.jpg)
Page
Open-source tools and frameworks for M2M
Sierra Wireless Developer Days 2013 Benjamin Cabé
![Page 2: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/2.jpg)
Who I am
• Benjamin Cabé • Open Source M2M Evangelist
• Eclipse M2M IWG chairperson
![Page 3: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/3.jpg)
Topics for this session
• Open-source?
• Eclipse Foundation
• M2M Industry Working Group
• Eclipse M2M projects
• Sierra products built on OSS
![Page 4: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/4.jpg)
50
bil l ion devices by 2020
![Page 5: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/5.jpg)
![Page 6: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/6.jpg)
![Page 7: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/7.jpg)
![Page 8: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/8.jpg)
![Page 9: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/9.jpg)
Smart Pill Box
Heartbeat Sensor
Weight Scale
Blood Pressure
Medical Services Gateway
Near field
Blood Sugar
Internet of Things
Patient
Clinical Trial
Doctor
![Page 10: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/10.jpg)
![Page 11: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/11.jpg)
![Page 12: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/12.jpg)
![Page 13: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/13.jpg)
?
![Page 14: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/14.jpg)
Eclipse is an open source community f o c u s e d o n d e v e l o p i n g a development platform of runtimes, frameworks and exemplary tools that make it easy and cost-effective to build and deploy software solutions.”
“
![Page 15: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/15.jpg)
• 190+ organizations are members of the Eclipse Foundation, working with each other to leverage an open collaboration model, as well as marketing benefits.
• Strategic members:
![Page 16: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/16.jpg)
Eclipse has grown from a place where developers have been working on developing Open Source software, to a place where industry leaders work to focus, promote, and augment Eclipse technologies to meet the needs of specific industries.
“ Eclipse Industry Working Groups
![Page 18: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/18.jpg)
Our open-source strategy
IoT Building Blocks “We provide open-source developments tools and frameworks for M2M/IoT developers”
![Page 19: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/19.jpg)
Our open-source strategy
IoT Building Blocks “We provide open-source developments tools and frameworks for M2M/IoT developers”
Interoperability “We provide reference implementations of open protocols and API to encourage interoperability”.
![Page 20: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/20.jpg)
Our open-source strategy
IoT Building Blocks “We provide open-source developments tools and frameworks for M2M/IoT developers”
Interoperability “We provide reference implementations of open protocols and API to encourage interoperability”.
Open-Source Community “We host samples, testing environments and documentation on the m2m.eclipse.org portal”
![Page 21: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/21.jpg)
http://m2m.eclipse.org
![Page 22: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/22.jpg)
Open ecosystem for M2M
Third Party Ecosystem
Open M2M application framework and runtimes
Open M2M communication protocols
Internet of Things
Open M2M development tools
…
![Page 23: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/23.jpg)
Framework
Tools
3 projects
Protocols
![Page 24: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/24.jpg)
M2M embedded programming
• low-level C
• memory management
• multithreaded programming
• read sensor values
• control actuators
• consolidate data
• communicate
![Page 25: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/25.jpg)
Example: Sending an SMS int main(){ unsigned char char1[10]; unsigned char char_buf[8]="AT+CSQ\n"; // 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 portstruct termios options;ttys5_fd = open("/dev/ttyS5", O_RDWR );if (ttys5_fd < 0){ printf("\nFail to open serial port 2\n"); return 0;}init_tty( ttys5_fd ,BAUD_RATE);return ttys5_fd;-----------------------------------//initializing baud rateint init_tty( int fd ,long wBaud){ long baud; switch (wBaud) {
sms.send( '+33612345678’, 'My SMS’ )
![Page 26: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/26.jpg)
Simplify M2M programming
![Page 27: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/27.jpg)
What is Lua?
• High-level programming language
• Scripting
• Simple
• Extensible
• Portable
![Page 28: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/28.jpg)
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
![Page 29: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/29.jpg)
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
![Page 30: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/30.jpg)
Lua vs. other high-level languages
• Restricted set of libraries – Stay simple, the developer brings his own
• Designed for C integration – Performance
– Legacy
![Page 31: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/31.jpg)
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
![Page 32: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/32.jpg)
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: 1.0 w/ Kepler 60,000 installations already!
![Page 33: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/33.jpg)
Koneki demo
![Page 34: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/34.jpg)
How do we communicate?
http://www.sxc.hu/photo/1036004
![Page 35: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/35.jpg)
M3DA*
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
*Micro M2M Data Access
![Page 36: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/36.jpg)
M3DA Layered Architecture
Transport Layer M3DA EnvelopeEnables authentication, encryption, …
Application Layer M3DA MessageSpecify access to the tree-oriented data model
Serialization Layer BysantProvides an efficient binary serialization based on contextual information
HTTP
M3DA Transport
M3DA Payload M3DA
Message Command/Event/Time stamped data
Message Command/Event/Time stamped data
…
Headers - Device /Server Identification - Security auth, cipher, hmac, nonce… - Compression algo, dict selection, …
TCP UDP SMS*
Transport
Bysant Serializer
![Page 37: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/37.jpg)
M3DA = M2M data optimization • Object-oriented
• Provides basic classes – Numbers (Integers, Floating point numbers, Boolean) – Strings (Binary string) – Container objects (List, Map)
• User-defined objects – Allows to structure protocol objects (Message, Responses, DeltaVector,
…)
• Serialization is optimized for M2M data – Small numbers take less bytes – 5 ! 1 byte, 2040 ! 2 bytes – String size header are adaptative – 1 byte for a 28-byte long string, but 3 bytes for 66k-byte long string.
![Page 38: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/38.jpg)
• Messaging protocol
• Low-bandwidth / Low-power
• Payload agnostic
• Adjustable QoS
• Large ecosystem
![Page 39: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/39.jpg)
broker broker
(optional) bridge
publishsubscribe
keepalivelast will & testamentusername/password
topic/subtopic
topic/#
![Page 40: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/40.jpg)
Lua VM + M3DA to go?
![Page 41: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/41.jpg)
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,
– Modbus,
– Local storage,
– etc.
http://www.eclipse.org/mihini
![Page 42: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/42.jpg)
Smart agent for M2M
• M2M data queues
• Network bearers
• Device management
• Application container
• Application configuration
http://www.eclipse.org/mihini
![Page 43: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/43.jpg)
Overall architecture
![Page 44: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/44.jpg)
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.
![Page 45: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/45.jpg)
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")
![Page 46: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/46.jpg)
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.
![Page 47: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/47.jpg)
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')
![Page 48: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/48.jpg)
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
![Page 49: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/49.jpg)
Let me show you!
![Page 50: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/50.jpg)
A very common use case
• Greenhouse business – Connect gardening equipment
– Remote monitoring of sensors
– Remote control
• M2M Gateway not selected yet, neither is the rest of the equipment (PLCs)
![Page 51: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/51.jpg)
DO YOU KNOW US?
![Page 52: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/52.jpg)
Raspberry Pi Web browser
humidity temperature illuminance
light ON/OFF
Modbus RTU
M3DA REST API
![Page 53: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/53.jpg)
Web
HTML5 / JS
– OAuth
– AirVantage REST API
– Displays sensor data with a fancy UI
– Publish command to switch on/off the light
Two applications Embedded
– Uses Modbus library to communicate w/ Arduino
– Collects sensor data/controls actuators
– Publishes M3DA messages
– Subscribe to commands
![Page 54: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/54.jpg)
Rugged wireless gateways
control sensors & actuators
Mobile phones
Web applications
IT applications
Modbus
…
M2M server
Telco&
Billing& etc…&
![Page 55: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/55.jpg)
![Page 56: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/56.jpg)
Hardware differentiation
ruggedness | radio certification extensibility | services | support
Developer Zone
![Page 57: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/57.jpg)
Software differentiation
industrial protocols
power optimization
development tools
vertical applications
real-time
professional services
…
24/7
3rd party services
security
billing
carrier integration
professional services
…
embedded server
![Page 58: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/58.jpg)
In a nutshell
• Prototyping made as simple as can be
• Smooth experience for Linux-based devices
• New languages are coming
• A clear path towards Sierra Wireless offer
![Page 59: Open source Tools and Frameworks for M2M - Sierra Wireless Developer Days](https://reader033.vdocument.in/reader033/viewer/2022052619/555a2818d8b42a900d8b49c8/html5/thumbnails/59.jpg)
Thank you! Questions?
http://m2m.eclipse.org | http://eclipse.org/koneki | http://eclipse.org/mihini