Using Eclipse & Lua for the Internet of Things Benjamin Cabé – bcabe@sierrawireless.comGaétan Morice – gmorice@sierrawirel...
IoT? M2M?Technology that supportswired or wirelesscommunicationbetween devices
50billiondevicesby 2020
50billiondevicesby 2020
Smart   Pill   Box           Near field                                                              Patient    Heartbeat  ...
Ready then?
…Not quite!!
M2M market= fragmented
M2M development   = complex
M2M vendors = lock-in
?
3 projectsFrameworkProtocolsTools
M2M embedded           programming•  low-level C     •  read sensor values•  memory          •  control actuators   manage...
Example: Sending an SMSint main()	{	     unsigned char char1[10];	     unsigned char char_buf[8]="AT+CSQn";	     // unsign...
Simplify M2M programming
What is Lua?•  High-level programming language•  Scripting•  Extensible•  Simple•  Efficient•  Portable
You need an IDE!•  Project structure•  Syntax coloring•  Content assist•  Code navigation•  Code formatting      June 2012...
Using Koneki LDT forremote Lua developmentDEMO
101•  http://www.eclipse.org/koneki/ldt•  Download standalone IDE•  Or install in existing Eclipse  –  from Juno repositor...
http://www.sxc.hu/photo/1036004
•  Low-bandwidth•  Low-power•  Payload agnostic•  Adjustable QoS•  Large ecosystem
(optional) bridge          broker                            broker                                                       ...
101•  http://eclipse.org/paho/•  Eclipse Paho delivers clients for MQTT in C and   Java  –  http://eclipse.org/paho/downlo...
Lua VM + MQTT client to go?
Application framework for M2M •  Set of libraries providing building    blocks to develop user M2M    applications:   –  S...
Smart agent for M2M•  M2M data queues•  Network bearers•  Device management•  Application container•  Application configura...
101•  http://www.eclipse.org/proposals/   technology.mihini•  http://eclipse.org/mihini•  Code will be available on Github...
Let meshow you!
Step 1 – Early prototyping•  Greenhouse business  –  Connect gardening equipments to each     other  –  Remote monitoring ...
m2m.eclipse.org   MQTT broker             Raspberry Pi              Mobile phoneModbus RTU                humidity        ...
Two Lua applications    Embedded                      Mobile                             Corona SDK–  Uses Modbus library ...
M2M Developer Kit•  Actual hardware early in the dev.   process is key  Affordable!            Simple!           Industrial...
Step 2 – Use an industrial             gateway•  Need for rugged, industrial-grade   M2M gateway•  Take the Mihini codebas...
m2m.eclipse.org   MQTT broker             Rugged                    Mobile phone             wireless gatewayModbus RTU   ...
Step 3 – Industrial deployment•  Use a real PLC  –  Mihini dev. kit is replaced by a real PLC  –  Only the configuration of...
Telco!                   M2M server                                 Billing!   etc…!             Rugged             Mobile...
Conclusion•  Developing an M2M app with Mihini   is simple  –  Demo app written in a couple hours•  Mihini apps are portab...
M2M AT ECLIPSE IS ALSO…
A developer portal
An all-in-one IDE•  June 2013•  Ready-to-use•  Market Place
Join us!•  BoF: tomorrow – 7 pm Schubartsaal•  Industry Working Groups booth
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho
Upcoming SlideShare
Loading in...5
×

Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho

3,145

Published on

The Internet of Things (IoT) or Machine to Machine (M2M), is a technological field that will radically change the global network by enabling the communication of virtually every single object with each other. Studies state that more than 50 billions objects may be connected to the Internet by 2020. In a near future, everything from a light bulb to a power plant, from a pacemaker to an hospital, from a car to a road network will be part of the Internet.

While this revolution is already happening (your house or your car may be "connected" already!), there are still lots of barriers to its growth, especially since existing solutions are almost always proprietary, and cannot interoperate easily.
There are several very active M2M initiatives at Eclipse aiming at lowering these barriers, all under the umbrella of the M2M Industry Working Group. Last year, projects Paho (communication protocols for M2M) and Koneki (tools for M2M developers, in particular a complete IDE for Lua development) were created, and in July 2012 project Mihini was proposed to establish Lua as a reference platform for building M2M and IoT solutions.

The purpose of this talk is to give you a clear understanding of the afore mentioned Eclipse projects, as well as to show you that real M2M solutions can already be developed thanks to them. We will briefly introduce the Lua programming language, explain why it is a good fit for embedded M2M development, and then demonstrate the development of an actual working solution making use of the Mihini framework, a Paho MQTT client, and the Koneki tooling. The use case will also leverage Open Hardware such as Arduino and a RaspberryPi, therefore you can expect nice demos!

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,145
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
71
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini and Paho

  1. 1. Using Eclipse & Lua for the Internet of Things Benjamin Cabé – bcabe@sierrawireless.comGaétan Morice – gmorice@sierrawireless.com
  2. 2. IoT? M2M?Technology that supportswired or wirelesscommunicationbetween devices
  3. 3. 50billiondevicesby 2020
  4. 4. 50billiondevicesby 2020
  5. 5. Smart Pill Box Near field Patient Heartbeat Sensor Medical Services Gateway Clinical TrialWeight InternetScale of Things Communication Infrastructure Doctor Blood Pressure Blood Sugar
  6. 6. Ready then?
  7. 7. …Not quite!!
  8. 8. M2M market= fragmented
  9. 9. M2M development = complex
  10. 10. M2M vendors = lock-in
  11. 11. ?
  12. 12. 3 projectsFrameworkProtocolsTools
  13. 13. M2M embedded programming•  low-level C •  read sensor values•  memory •  control actuators management •  consolidate data•  multithreaded programming •  communicate
  14. 14. Example: Sending an SMSint main() { unsigned char char1[10]; unsigned char char_buf[8]="AT+CSQn"; // unsigned char sms_buf[20] = "AT+CMGS="xxxxxxxxx"; int wc_fd; sms.send(
 /********* Init of serial port ************/ wc_fd = init_wc(wc_fd); +33612345678’,
 sleep(3); //writing to serial port My SMS’,
 ) 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)
  15. 15. Simplify M2M programming
  16. 16. What is Lua?•  High-level programming language•  Scripting•  Extensible•  Simple•  Efficient•  Portable
  17. 17. You need an IDE!•  Project structure•  Syntax coloring•  Content assist•  Code navigation•  Code formatting June 2012: first release (0.8) Dec. 2012: 0.9 release•  Documentation June 2013: graduate w/ Kepler•  Code templates 20,000+ installations already!•  Debugger•  Remote development
  18. 18. Using Koneki LDT forremote Lua developmentDEMO
  19. 19. 101•  http://www.eclipse.org/koneki/ldt•  Download standalone IDE•  Or install in existing Eclipse –  from Juno repository –  from nightly/milestones repositories•  Execution environments: –  http://sierrawireless.github.com/lua-execution- environments/•  Contact the team –  http://eclipse.org/forums/eclipse.koneki
  20. 20. http://www.sxc.hu/photo/1036004
  21. 21. •  Low-bandwidth•  Low-power•  Payload agnostic•  Adjustable QoS•  Large ecosystem
  22. 22. (optional) bridge broker broker topic/# topic/subtopic keepalivepublish last will & testament subscribe username/password
  23. 23. 101•  http://eclipse.org/paho/•  Eclipse Paho delivers clients for MQTT in C and Java –  http://eclipse.org/paho/download.php•  Lua client available soon –  https://github.com/geekscape/mqtt_lua•  MQTT view in Eclipse –  http://git.eclipse.org/c/paho/org.eclipse.paho.esf.git/•  Free broker hosted at Eclipse: m2m.eclipse.org•  Contact the team –  paho-dev mailing-list
  24. 24. Lua VM + MQTT client to go?
  25. 25. Application framework for M2M •  Set of libraries providing building blocks to develop user M2M applications: –  Serial and I/O management, –  Networking (FTP, HTTP, E-mail clients), –  GPS, –  Cryptography, –  Modbus, –  Local storage –  etc. http://www.eclipse.org/mihini
  26. 26. Smart agent for M2M•  M2M data queues•  Network bearers•  Device management•  Application container•  Application configuration http://www.eclipse.org/mihini
  27. 27. 101•  http://www.eclipse.org/proposals/ technology.mihini•  http://eclipse.org/mihini•  Code will be available on Github soon•  Initial contribution planned for Q1
  28. 28. Let meshow you!
  29. 29. Step 1 – Early prototyping•  Greenhouse business –  Connect gardening equipments to each other –  Remote monitoring of sensors –  Remote control•  M2M Gateway not selected yet, neither is the rest of the equipment (PLCs)
  30. 30. m2m.eclipse.org MQTT broker Raspberry Pi Mobile phoneModbus RTU humidity temperature illuminance light ON/OFF
  31. 31. Two Lua applications Embedded Mobile Corona SDK–  Uses Modbus library –  Subscribes to MQTT to talk to Arduino PLC messages–  Collects sensor data/ –  Displays sensor data controls actuators with a fancy UI–  Publishes MQTT –  Publish command to messages switch on/off the–  Subscribe to light commands
  32. 32. M2M Developer Kit•  Actual hardware early in the dev. process is key Affordable! Simple! Industrial!•  http://wiki.eclipse.org/Mihini/Developer_Kit•  Arduino code & schematics available after the conference
  33. 33. Step 2 – Use an industrial gateway•  Need for rugged, industrial-grade M2M gateway•  Take the Mihini codebase and compile it against the gateway’s toolchain•  Mihini porting layer –  straightforward for Linux-based devices with AT modem –  porting layer for other solutions
  34. 34. m2m.eclipse.org MQTT broker Rugged Mobile phone wireless gatewayModbus RTU humidity temperature illuminance light ON/OFF
  35. 35. Step 3 – Industrial deployment•  Use a real PLC –  Mihini dev. kit is replaced by a real PLC –  Only the configuration of the application (modbus registries #) will have to be updated•  Use a reliable, multi-tenant, M2M server
  36. 36. Telco! M2M server Billing! etc…! Rugged Mobile phone wireless gatewayModbus RTU humidity temperature illuminance light ON/OFF
  37. 37. Conclusion•  Developing an M2M app with Mihini is simple –  Demo app written in a couple hours•  Mihini apps are portable•  Mihini itself is easily portable –  make install•  Koneki provides support for editing, debugging and deploying M2M apps
  38. 38. M2M AT ECLIPSE IS ALSO…
  39. 39. A developer portal
  40. 40. An all-in-one IDE•  June 2013•  Ready-to-use•  Market Place
  41. 41. Join us!•  BoF: tomorrow – 7 pm Schubartsaal•  Industry Working Groups booth
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×