2. 15-Mar-2014 V1.0 M2M / IoT / devices 2/141
Contents
Definitions
A few examples
Functional view
Physical architecture
Networks
Connected devices
Middleware
Application layer
Ecosystem
Standardization
Want to play?
Conclusion
functional
technical
business
3. 15-Mar-2014 V1.0 M2M / IoT / devices 3/141
About the author
Pascal Bodin
2004 - today: Orange
● M2M Senior Software Developer
● Orange Expert – software
● domain: M2M systems and services
● co-founder of a company building home computing systems
(1990)1993 – 2004:
● co-founder of a company building real-time M2M systems – mostly for connected vehicles
● manager of a France Telecom R&D Unit
1983 – 1993:
● software development (developer + project leader)
1982 – 1983: French Navy Reserve Officer, onboard oceanographic ship “D'Entrecasteaux”
1982: Master of Engineering from Telecom Bretagne, a French Graduate Engineering School – Telecommunications
and Computer Science
Contact:
● personal web site: http://www.monblocnotes.com
● Twitter: @PascalBod06
● LinkedIn: https://www.linkedin.com/in/pascalbodin
4. 15-Mar-2014 V1.0 M2M / IoT / devices 4/141
Definitions – 1/2
M2M
● Wikipedia: Machine to machine (M2M) refers to
technologies that allow both wireless and wired
systems to communicate with other devices of the same
type. [Def1]
● Digi: Machine-to-Machine (M2M) technology allows
organizations to gather data from the edge of the
enterprise and apply it in ways that positively
impact the business. [Def2]
● Orange: Exchange of information between machines that
is established between the central control system
(server) and any type of equipment, through one or
several communication networks. [Def3]
5. 15-Mar-2014 V1.0 M2M / IoT / devices 5/141
IoT
● Wikipedia: The Internet of Things (or IoT for short)
refers to uniquely identifiable objects and their
virtual representations in an Internet-like
structure. [Def4]
● Cisco: The Internet of Things (IoT) is the network of
physical objects accessed through the Internet, as
defined by technology analysts and visionaries. These
objects contain embedded technology to interact with
internal states or the external environment. In other
words, when objects can sense and communicate, it
changes how and where decisions are made, and who
makes them. [Def5]
Definitions – 2/2
6. 15-Mar-2014 V1.0 M2M / IoT / devices 6/141
M2M, IoT are acronyms invented by people trying to create new
trends without trying to really understand user needs.
M2M, IoT do not exist. Only user needs and systems trying to
fulfill those needs exist.
M2M, IoT may have very different meanings
Always ask the person in front of you what (s)he means with
those acronyms.
Definitions – summary
16. 15-Mar-2014 V1.0 M2M / IoT / devices 16/141
Myriads of different requirements
Consequently, myriads of different systems
Mix of three main technology domains:
● electronics + embedded computing
● communications
● application software
• embedded
• back office / front office
Examples - summary
17. 15-Mar-2014 V1.0 M2M / IoT / devices 17/141
Two examples: copy machines maintenance, taxi dispatch
Requirements
Functional proposals
Vocabulary is mine!
Vocabulary will be consistent throughout the slides
Functional view - table of contents
18. 15-Mar-2014 V1.0 M2M / IoT / devices 18/141
Domain:
● multifunction copy machines (copy, print, scan, fax)
● machines are rented by companies
● in large premises, it happens that machines are moved
Requirements:
● inform about required maintenance operation (toner, internal disk, etc.)
● inform about new location in renting company premises
● do not use renting company network facilities
Functional view - copy machines maintenance - requirements
19. 15-Mar-2014 V1.0 M2M / IoT / devices 19/141
Functional view - copy machines maintenance - architecture 1
machine
remote system
communication
network
communication
network
central system
enterprise
information system
useradministrator
remote side
central side
20. 15-Mar-2014 V1.0 M2M / IoT / devices 20/141
Functional view - copy machines maintenance - architecture 2
gateway
communication
network
communication
network
central system
enterprise
information
system
useradministrator
communication
network
21. 15-Mar-2014 V1.0 M2M / IoT / devices 21/141
Functional view - copy machines maintenance - remote side
application
communication with
central side / gateway
communication with
machine
events archiving
positioning
mandatory
optional
management
misc.
22. 15-Mar-2014 V1.0 M2M / IoT / devices 22/141
Functional view - copy machines maintenance - central side
application
communication with
remote side / gateway
communication with
user
events archiving
management
communication
with EIS
misc.: GIS, etc.
positioning
GIS: Geographic Information System
EIS: Enterprise Information System
23. 15-Mar-2014 V1.0 M2M / IoT / devices 23/141
how to get information from the copy machine?
which type(s) of network(s)?
how to locate copy machines?
is some local, dedicated storage required?
which functions will be required for next version?
etc.
answers impact physical architecture...
Functional view - copy machines maintenance - questions
24. 15-Mar-2014 V1.0 M2M / IoT / devices 24/141
Copy machine example is very simple, at an application-level
point of view
Taxi dispatch system is much more fun
Functional view - taxi dispatch example
25. 15-Mar-2014 V1.0 M2M / IoT / devices 25/141
Taxi request dispatch
● customer request allocated to the best taxi
Taxi request follow-up
● to anticipate request dispatch, when heavy traffic
Credit card payments
General messages (e.g. « speed camera at... »)
Personal messages (e.g. « call your wife back »)
Security alarm, with audio monitoring
Taxi locating
Information about distribution of taxis over the city
Information about distribution of customer requests
Etc.
Functional view - taxi dispatch - requirements - 1/3
26. 15-Mar-2014 V1.0 M2M / IoT / devices 26/141
Functional view - taxi dispatch - requirements - 2/3
Taxis waiting at taxi stand
Cruising taxi
Central dispatch office
Simplified dispatch algorithm
· city is divided in sectors
· one taxi stand at most per sector
· taxis can be waiting at a stand, or cruising
· taxi request dispatch:
• sector is selected (depending on customer
address)
• if taxis waiting at stand, first taxi complying with
services requirements is selected
• if stand is empty, a cruising taxi is selected
(usually the nearest one)
• if no cruising taxi in sector, search is broadened
to neighbouring sectors
• etc.
· selected taxi driver must acknowledge the request
Sector 1
Sector 2
27. 15-Mar-2014 V1.0 M2M / IoT / devices 27/141
Functional view - taxi dispatch - requirements - 3/3
To taxi: are you really here? If yes, here is a request for your driver
From taxi to dispatch office: yes, I'm here
Displayed to driver:
Services
requirements.
Do you accept them?
Displayed to driver:
Address.
Do you accept the request?
From driver to dispatch office: yes, I accept the request
Request allocated to taxi 1
Taxi 1
To other taxis at same stand: request allocated to taxi 1
29. 15-Mar-2014 V1.0 M2M / IoT / devices 29/141
same questions than for copy machines (interface with
taximeter, type(s) of network(s), taxi positioning, etc.)
additionally:
● how to send “asynchronous” downlink messages?
● optimized way to “broadcast” messages to groups of taxis?
● how to mix data and voice (for alarms)?
● how to ensure that taxis can still receive missions if network is shared
with some other users?
● etc.
Functional view - taxi dispatch - questions
30. 15-Mar-2014 V1.0 M2M / IoT / devices 30/141
Application on remote side and on central side
● example of a dispatch system for taxis. On remote side (in taxi):
• list previous missions
• check number of taxis waiting in each station
• etc.
Application depends on end-user:
● maintenance of copy machines
● taxi dispatch
● container tracking
● environmental monitoring
● transport of persons
● SCADA
● logistics
● etc.
Functional view - application - 1/2
31. 15-Mar-2014 V1.0 M2M / IoT / devices 31/141
Application is distributed over remote side and central side
● Back to mission dispatch - on central side:
• central side selects taxi
• it checks it is still available
• it transmits mission
• it checks that taxi driver accepted it
• etc.
● On remote side (taxi):
• remote side receives mission and displays it to taxi driver
• it updates taxi status and mission status
• etc.
Functional view - application - 2/2
32. 15-Mar-2014 V1.0 M2M / IoT / devices 32/141
Functions on central side
Functions on remote side
High-level functions (application) depends heavily on end-user
needs
High-level functions have usually to be distributed over central
side and remote side
Functional view - summary
37. 15-Mar-2014 V1.0 M2M / IoT / devices 37/141
central side:
● well-known technical elements: computers (PC, servers, network
equipments, etc.)
● interface with communication network (PMR, PLMN)
● Computer Telephony Integration (CTI)
● Geographical Information System (GIS) functions
● etc.
● software
PMR: Private / Professional Mobile Radio
PLMN: Public Land Mobile Network
Physical architecture - taxi dispatch - central side
38. 15-Mar-2014 V1.0 M2M / IoT / devices 38/141
remote side:
● example of remote system:
• hidden on-board device
• device on the dashboard (e.g. touch screen) for GUI
● processor + memory (ROM and RAM) – on the two devices
● communication module in on-board device
● location system (usually GNSS)
● alarm button
● physical interface with the taximeter
● software
Physical architecture - taxi dispatch - remote side
GNSS: Global Navigation Satellite System
40. 15-Mar-2014 V1.0 M2M / IoT / devices 40/141
Software architecture - 1/2
Central sideRemote side
OS
remote device
communication services - remote
application software - remote
OS
PC / serverperipheral devices
communication services - central
software components - central
component
component
component
software components - remote
component
component
component
application software - central
OS API
communication services APIcommunication services API
OS API
components APIscomponents APIs
communication protocols
components protocols
application protocols Customer-
dedicated
integration
Technical
components
Communication
Execution
platforms
41. 15-Mar-2014 V1.0 M2M / IoT / devices 41/141
communication layer:
● bidirectional messaging
● file transfer
● roaming optimization
● etc.
technical components layer (almost generic)
● mission dispatch handling
● alarm with end to end acknowledgement
● software odometer
● etc.
application layer:
● adaptation to end-user needs
This is an ideal view
Software architecture - 2/2
42. 15-Mar-2014 V1.0 M2M / IoT / devices 42/141
hardware (on remote side):
● processing + interfacing + communication + ...
● embedded / on-board devices
● even if very simple, a user interface is a good thing
● can be quite costly – cost of installation to be considered as well
network:
● various possible solutions, depending on needs / cost / etc.
software:
● as for functions: distributed
● must support loss of connectivity when using wireless connectivity
Physical architecture - summary
43. 15-Mar-2014 V1.0 M2M / IoT / devices 43/141
Networks - table of contents
Overview
Important characteristics for M2M
Wireless networks
● PMR
● low power
● 2.5 G / 3G / 4G
● satellites
● Wi-Fi
● Bluetooth, ZigBee, Z-Wave
● RFId
● NFC
Wired networks
● leased lines
● PSTN
● ADSL
44. 15-Mar-2014 V1.0 M2M / IoT / devices 44/141
central part of M2M systems
wireless or wired
a given system can use several network technologies
● to increase connectivity reliability
● to increase connectivity coverage
● to provide specific properties (low power, QoS, etc.)
● to support legacy equipments
● to lower operating costs / capital costs
● etc.
QoS: Quality of Service
Networks - overview - 1/4
45. 15-Mar-2014 V1.0 M2M / IoT / devices 45/141
Networks - overview - 2/4
communication
network
communication
module
processor +
memory
remote system
interface
with controlling
equipment
data transmission
over network medium
interfaces
location
system
user interface
46. 15-Mar-2014 V1.0 M2M / IoT / devices 46/141
Networks - overview - 3/4
interface with controlling equipment
● often over a serial interface (V.24 / RS-232)
• 3 wires minimum: RX / TX / GND
● data is transmitted in frames over the serial interface
● example (Digi XTend RF module):
● data transparency: escape reserved bytes
● data: command or event
• transmit request, transmit status,received data, etc.
0x7E
Start delimiter
byte 1
MSB LSB
Length
bytes 2, 3
data
Frame data
bytes 4 - n
CS
Checksum
byte n + 1
[V241]
[Dig1]
47. 15-Mar-2014 V1.0 M2M / IoT / devices 47/141
Networks - overview - 4/4
● another example: AT commands
• very common – used for wired and wireless network equipments
• human readable
• command / response – intermediate result codes – unsolicited result codes
• command example: define context for data communication over 3G:
command: AT+CGDCONT=3,”IP”,”orange.m2m.sec”
response: OK
[3GP1]
48. 15-Mar-2014 V1.0 M2M / IoT / devices 48/141
shared or not
geographic coverage + possibility to adapt it
latency
connectivity setup time
addressability
required power for transmission
terminal cost
communication cost
throughput
confidentiality
reliability
availability
etc.
(Wireless) networks - important characteristics for M2M
49. 15-Mar-2014 V1.0 M2M / IoT / devices 49/141
PMR = Professional Mobile Radio
not accessible to general public
frequency + associated bandwidth allocated to a user for a given period
user: private or public organization (company, city, association, etc.)
cost: annual fee (“license fee”) per terminal
● fee = I x bf x c x k4 + n x G
• I: bandwidth, in MHz
• bf: depends on frequency
• c: depends on coverage
• k4: constant
• n: number of mobile users
• G: constant
Wireless networks - PMR - regulation (France)
[ARC1]
[ANF1]
50. 15-Mar-2014 V1.0 M2M / IoT / devices 50/141
Frequency (bands):
● 40 MHz, 80 MHz, 150 MHz, 400 MHz, etc.
Channel spacing:
● 6,25 kHz, 12,5 kHz, 25 kHz, 200 kHz, etc.
Technology:
● analog – voice + data (modem) – 6,25 or 12,5 kHz channels – 1200 b/s
● digital:
• DMR (Digital Mobile Radio) – 2 slot TDMA over 12,5 kHz channels – 9000 kb/s for 2 slots
• dPMR – FDMA over 6,25 kHz channels – 4800 b/s
• TETRA (TErrestrial Trunk RAdio) – 4 slot TDMA over 25 kHz channels – 7200 b/s per slot – for
shared networks
• TETRAPOL – FDMA – for shared networks
• etc.
Coverage:
● from 30 km (mono-site) up to wide area coverage (multi-sites / trunk)⋍
Wireless networks - PMR - characteristics
51. 15-Mar-2014 V1.0 M2M / IoT / devices 51/141
analog:
● let's forget about it...
digital:
● DMR: status messages (≤ 128 bytes) - short messages (≤ 36 bytes) –
packet data
● dPMR: short messages (≤ 100 bytes) - packet data
● TETRA: short messages (≤140 bytes) – packet data - Peripheral
Equipment Interface specified (AT commands)
More information on other slide about integration
Wireless networks - PMR – system integration
[DMR1]
[dPM1]
[TET1]
52. 15-Mar-2014 V1.0 M2M / IoT / devices 52/141
in 2012:
● around 26.000 PMR networks in France
users:
● taxis, public transports, ambulances, airports, highways, security,
industry, constructions, etc.
● public organizations: cities, hospitals, etc.
Wireless networks - PMR - France
53. 15-Mar-2014 V1.0 M2M / IoT / devices 53/141
AFP = Appareils de Faible Puissance et de Faible Portée
freely accessible
6.8 MHz, 13.6 MHz, 27.0 MHz, 40.7 MHz, 433.0 MHz, 434.0 MHz, 863-868... MHz,
2.4 GHz, 5.7-5.9 GHz, 24... GHz, 61 GHz, 122-123 GHz, 244-246 GHz
ERP: depends on frequency - from 1 mW to 500 mW
some restrictions on duty cycle, on channel spacing, etc.
some other frequencies, for specific equipments
usual range: up to a few kilometers, unobstructed LoS
[ANF2]
ERP: Effective Radiated Power
LoS: Line of Sight
Wireless networks - unlicensed - France
54. 15-Mar-2014 V1.0 M2M / IoT / devices 54/141
Radio modem
Proprietary protocols:
● over network medium (radio):
• transmitted packets format (preamble, address, payload, error detection
code, error correction code) - open or not
• data exchanges between a transmitter and a receiver (ack'ed or not, timed
wakeup periods, etc.) - open or not
● with controlling equipment:
• interface with a controlling equipment (serial cable + messages, USB cable +
messages, etc.) - usually open (see previous slide)
Throughput: several 1000s of b/s
Examples:
● Digi, Wavenis, SATEL, etc.
Wireless networks - unlicensed – system integration
55. 15-Mar-2014 V1.0 M2M / IoT / devices 55/141
For a given radiated power and a given bit error rate, range can
be increased:
● use lower bit rate for traditional modulation technologies. But this
narrows spectrum => precise frequency reference is required to decode
received modulation.
● use spread spectrum modulation. But processing is complex.
Examples:
● SIGFOX (choice 1) - technology + network operator
• range: documented as up to 40 km LoS
● LoRa (Semtech) (choice 2) - technology (chipsets)
• range: documented as up to 15 km LoS
[SIG1]
[LoR1]
Wireless networks - unlicensed - long range
56. 15-Mar-2014 V1.0 M2M / IoT / devices 56/141
PLMN (Public Land Mobile Network)
“public” networks: shared between anybody who subscribes
broad coverage but target is population, not territory
global (worldwide) standardization
Wireless networks - 2.5G / 3G / 4G
57. 15-Mar-2014 V1.0 M2M / IoT / devices 57/141
Wireless networks - 2.5G / 3G / 4G
Data services:
● CSD (Circuit Switched Data): obsolete
● SMS (Short Message Service)
• 140 to 160 characters / bytes
● USSD (Unstructured Supplementary Service Data)
• usually reserved to the operator
● packet data - IP compatible
• throughputs (beware: uplink downlink):≪
• 2.5G: 8 to 40 kb/s (GPRS) – EDGE = GPRS x 3
• 3G: 2 Mb/s non-moving, 384 kb/s moving
• 3.5G: 14.4 Mb/s (HSDPA)
• 4G: 100 Mb/s and more (LTE)...
GPRS: General Packet Radio Service
EDGE: Enhanced Data rates for GSM Evolution
HSDPA: High-Speed Downlink Packet Access
LTE: Long Term Evolution
58. 15-Mar-2014 V1.0 M2M / IoT / devices 58/141
Wireless networks - 2.5G / 3G / 4G
APN (Access Point Name):
● name of gateway between 2.5G / 3G / 4G network and another network
(usually the Internet)
● defined by the operator
● for the Internet, defines following gateway characteristics:
• static or dynamic IP address
• public or private IP address
• allowed protocols (TCP, UDP, etc.)
• allowed ports
59. 15-Mar-2014 V1.0 M2M / IoT / devices 59/141
Wireless networks - 2.5G / 3G / 4G – PPP session
mobile network
the Internet
APN (GGSN)
1 - register
2 – define and activate context
=> comm. module known
to network
=> IP address assigned to
comm. module
3 – start a PPP session
=> IP address assigned to
remote system
communication
module
remote
system
AT commands
GGSN: Gateway GPRS Serving Node
60. 15-Mar-2014 V1.0 M2M / IoT / devices 60/141
Wireless networks - 2.5G / 3G / 4G – wireless router
mobile network
the Internet
APN (GGSN)
1 - register
2 – define and activate context
=> comm. module known
to network
=> IP address assigned to
comm. module
communication
module
remote
system
AT commands
3 – define NAT / PAT rule
=> comm. module
performs NAT / PAT
61. 15-Mar-2014 V1.0 M2M / IoT / devices 61/141
Wireless networks - satellites - 1/2
geostationary orbits
● characteristics:
• 36.000 km above the Earth
• satellite seen from Earth as stationary
• coverage restricted to known zone
• minimum end-to-end latency: 2 x 36.000 km / 300.000 km/s => 240 ms
● Inmarsat:
• BGAN M2M: IP at up to 448 kb/s – latency from 800 ms – global coverage except polar
regions
• IsatM2M: messages of 25 (U) / 100 (D) bytes – latency 30 to 60 s – global coverage
except polar regions
• IsatData Pro: messages of 6.4 (U) / 10 (D) kB – latency 15 to 60 s – global coverage
except polar regions
● Thuraya
BGAN: Broadband Global Area Network
[Inm1] [Thu1]
62. 15-Mar-2014 V1.0 M2M / IoT / devices 62/141
Wireless networks - satellites - 2/2
low earth orbit (LEO)
● characteristics:
• satellites constantly in motion around the Earth
• altitude: 170 – 2000 km => period: 90 – 130 min.
• low power
• higher latency !
● Orbcomm:
• messages of 6 to 30 bytes
• average latency: 6 min.
• global coverage
● Globalstar
● Iridium
● Argos
[Orb1] [Glo1] [Iri1] [Arg1]
63. 15-Mar-2014 V1.0 M2M / IoT / devices 63/141
Wireless networks – short distance - 1/3
Wi-Fi
● wireless local area network (WLAN) technology based on IEEE802.11
standards
● Wi-Fi Alliance owns the brand (not an abbreviation...)
● range: usually up to 100 m outdoors
Bluetooth
● originally designed to replace serial cables – personal area network
(PAN)
● managed by the Bluetooth Special Interest Group
● range: less than 100 m
● many profiles
● Bluetooth Low Energy (part of V4.0)
[WiF1] [Blu1]
64. 15-Mar-2014 V1.0 M2M / IoT / devices 64/141
Wireless networks – short distance - 2/3
ZigBee
● managed by ZigBee Alliance
● low-power
● range: up to 100 m
● mesh network => long distance by retransmitting data
Z-Wave
● managed by Z-Wave Alliance - for home automation
● low-power
● range: around 30 m
● mesh network
[Zig1] [Zig2] [ZWa1] [ZWa2]
65. 15-Mar-2014 V1.0 M2M / IoT / devices 65/141
Wireless networks – short distance - 3/3
RFId:
● Radio-Frequency Identification
NFC:
● Near Field Communication
That's more an identification technology than a network
technology
● => see Devices section
66. 15-Mar-2014 V1.0 M2M / IoT / devices 66/141
Fixed networks - 1/2
Leased lines
● permanent connection between two locations
● analog or digital – symmetric throughput (unlike ADSL)
● example for France:
• Orange Transfix: up to 2048 Kb/s
● for M2M: more or less obsolete
Public Switched Telephone Network (PSTN)
●
requires a modem (modulator – demodulator)
●
up to 56 Kb/s
● cost proportional to duration
●
long setup time (up to 20 or 30 s)
●
for M2M: more or less
[Tra1] [Lea1]
67. 15-Mar-2014 V1.0 M2M / IoT / devices 67/141
Fixed networks - 2/2
Asymmetric Digital Subscriber Line (ADSL)
● pseudo permanent connection
● think about connection ownership. For instance, when used for home
automation services, the connection owner is the home owner, not the
service provider...
68. 15-Mar-2014 V1.0 M2M / IoT / devices 68/141
Networks - summary - 1/3
Techno Shared Range Latency Setup time
PMR no from 30 km up to wide area depends on
architecture
0
low power yes up to 10 (40) km depends on
architecture
0
2.5G/3G yes wide area from 100 ms up to
1 s
from 2 s to 5 s
4G yes wide area 50 ms 1 s
satellites
geo
yes global 800 ms to 60 s
satellites
LEO
yes global min
Wi-Fi yes local ms s
69. 15-Mar-2014 V1.0 M2M / IoT / devices 69/141
Networks - summary - 2/3
Techno Addressability TX power Equipment cost Comm.
cost
PMR full W 100s € 0 €
low power full mW 10s € 0 €
2.5G/3G restricted W 100s € flat rate
4G restricted W 100s € --> 10s € flat rate
satellites
geo
restriced W 1000s € high
satellites
LEO
restricted W 100s € high
Wi-Fi full mW 10s € 0 €
70. 15-Mar-2014 V1.0 M2M / IoT / devices 70/141
Networks - summary - 3/3
Many different technologies
Understanding real user needs is important, to choose the right
network technology
● example of a fixed network technology used for a mobile application!
Perhaps the most important part of an M2M system, as it
transmits data between the two sides of a system
Perhaps the most difficult part of an M2M system, at a technical
point of view
71. 15-Mar-2014 V1.0 M2M / IoT / devices 71/141
Connected devices - contents
Introduction
Processor + memory
Interfaces with machine
Communication with central side
Storage
Positioning
Identification
Typology
Software
72. 15-Mar-2014 V1.0 M2M / IoT / devices 72/141
Connected devices - introduction - 1/2
What we saw in previous sections:
communication
module
processor +
memory
remote system
interfaces
location
system
user interface
communication
networkConnectivity is usually intermittent
73. 15-Mar-2014 V1.0 M2M / IoT / devices 73/141
Connected devices - introduction - 2/2
processor +
memory
communication
module
location
system
analog
inputs
digital I/O
Example:
[COO1]
74. 15-Mar-2014 V1.0 M2M / IoT / devices 74/141
Connected devices - processor + memory - 1/3
usually: microcontroller
legacy microcontroller - example: Freescale 68HC11E1
● 8 bits
● 3 MHz
● RAM: 512 bytes - EEPROM: 512 bytes
● 38 General Purpose I/O (GPIO)
● 1 x Asynchronous Serial Communications Interface (SCI)
● 1 x Synchronous Serial Peripheral Interface (SPI)
● 8 x 8-Bit Analog-to-Digital Converter (ADC)
● 16-bit Timer System
● address / data bus for external memory
● bootstrap mode
● price: US$7 (10.000)⋍
76. 15-Mar-2014 V1.0 M2M / IoT / devices 76/141
Connected devices - processor + memory - 3/3
recent microcontroller - example: NXP LPC1837JET256
● 32 bits - ARM Cortex-M3 core
● 3-stage pipeline, modified Harvard architecture
● 180 MHz
● RAM: 136 KB - Flash: 1024 KB
● 6 x PWM
● 4 x UART - 2 x I2C - 2 x SPI
● 2 x CAN - 2 x USB - 1 x Ethernet
● 8 x 10-bit ADC
● 4 x 32-bit timers
● price: ⋍ US$8.30 (unit)
CAN: Controller Area Network
USB: Universal Serial Bus
77. 15-Mar-2014 V1.0 M2M / IoT / devices 77/141
Connected devices - interfaces with machine - digital input
Hardware:
● two main types:
• read a voltage (high / low)
• check open / closed circuit
● use GPIO
● an optocoupler may be required
Software:
● configure chosen pin
● use interrupt routine
● debounce may be required (a hardware debouncer is sometimes
provided by the microcontroller)
78. 15-Mar-2014 V1.0 M2M / IoT / devices 78/141
Connected devices - interfaces with machine - digital output
Hardware:
● two main types:
• set a voltage (high / low)
• close / open a circuit
● use GPIO
● an optocoupler may be required
● a relay may be required
Software:
● configure chosen pin
79. 15-Mar-2014 V1.0 M2M / IoT / devices 79/141
Connected devices - interfaces with machine - analog input
Hardware:
● use ADC
● signal conditioning may be required
● some microcontrollers provide integrated Op Amp (e.g. PIC16F527)
● important parameters: resolution and sampling rate
Software:
● configure chosen pin
● use interrupt routine (end of conversion)
ADC: Analog-to-Digital Conversion
80. 15-Mar-2014 V1.0 M2M / IoT / devices 80/141
Connected devices - interfaces with machine - serial buses - long distance - V.24
Serial interface - V.24 (+ V.28 + ISO/IEC 2110)
● for every direction, bytes are serialized and transmitted over one wire
● minimum 3 wires: transmitted data, received data, signal ground
● additional wires for control signals (request to send, ready for sending, data
set ready, calling indicator, etc.)
● bit to 1: -15 V < voltage < -3 V
● bit to 0: +3 V > voltage > +15 V
Max. length: usually < 15 m
Connection between DTE (PC) and DCE (modem). For other
configurations, you usually have to think twice
Connectors: DB-25, DB-9
USA: RS-232 (TIA-232)
[V241] [FAR1] DTE: Data Terminal Equipment
[TIA1] DCE: Data Circuit-terminating Equipment
81. 15-Mar-2014 V1.0 M2M / IoT / devices 81/141
Connected devices - interfaces with machine - serial buses - short distance - serial - 1/2
For a V.24 link:
● 1. bytes are serialized using an UART
● 2. voltage levels are shifted from TTL/CMOS to V.28
UART: Universal Asynchronous Receiver Transmitter
UART
Address bus
Control bus
RX TTL
TX TTL
GND
level shifter
TX V.24
RX V.24
GND
CPU
For short distances, level shifting may be omitted
83. 15-Mar-2014 V1.0 M2M / IoT / devices 83/141
Connected devices - interfaces with machine - serial buses - short distance - SPI - 2/2
Defined by Motorola (now Freescale)
Full duplex, clock up to a few MHz
One master, one chip select per slave
4 wires
Applications:
● short distance communication (in main board vicinity)
● exemples:
• sensors (temperature, pressure, etc.)
• memory (EEPROM, etc.)
• LCD
• etc.
84. 15-Mar-2014 V1.0 M2M / IoT / devices 84/141
Connected devices - interfaces with machine - serial buses - short distance - I2
C - 1/2
I2C (Inter-Integrated Circuit)
[I2C1]
85. 15-Mar-2014 V1.0 M2M / IoT / devices 85/141
Connected devices - interfaces with machine - serial buses - short distance - I2
C - 2/2
Defined by Philips (now NXP)
Multi-master
Clock up to a few MHz
2 wires
Applications:
● same than SPI
86. 15-Mar-2014 V1.0 M2M / IoT / devices 86/141
Connected devices - communication with central side
See Networks section
88. 15-Mar-2014 V1.0 M2M / IoT / devices 88/141
Connected devices – outdoor positioning - GNSS - 1
Global Navigation Satellite System
● mostly for outdoor use
● working principles:
• constellation of satellites
• every satellite sends messages: satellite position, message time
• satellite time is very accurate (atomic clock)
• listening to 3 satellites, the GNSS receiver estimates its location on earth
(distance = difference of time x speed of light)
• that's only an estimate (the receiver does not have an atomic clock)
• using a 4th satellite, the receiver synchronizes its clock
• => real location can be computed
● satellite orbits: MEO (20 000 km), GEO (36 000 km)
● speed of light (approx.) : 3 x 108 m / s : 10 m <=> 33 ns
● fix: position
89. 15-Mar-2014 V1.0 M2M / IoT / devices 89/141
Connected devices – outdoor positioning – GPS – 1/2
GPS: USA system
31 operational satellites (24-Dec-2013)
MEO orbit: 20 200 km
at any time, any point on Earth can see 4 satellites
accuracy:
● depends on receiver quality, on satellites being used, etc.
● documented as better than 8 m with 95% confidence level
● usual accuracy: 20 m – see next slide for real-life example
Dilution of Precision (DOP – PDOP/HDOP/VDOP):
● how error in measures impact error in computed location
● good when < 6
[GPS1]
90. 15-Mar-2014 V1.0 M2M / IoT / devices 90/141
Connected devices – outdoor positioning – GPS – 2/2
example of accuracy:
● GPS receiver indoor, not far from a window => lower reception quality
● one location every 2 s, for 15 minutes
● several locations are more than 60 m far from the real location
91. 15-Mar-2014 V1.0 M2M / IoT / devices 91/141
Connected devices – outdoor positioning – other GNSS
GLONASS: Russia (formerly USSR) system
● 23 operational satellites (22-Feb-2014)
● MEO: 19 100 km
Galileo: Europe
● target: 30 satellites – MEO: 23 200 km
● currently: 4 satellites (12-Dec-2013: first airborne tracking)
BeiDou ( 北斗 ): China
● target: 5 GEO satellites + 30 MEO satellites
● currently: 10 satellites – operational over China
Japan (QZSS), India (IRNSS)
[GLO1] [Bei1]
[Gal1] [GNS1]
92. 15-Mar-2014 V1.0 M2M / IoT / devices 92/141
Connected devices – outdoor positioning – augmentation systems – 1/2
To increase accuracy (and integrity):
● differential GPS
• a GPS receiver placed at a location known with very good accuracy is used
to generate corrections send to other GPS receivers
• another receiver is required
•
=> ⋍ 3 – 5 m accuracy
● SBAS (Satellite-Based Augmentation Systems)
• additional satellites broadcast corrections
• no other receiver required
•
=> ⋍ 1 – 3 m accuracy
• USA: WAAS (Wide Area Augmentation System)
• Europe: EGNOS (European Geostationary Navigation Overlay Service)
• India: GAGAN (GPS Aided Geo Augmented Navigation
• Japan: MSAS (Multi-functional Satellite Augmentation System)
93. 15-Mar-2014 V1.0 M2M / IoT / devices 93/141
Connected devices – outdoor positioning – augmentation systems – 2/2
A-GPS (Assisted GPS)
● mainly for PLMN terminals (your mobile phone...)
● almanac (coarse orbit and status information for all satellites) and
ephemeris (precise orbit for one satellite) data are sent to the GPS
receiver using the mobile network
● this reduces TTFF (Time To First Fix)
● data generated by mobile operators, or by OTT players (Google, etc.)
RTK (Real-Time Kinematic)
● signal phase is used, to get an accuracy up to a few centimeters
● fix computation can be quite long
OTT: Over The Top
94. 15-Mar-2014 V1.0 M2M / IoT / devices 94/141
Connected devices – outdoor positioning – GNSS integration – 1/2
communication
module
processor +
memory
remote system
interfaces
location
system
user interface
controlling
interface
95. 15-Mar-2014 V1.0 M2M / IoT / devices 95/141
Connected devices – outdoor positioning – GNSS integration – 2/3
interface:
● usually: serial (V.28 or TTL / CMOS)
● usually: implements subset of NMEA 0183 standard
NMEA: National Marine Electronics Association [NME1] [NME2]
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
Where:
GGA Global Positioning System Fix Data
123519 Fix taken at 12:35:19 UTC
4807.038,N Latitude 48 deg 07.038' N
01131.000,E Longitude 11 deg 31.000' E
1 Fix quality: 0 = invalid
1 = GPS fix (SPS)
2 = DGPS fix
3 = PPS fix
4 = Real Time Kinematic
5 = Float RTK
6 = estimated (dead reckoning) (2.3 feature)
7 = Manual input mode
8 = Simulation mode
08 Number of satellites being tracked
0.9 Horizontal dilution of position
545.4,M Altitude, Meters, above mean sea level
46.9,M Height of geoid (mean sea level) above WGS84
ellipsoid
(empty field) time in seconds since last DGPS update
96. 15-Mar-2014 V1.0 M2M / IoT / devices 96/141
Connected devices – outdoor positioning – GNSS integration – 3/3
Interface (cont'd):
● most manufacturers provide their own protocol:
• SiRF (then CSR, now Samsung) – u-blox - SkyTraq [on-going Indiegogo
crowdfunded project] – ST – Broadcom – etc.
• most receivers are multi-constellations (GPS, GLONASS, Galileo, BeiDou)
Important: antenna placement
May be important: tamper protection
● antenna cable short circuit and antenna removal events
[SiR1] [Sky1]
[ubl1] [Ind1]
97. 15-Mar-2014 V1.0 M2M / IoT / devices 97/141
Connected devices – outdoor positioning – misc.
Devices can be positioned by the network:
● trilateration (several time measures)
● triangulation (several angle measures)
● cell identification
● “fingerprinting”
● dead reckoning (inertial sensor fusion: accelerometer + magnetometer
and filtering)
● more ?
Position may be computed by / available at
● device side
● network side
98. 15-Mar-2014 V1.0 M2M / IoT / devices 98/141
Connected devices – indoor positioning
All previously listed technologies may be used for indoor
positioning, depending on constraints
But no easy-to-integrate, generic system exists today
Domain still waiting for more innovation
99. 15-Mar-2014 V1.0 M2M / IoT / devices 99/141
Connected devices – identification – 1/3
Some systems have to identify external objects:
● truck trailers
● shipping containers
● bottles of perfumes
● etc.
100. 15-Mar-2014 V1.0 M2M / IoT / devices 100/141
Connected devices – identification – 2/3
RFID (Radio Frequency Identification):
● tag / label with (almost) unique identity
• passive (no battery) or active (battery)
• read-only or read/write
● reader: transmits (=> data over energy)
● a passive tag uses incoming energy to transmit back its data
● as usual, distance depends on power, antenna and frequency
● from a few tens of centimeters up to a few meters (more is possible)
NFC (Near-Field Communication):
● purposely short distances only (a few centimeters)
● for secure applications (e.g., contactless payment)
101. 15-Mar-2014 V1.0 M2M / IoT / devices 101/141
Connected devices – identification – 3/3
Questions: how to identify objects on a global basis, and let
every organization exchange object data?
Part of the answer: GS1
● international not-for-profit organization
● delivers standards, services and solutions
● standards:
• barcodes
• EPCglobal: tag data, tag protocols, reader protocols, ONS (Object Name
Service), discovery services, etc.
• etc.
A world unto itself...
[GS11]
102. 15-Mar-2014 V1.0 M2M / IoT / devices 102/141
Connected devices – typology – 1/4
How two classify devices?
One possible taxonomy: level of freedom for the integrator
● 1/ fully programmable device
• write your own program and install it into the device
● 2/ customizable device
• define, activate and combine several rules
• ex.: if (input 10 is 1) and (distance to pos1 > 100) then send an alarm
● 3/ parameterizable device
• define values for available parameters
• ex.: address of server, period between two value transmissions
103. 15-Mar-2014 V1.0 M2M / IoT / devices 103/141
Connected devices – typology – 2/4
Another taxonomy: application software hosting
● 1/ microcontroller board with communication module
• application software is run by the microcontroller
• communication module is seen as a peripheral device
104. 15-Mar-2014 V1.0 M2M / IoT / devices 104/141
Connected devices – typology – 3/4
Application software hosting:
● 2/ programmable communication module
• application software is run by the communication module
• some additional interfaces may be required
[Sie1]
106. 15-Mar-2014 V1.0 M2M / IoT / devices 106/141
Connected devices – software
What we saw in a previous section:
OS
remote device
communication services - remote
application software - remote
peripheral devices
software components - remote
communication services API
OS API
components APIs
● application layer
● component layer
● communication layer
● OS layer
● hardware layer
107. 15-Mar-2014 V1.0 M2M / IoT / devices 107/141
Connected devices – software – OS layer – 1/4
Three possibilities:
● 1/ no OS
• ISRs (Interrupt Service Routines) / interrupt handlers + background task
• ISRs called on external events: byte received on serial input, byte sent on
serial output, input goes from low to high, etc.
• ISRs called on internal events: timer(s), end of A/D conversion, watchdog
timeout, etc.
• ISRs and background task communicates using flags and buffers
• no software overhead, you know what you do
• you must know what you do (synchronization, interrupt priorities, etc.)
108. 15-Mar-2014 V1.0 M2M / IoT / devices 108/141
Connected devices – software – OS layer – 2/4
● 2/ RTOS
• an RTOS has deterministic timing behavior
• FreeRTOS
• free, open source
• minimum memory: 10 KB Flash (without libraries), a few KB RAM
• ThreadX
• open source, one license, royalty free
• minimum memory: 2 KB Flash (without libraries), a few KB RAM
• eCos
• free, open source
• minimum memory: ?
• VxWorks
• let's talk about business
• minimum memory: ?
• many, many other RTOS...
[eCo1] [Fre1] [Thr1] [VxW1] [RTO1]
109. 15-Mar-2014 V1.0 M2M / IoT / devices 109/141
Connected devices – software – OS layer – 3/4
● How to select an RTOS:
• supported target microcontrollers
• minimum requirements for Flash and RAM
• technical requirements: interrupt latency, scheduling policy, synchronization
facilities, inter-thread communication, etc.
• development environment (IDE)
• IP stack (TCP, UDP, SMTP, FTP, etc.)
• file system (Flash)
• source code availability
• support
• existing community
• licensing scheme
• etc.
IDE: Integrated Development Environment
110. 15-Mar-2014 V1.0 M2M / IoT / devices 110/141
Connected devices – software – OS layer – 4/4
● 2/ OS
• if you have “lot of” memory and processing power, you can consider
a standard OS.
• example: Linux
• patches can transform Linux kernel into a real-time kernel
• minimum memory: 256 KB Flash, 512 KB RAM
• Free Electrons web site: lot of information
• example: Android
• Android is based on Linux
• provides high level services (GUI, APIs for audio, video, GPS, file
system, etc.)
• Java language
• BEWARE: Android can choose to kill your running application
[Fre1]
111. 15-Mar-2014 V1.0 M2M / IoT / devices 111/141
Connected devices – software – programming languages
Available languages
● depends on (RT)OS
● if you want to have fun: assembly language(s)
● very common: C / C++
● Java (Android...)
● Python
● Lua
● etc.
113. 15-Mar-2014 V1.0 M2M / IoT / devices 113/141
Middleware – definition – 1/2
Wikipedia:
Middleware is computer software that provides services to
software applications beyond those available from the
operating system.
OS
remote device
communication services - remote
application software - remote
peripheral devices
software components - remote
communication services API
OS API
components APIs
middleware
114. 15-Mar-2014 V1.0 M2M / IoT / devices 114/141
Middleware – definition – 2/2
We will focus on
● communication
● device management
● platforms
115. 15-Mar-2014 V1.0 M2M / IoT / devices 115/141
Middleware – communication - requirements
Exchange data from one side to the other one
● reliably
● securely
● easily
● at low cost
Applying web technologies to M2M / IoT communications is
often not the right choice
● HTTP: request / response (=> polling), ASCII, complex parsing
● XML: verbose
● JSON: still too verbose
[JSO1]
116. 15-Mar-2014 V1.0 M2M / IoT / devices 116/141
Middleware – communication - frames
device generated data: binary data
data sent to devices: binary as well
data structures must be exchanged
it should be possible to transmit new data structures to devices not
yet configured to decode them
it should be possible to exchange data between computers coding
data in different ways (little endian, big endian)
=> ASN.1: defined 30 years ago by CCITT (now ITU-T) – not so
used in M2M/IoT...
Google re-invented a solution in 2008: Protocol Buffers – not so
used either in M2M/IoT...
libraries in various languages to encode / decode frames
ASN.1: Abstract Syntax Notation One CCITT: Comité Consultatif International Téléphonique et Télégraphique
ITU-T: International Telecommunication Union [End1] [ASN1] [Pro1]
117. 15-Mar-2014 V1.0 M2M / IoT / devices 117/141
Middleware – communication - protocols - MQTT
MQTT acronym comes from Message Queue (not present in
MQTT!) and Telemetry Transport (but MQTT is not restricted to
telemetry)
message transport
publish / subscribe (one to many - application decoupling)
based on TCP/IP (MQTT-SN for non TCP/IP networks)
small transport overhead
abnormal disconnection notification
free open source implementations:
● Eclipse Mosquitto (server)
● Eclipse Paho (clients in various languages)
[MQT1]
[MQT2]
118. 15-Mar-2014 V1.0 M2M / IoT / devices 118/141
Middleware – communication - protocols - CoAP
CoAP: Constrained Application Protocol
protocol maintained by the IETF
request / response – designed to easily interface with HTTP
based on UDP or equivalent
low transport overhead
low parsing complexity
resource discovery (a client queries a server)
several free open source implementations of CoAP (client,
server)
IETF: Internet Engineering Task Force [CoA1] [CoA2]
119. 15-Mar-2014 V1.0 M2M / IoT / devices 119/141
Middleware – communication - protocols - proprietary
Many device manufacturers developed their own protocols
● that's not difficult to do, for (really) experienced developers
● resulting protocol is often very well adapted to target use case
● there are many such proprietary protocols
Question:
● will those solutions be migrated to standards?
120. 15-Mar-2014 V1.0 M2M / IoT / devices 120/141
Middleware – device management – OMA DM
OMA DM: specified by Open Mobile Alliance (OMA)
OMA DM Supports:
● device provisioning (device initialization and configuration)
● software updates (application and system software)
● fault management (reporting faults, querying status)
For M2M: OMA Lightweight M2M (LWM2M)
● based on CoAP
● open source implementation: Eclipse Wakaama project proposal
[OMA1] [OMA3]
[OMA2]
121. 15-Mar-2014 V1.0 M2M / IoT / devices 121/141
Middleware – device management – proprietary
Serious device manufacturers developed their own DM
solutions, without waiting for standardization:
● Sierra Wireless
● Digi
● Mobile Devices
● etc.
Question:
● proprietary solutions are often very efficient
● will manufacturers switch to standardized solutions?
[PDM1] [PDM2]
122. 15-Mar-2014 V1.0 M2M / IoT / devices 122/141
Middleware – platforms – 1/5
What is an M2M / IoT platform?
● let's try a definition:
• a platform provides a set of low level services, allowing rapid deployment of
new applications.
• provided low level services:
• device connectivity
• device management
• application connectivity
• should provide as well:
• more reliability
• scalability
123. 15-Mar-2014 V1.0 M2M / IoT / devices 123/141
Middleware – platforms – 2/5
Central sideRemote side
OS
remote device
communication services - remote
application software - remote
OS
PC / serverperipheral devices
communication services - central
software components - centralsoftware components - remote
application software - central
OS API
communication services APIcommunication services API
OS API
components APIscomponents APIs
communication protocols
components protocols
application protocols
Customer-
dedicated
integration
Technical
components
Communication
Execution
platforms
125. 15-Mar-2014 V1.0 M2M / IoT / devices 125/141
Middleware – platforms – 4/5
Where is value as perceived by customer?
comm. layer
remote system central system
comm. layer
DM layer
DM layer
Layers solving
customer problem
Layers solving
customer problem
customer
pays for this
relative sizes of
software layers,
for a complex
system
126. 15-Mar-2014 V1.0 M2M / IoT / devices 126/141
Middleware – platforms – 5/5
System value as perceived by customer is outside of platform
realm
Additionally:
● a platform may prevent from using some devices (which do not
implement a supported protocol)
● a platform creates a protocol break
● when updating the platform, ALL users are impacted
● developing a communication layer + minimum device management is
not complex for an experienced team
=> Think twice before deciding on using a platform
Anyway, using a platform may be very nice, for some (simple)
applications, or to test a new service.
127. 15-Mar-2014 V1.0 M2M / IoT / devices 127/141
Application layer
So many points here...
● hosting (dedicated hosting, virtual machines, cloud, etc.)
● databases (SQL-type, NoSQL, Big Data, etc.)
● communication between various pieces of running code (concurrency,
messaging systems, Remote Procedure Call, publish / subscribe, etc.)
● Geographic Information Systems (GIS)
● Graphical User Interface (GUI) – web technologies, rich clients, etc.
● etc.
... that we won't talk about it.
128. 15-Mar-2014 V1.0 M2M / IoT / devices 128/141
Ecosystem - 1/2
Software editor
Middleware
editor
Application
software
component editor
Embedded
equipment
manufacturer
Positioning
technology
provider
Radio terminal
manufacturer
Network operator Integrator Installer
Geocoded data
provider
Customer Service provider
Embedded OS
editor
Customer's
customers
delivers to
129. 15-Mar-2014 V1.0 M2M / IoT / devices 129/141
Ecosystem - 2/2
Complex ecosystem!
Not fully mature yet
● at user requirements level
● at business models level
Most of current actors run several different activities
The integrator is the unique interface with the client: tough job!
An important actor: the installer
130. 15-Mar-2014 V1.0 M2M / IoT / devices 130/141
Standardization – 1/4
Some “old” standards:
● V.24
● SPI, I2C
● etc.
But that's really far from being enough
Let's dream:
● any remote system should be able to communicate with any central
system
● any central system should be able to communicate with any central
system
● any system receiving a new type of data should be able to know whether
it has to process this data, and what it means (semantics, ontology)
● etc.
[STA1]
132. 15-Mar-2014 V1.0 M2M / IoT / devices 132/141
Standardization – 3/4
Most of ETSI standardization work has been transferred to
oneM2M (starting on 2012)
oneM2M is a global partnership project (China, Japan, Europe,
North America, etc.)
OMA (Open Mobile Alliance) is member of oneM2M
goal:
develop technical specifications which address the need for
a common M2M Service Layer that can be readily embedded
within various hardware and software
[STA2]
134. 15-Mar-2014 V1.0 M2M / IoT / devices 134/141
Want to play?
Arduino: http://arduino.cc/
Raspberry Pi: http://www.raspberrypi.org/
Embedded Artists: http://www.embeddedartists.com/
cooking hacks: http://www.cooking-hacks.com/
GROVE System: http://www.seeedstudio.com/wiki/GROVE_System
OpenMote: http://www.openmote.com/
Eclipse IoT: http://iot.eclipse.org/
and many, many other ones...
135. 15-Mar-2014 V1.0 M2M / IoT / devices 135/141
Conclusion
M2M, IoT: buzzwords.
● understand end user needs
● get experienced in technologies
• telecommunications and electronics are important
• software is important
● get the global view
● monitor technology evolutions
This is a fun domain!
141. 15-Mar-2014 V1.0 M2M / IoT / devices 141/141
License
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
You are free to
● Share — copy and redistribute this material in any medium or format
● Adapt — remix, transform, and build upon this material for any purpose,
even commercially.
Under the following terms
● Attribution — You must give appropriate credit, provide a link to the
license, and indicate if changes were made. You may do so in any
reasonable manner, but not in any way that suggests the licensor
endorses you or your use.
● ShareAlike — If you remix, transform, or build upon the material, you
must distribute your contributions under the same license as the original.
See http://creativecommons.org/licenses/by-sa/4.0/