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.com
14. 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.”
“
15. • 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:
16. 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
17.
18. Our open-source strategy
IoT Building Blocks
“We provide open-source developments tools and
frameworks for M2M/IoT developers”
19. 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”.
20. 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”
22. Open ecosystem for M2M
Third Party Ecosystem
Open M2M application
framework and runtimes
Open M2M communication
protocols
Internet of
Things
Open M2M
development tools
…
24. M2M embedded
programming
• low-level C
• memory
management
• multithreaded
programming
• read sensor values
• control actuators
• consolidate data
• communicate
25. 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’
)
27. What is Lua?
• High-level programming language
• Scripting
• Simple
• Extensible
• Portable
28. 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
29. 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
30. Lua vs. other high-level languages
• Restricted set of libraries
– Stay simple, the developer brings his own
• Designed for C integration
– Performance
– Legacy
31. 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
32. 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!
35. 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
36. M3DA Layered Architecture
Transport Layer M3DA Envelope
Enables authentication, encryption, …
Application Layer M3DA Message
Specify access to the tree-oriented data
model
Serialization Layer Bysant
Provides 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
37. 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.
41. 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
44. 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.
46. 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.
47. 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')
50. 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)
57. 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
58. 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