internet of things: an overview
TRANSCRIPT
Internet of ThingsAn overview
Pascal BODIN11-Feb-2017
V20170211
2/256
contents
functional
technical
business
project management
part 0 foreword
part 1 definition?
part 2 functional vs technical
part 3 practicals 1 - consumer
part 4 practicals 2 - business
part 5 architecture
part 6 devices
part 7 positioning
part 8 identification
part 9 communications
part 10 platforms
part 11 central side
part 12 big data
part 13 security
part 14 standardization
part 15 ecosystem
part 16 project perspective
part 17 want to play?
part 18 conclusion
3/256
0. foreword
4/256
who I am
Systev – Independent contractor – connected devices (4 months)
and
Orange Labs – Senior Software Engineer (2 years)
before:
– 11 years as M2M and IoT project manager + software engineer at OrangeLabs
– 4 years as co-founder + system developer + co-manager - home computing
– 14 years as co-founder + system developer + manager - M2M/IoT
– 4 years as team manager at France Telecom R&D
– 10 years as software engineer and/or project leader (McDonnell Douglasthen DEC)
(several periods with 2 simultaneous jobs...)
Master of Science in Engineering from Telecom Bretagne (French GrandeEcole) - 1982
5/256
point of view
integrator's point of view:
– structuring constraints:
– to deliver on committed date and committed budget
– to deliver a working system
– to integrate / rely on legacy subsystems
– to have the broad view
– target is customer satisfaction
– solving technical problems is only a means
6/256
1. definition?
7/256
in the '70s - '80s
[Def01] [Def02]
8/256
in the '70s - '80s
SCADA (Supervisory Control And Data Acquisition)
9/256
in the '90s
10/256
in the '90s
M2M (Machine to Machine)
LBS (Location Based Services)
11/256
in the '00s
12/256
in the '00s
IoT (Internet of Things)
13/256
one definition
Internet of things: the internetworking of physical devices, vehicles (alsoreferred to as "connected devices" and "smart devices"), buildings, andother items—embedded with electronics, software, sensors, actuators,and network connectivity that enable these objects to collect andexchange data.
many, many other ones...
[Def03]
14/256
definitions
many different definitions
related systems have been in use long before IoT acronym was invented
acronyms are successful because they simplify reality
reality:
– on one side: (large diversity of) user needs
– on the other side: (lot of) technologies
15/256
2. functional vs technical
16/256
some use cases – smart cities
Controlling shipping traffic in theNetherlands canals with wireless sensors
Saving water with Smart Irrigation Systemin Barcelona
Traffic and Road Conditions Monitoring inMalaga
[Fct01]
17/256
some use cases – smart agriculture
Precision Farming to control irrigation andimprove fertilization strategies on corncrops
Improving banana crops production andagricultural sustainability in Colombia
Preventing environmental impact inwastewater irrigation area for the largestmeat industry in Australia
18/256
some use cases – smart environment
Rain forest monitoring for climate changecontrol in Peru
Water and Air Quality Monitoring in CivilWorks
Monitoring Bee Health and GlobalPollination
19/256
some use cases – smart home
Smart appliances: remote diagnostics,proactive alerts, etc.
Water treatment: automated consumableordering, etc.
Fire and safety: property monitoring,emergency alert, etc.
[Fct02]
20/256
some use cases – smart xxx
many more use cases!!
21/256
analysis
many different use cases, with many different functions
all markets are affected:
– consumer– business
market push (for consumers?) / market pull (for business?)
provided value?
return on investment?
22/256
supporting technical fields
Question: which technical fields?
23/256
supporting technical fields
devices
– connected embedded electronic boards– gateways
interface to the physical world– sensors– actuators– I/O, bus
embedded software
secure element
network– wired– wireless– protocols
positioning
24/256
supporting technical fields
identification
mobile application
server-side application
– container, virtual machine– application server– web server– database management system– data analytics tools– geographical information system– thin client, thick client– graphical user interface
etc.
25/256
summary
many different use cases
many different technologies involved
26/256
3. practicals 1 - consumer market
27/256
home surveillance - specifications
the system must monitor the home
the home occupant informs the system when she leaves the home, andwhen she comes back
if somebody enters the home while the occupant is not supposed to bethere, the system sends an alarm to the occupant's mobile phone. Theoccupant can then watch a video clip of the main room.
Questions:
– do you need more specifications?– which technical components would you use?– what architecture would you design?
28/256
home surveillance – some questions
does the occupant own a smartphone? Android or iOS?
should video clip actually be a live video?
should video clips be archived?
can system devices be AC powered or should they be autonomous?
etc.
29/256
home surveillance – technical components
wireless motionsensor
wireless contactsensor
(wireless) (IP)video camera
(wireless) (IP)video camerawith motiondetection
ADSL gateway /router
cellular gateway /router
server
etc.
cellular videocamera with
motion detection
software
[Pr101] [Pr102][Pr103]
30/256
Internet
cellularnetwork
local wirelessnetwork
home surveillance – one possible architecture
31/256
existing ADSLmodem / router
Internet
cellularnetwork
Wi-Finetwork
home surveillance – another possible architecture
32/256
Internet
cellularnetwork
home surveillance – another possible architecture
33/256
summary
several different technical architectures are often possible
choice depends on various criteria:
– detailed functional requirements– non functional requirements:
– power consumption– ease of installation– cost– evolutivity– etc.
what’s the value for the customer?
34/256
4. practicals 2 - business market
35/256
vehicle convoy surveillance - specifications
a 5 vehicle convoy has to cross Europe
an alarm has to be triggered when:
– distance between two successive vehicles exceeds 100 m– a button is pressed (one button per vehicle)
when an alarm is triggered:– origin of alarm is displayed at control center– real-time tracking of every vehicle
outdoor coverage must be global (Europe) Questions:
– do you need more specifications?– which technical components would you use?– what architecture would you design?
36/256
vehicle convoy surveillance – some questions
how to handle convoy separations due to road rules (traffic lights, etc.)
time period allowed for control center to receive an alarm?
who stops an alarm?
100 m: which precision?
which constraints for antenna installation?
etc.
37/256
vehicule convoy surveillance – technical components
server
etc.
GNSS receiver
short rangetransceiver
cellular module
satellite antennaand modem
microcontrollerboard
alarm button
live trackingcartographic
software
software
[Pr201] [Pr202] [Pr203][Pr204] [Pr205] [Pr206][Pr207]
38/256
in every vehicle
satellitenetwork
cellularnetwork
local wirelessnetwork
vehicle convoy surveillance – one possible architecture
39/256
summary
what about an architecture where distances would be computed at controlcenter side?
what’s the value for the customer?
40/256
5. architecture
41/256
architecture?
defines:
– functions– structure– behavior– deployment
different viewpoints:– enterprise viewpoint (business requirements)– information viewpoint (information semantics and processing)– computational viewpoint (functions, interfaces)– engineering viewpoint (distribution of processing)– technology viewpoint (technologies)
[RM-ODP: Reference Model for Open Distributed Processing]
[Arc01]
42/256
computational viewpoint
Central sideRemote side
OS
embedded device
communication services - remote
application software - remote
OS
PC / serverperipherals
communication services - central
software components - central
component
com
po
ne
nt
com
po
ne
nt
software components - remote
com
po
ne
nt
com
po
ne
nt
com
po
ne
nt
application software - central
OS API
communicationservices API
OS API
components APIscomponents APIs
communication protocols
components protocols
application protocols
Customer-dedicatedintegration
Technical components
Communication
Execution platforms
management
secu
rity
communicationservices API
my own view - check standardization section for other views
incomplete!
43/256
computational viewpoint
communication layer:– bidirectional messaging
– file transfer
– voice call
– etc.
technical components layer (almost generic)– alarm with end to end acknowledgement
– mission dispatch handling
– software odometer
– movement detection
– etc.
application layer:– adaptation to end-user needs
this is an ideal view!
44/256
engineering viewpoint
item,“object”
microcontroller board+
communicationmodule
connected device
45/256
engineering viewpoint
question: in home surveillance and vehicle convoy surveillance examples,what were the connected devices?
46/256
engineering viewpoint
gateway central sideconnected device
local wirelessnetwork
long distancenetwork
47/256
engineering viewpoint
central sideconnected device
long distancenetwork
48/256
engineering viewpoint
personal sideconnected device
long distancenetwork
49/256
engineering viewpoint
many other architectures possible!
50/256
summary (and some observations)
many different architectures
electronics + communication + software => complexity
processing is distributed over various components => complexity
wireless network => possible loss of connectivity
51/256
6. devices
6.1. device architecture6.2. important microcontroller characteristics6.3. interfacing with peripherals6.4. storage6.5. software development6.6. summary
52/256
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
device architecture
53/256
device architecture
[Dev01] [Dev02][Dev03] [Dev04]
microcontr. board: $12.50GSM/GPS module: $49.95GSM antenna: $2.95GPS antenna: $3.95
analoginputs
digital I/O
microcontroller+ memory
location+ communication
module
54/256
6. devices
6.1. device architecture6.2. important microcontroller characteristics6.3. interfacing with peripherals6.4. storage6.5. software development6.6. summary
55/256
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
device architecture
56/256
important microcontroller characteristics
what is a microcontroller?
– on same chip: CPU + (some) memory + clock generator + peripherals
architecture:
– von Neumann, Harvard, modified Harvard
– one core or multicore
memory types and sizes:
– read-only memory (program): ROM/PROM/EPROM/EEPROM/Flash...
– read/write memory (data): RAM/SRAM/DRAM/MRAM/FRAM...
– data memory and program memory can be separated
memory width:
– 4-bit, 8-bit, 16-bit, 32-bit
– data memory width may be different from program memory width
– etc.
57/256
important microcontroller characteristics
processing power
– depends on clock speed and architecture
– options: floating point operations, digital signal processing, etc.
power consumption– various low-power modes
cost
supporting hardware tools– development board
– programmer / debugger
– open source schematic
supporting software tools– integrated development environment
– open source code
support
58/256
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)
[Mic01]
59/256
recent microcontroller - example 1
Microchip PIC16F1705
– 8-bit data memory, 14-bit program memory
– 32 MHz
– RAM: 1 KB - Flash: 14 KB
– 2 x Capture / Compare / Pulse Width Modulation
– 1 x Universal Asynchronous Receiver Transmitter (UART)
– 1 x SCI - 1 x Inter Integrated Circuit (I2C)
– 8 x 10-bit ADC
– timers: 4 x 8-bit, 1 x 16-bit
– price: ⋍ US$0.88 (10 000)
[Mic02]
60/256
recent microcontroller - example 2
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 (10 000)
[Mic03]
61/256
6. devices
6.1. device architecture6.2. important microcontroller characteristics6.3. interfacing with peripherals6.4. storage6.5. software development6.6. summary
62/256
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
device architecture
63/256
interfacing with peripherals
sensors: pressure, temperature, light level, heat, magnetic field, airflow,tilt, acceleration, switch, push button, etc.
actuators: relay, motor, stepper motor, servomotor, etc.
other devices: printer, display, On-Board Diagnostics connector, RFId tagreader, etc.
interface can be wired or wireless.
64/256
interfacing with peripherals - GPIO
general purpose digital input/output (GPIO):
– read or set a voltage (high / low)
[Per01]
65/256
interfacing with peripherals - GPIO
an optocoupler may be required
software debounce may be required (a hardware debouncer is sometimesprovided by the microcontroller)
66/256
interfacing with peripherals - ADC / DAC
important parameters: resolution and sampling rate
analog to digital converter (ADC):
– converts an analog voltage to a digital value
– signal conditioning may be required
– some microcontrollers provide integrated Op Amp (e.g. PIC16F527)
digital to analog converter (DAC):– converts a digital value to an analog voltage
[Per02]
67/256
interfacing with peripherals - serial interface
V.24 / RS-232
– minimum 3 wires: transmitted data, received data, signal ground
– asynchronous communication (start bit, stop bit)
– additional wires for control signals (request to send, ready for sending, dataset ready, calling indicator, etc.)
– voltage level:
– V.28:
– bit to 1: -15 V < voltage < -3 V
– bit to 0: +3 V > voltage > +15 V
– distance: < 15 m
– connectors: DB-25, DB-9
– USA: RS-232 (TIA-232)
[Per03]
68/256
interfacing with peripherals - serial interface
bytes are serialized using an UART (Universal Asynchronous Receiver Transmitter)
voltage levels are shifted from board voltage to V.28
UART
Address bus
Control bus
RX TTL
TX TTL
GND
level shifter
TX V.24
RX V.24
GND
CPU
microcontroller
for short distances, levelshifting may be omitted
69/256
interfacing with peripherals - serial interface
interface characteristics:
– asynchronous => a byte starts with a start bit and ends with stop bit(s)
– speed (b/s)
– byte format (number of data bits, parity, number of stop bits)
a byte is framed. Similar to message framing described incommunications section.
mark or previous stop bit
start bit
data bits (5 to 8) +parity (E, O, M, S, N)
stop bit(s)
70/256
interfacing with peripherals - SPI
Serial Peripheral Interface– defined by Motorola (then Freescale, then NXP Semiconductors, now
Qualcomm) (1985?)
MOSI: Master Output, Slave Input SCLK: Serial ClockMISO: Master Input, Slave Output SS: Slave Select
[Per04] [Per05]
71/256
interfacing with peripherals - SPI
synchronous communication
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.
72/256
interfacing with peripherals - I2C
Inter-Integrated Circuit
– defined by Philips (the NXP Semincoductors now Qualcomm) (1980's)
[Per06] [Per07]
73/256
interfacing with peripherals - I2C
multi-master
clock up to a few MHz
2 wires
applications:
– same than SPI
74/256
interfacing with peripherals - CAN
Controller Area Network
– defined by Bosch (1986)
[Per08]
75/256
interfacing with peripherals - CAN
mainly for vehicles
2-wire bus
multi-master, message broadcast system with asynchronouscommunication
bus access: CSMA/CD+AMP (Carrier Sense Multiple Access / Collision Detectionwith Arbitration on Message Priority)
maximum speed: 1 Mb/s
distance: up to several hundreds of meters (with “low” bit rate)
[Ser03]
76/256
interfacing with peripherals - Bluetooth
Bluetooth:
– designed in 1994 by Ericsson
– originally: to replace RS-232 cables
– range: less than 100 m
– Serial Port Profile (SPP). Many other profiles (audio, file, telephony, etc.)
[Blu01]
77/256
at a software point of view
writing low-level code to handle interfaces:
– serial interface: not too complex
– SPI, I2C: not too complex either
– CAN, Bluetooth: use existing drivers!
78/256
6. devices
6.1. device architecture6.2. important microcontroller characteristics6.3. interfacing with peripherals6.4. storage6.5. software development6.6. summary
79/256
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
device architecture
80/256
storage
when on-chip memory is not enough
additional memory:
– important parameters:
– bus type (serial, parallel)
– max number of program / erase cycles (e.g. 3 000, 100 000)
– write time (e.g. page erase - word / page write)
– soldered IC:
– EEPROM 512 Kb (<=> 64 KB) - 8 pins - SPI - ⋍ US$1.3
– 8 Gb (<=> 1 GB) - 48 pins - multiplexed A/D buses - ⋍ US$8.0
– memory card:
– MMC, SD, miniSD, microSD, etc.
– ex.: microSD 1 GB ⋍ US$27
81/256
6. devices
6.1. device architecture6.2. important microcontroller characteristics6.3. interfacing with peripherals6.4. storage6.5. software development6.6. summary
82/256
development environment
● source code edition● compilation / link● simulation● debugging
● load / run● emulation● debugging
LPCXpresso
VxWorks GNU toolchainTASKING ...
PC running Linux,OSX, Windows
microcontroller board
Atmel Studio
83/256
execution environment
Morpheus3
VxWorks
RTX
OS
RTOS
specific runtime
interrupt handlers+ background task
...
...
...
Esterel
Lustre
bare metal
Ada
84/256
bare metal
let's look more closely at a microcontroller architecture
85/256
bare metal
some events generated by peripherals
input level changed
character sentcharacter received
counter limit reached
end of conversion
bit receivedframe receivedframe sent
watchdog timeout
86/256
bare metal
an event generates an interrupt
attach an interrupt handler to the interrupt you want to handle
example: analog to digital conversion
time
background task
end ofconversion
interrupt handler
background task
interruption
savecontext
restorecontext
startconversion
87/256
bare metal
usual OS services not available:
– process
– thread
– synchronized access to shared resources (memory, peripherals)
– inter-thread communication
– device drivers
– file system
– etc.
88/256
bare metal
it's less complex than it appears for small applications
very useful for some classes of requirements:
– (very) small memory footprint
– low power consumption
– low cost
available tools:– some commercial or open source code is available (flash file system,
TCP/IP stack, etc.)
– macro definitions preventing use of assembly language
– hardware debugger with trace capture
89/256
bare metal
available tools (cont'd):
– well known design patterns:
– ring buffer
– finite state machine (FSM)
– etc.
Note: ring buffer and FSM can be used in OS context
90/256
outPtr inPtr
data
bare metal
ring buffer (or circular buffer):
– fixed-size memory array, used as an interface between a producer and aconsumer
– pointer outPtr points to first non empty element
– pointer inPtr points to first empty element
– to get next element: read outPtr, read data, increment outPtr
– to put a new element: read inPtr, write data, increment inPtr
– when at the end of the array, pointer is reset to start of array
91/256
bare metal
ring buffer (cont'd):
– a ring buffer is a FIFO (First In, First Out)
– when put rate is greater than get rate, buffer gets full:
– new data overwrites oldest one, or
– put is not performed
– beware: put and get operations must be atomic
examples of use:– receive buffer for a serial interface
– message queue for communication between two different pieces ofcode
92/256
state S1
state S2
event E1 (+ condition C1)
actions A to perform
bare metal
finite state machine:
– an abstract machine that can be in one of a finite number of states
– the machine is in only one state at a time (current state)
– transition from one state to another one is triggered by an event(possibly guarded by a condition)
– one possible way to graphically depict an FSM:
93/256
RTOS
an RTOS (or an OS) provides many services:
– tasks
– task notifications
– queues
– semaphores
– mutexes
– timers
– memory protection
– etc.
easier to write feature-rich applications but:– experience is still required
– debugging can be more complex (but easier as well!)
– an RTOS must be configured for the hardware platform
– larger footprint
– etc.
94/256
6. devices
6.1. device architecture6.2. important microcontroller characteristics6.3. interfacing with peripherals6.4. storage6.5. software development6.6. summary
95/256
summary
complex technical subset of IoT:
– analog electronics
– digital electronics
– bus
– software
device software ≠ web server software!!!!
if you can reuse an existing design, do it!
more and more open source designs are available
location, communication: see next sections
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
96/256
7. positioning
97/256
positioning - GNSS
GNSS: 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
98/256
positioning - GPS
GPS: US system
– 31 operational satellites
– MEO orbit: 20 200 km
– accuracy:
– depends on receiver quality, on satellites being used, etc.
– documented as better than 8 m with 95% confidence level
– usual accuracy: 20 m
– Dilution of Precision (DOP – PDOP/HDOP/VDOP):
– how error in measures impact error in computed location
– good when < 6
99/256
positioning - other GNSS
GLONASS: Russia (formerly USSR) system
– 24 operational satellites
– MEO: 19 100 km
Galileo: Europe
– target: 24 satellites + 6 spares
– MEO: 23 200 km
– accuracy: 8 m horiz. 9 m vert. 95% of time
– 12 operational satellites, 4 testing, 2 not fully available
– operational (15-Dec-2016)
BeiDou (北斗 ): China
– target: 5 GEO satellites + 30 MEO satellites
– currently: 17 satellites – operational over China
Japan (QZSS), India (NAVIC)
100/256
positioning - GNSS accuracy
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
101/256
positioning - GNSS augmentation systems
To increase accuracy (and integrity):
– differential GPS
– a GPS receiver placed at a location known with very good accuracy isused 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)
102/256
positioning - GNSS augmentation systems
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 themobile 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
103/256
positioning - interface
command + datainterface
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
104/256
positioning - interface
interface:
– usually: serial (V.28 or board voltage)
– usually: implements subset of NMEA 0183 standard
– most manufacturers provide their own protocol:– SiRF (then CSR, now Samsung) – u-blox - SkyTraq – ST – Broadcom – etc.
$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
105/256
positioning - interface
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
106/256
positioning - network - misc.
network positioning:
– trilateration (several time measures)– triangulation (several angle measures)– cell identification– “fingerprinting”– beacons
dead reckoning: first known position then inertial sensor fusion(accelerometer + magnetometer and filtering)
position may be available at– device side– network side
107/256
positioning - indoor
all previous technologies may be used for indoor positioning, dependingon constraints
but no easy-to-integrate, generic system exists today
domain still open to more innovation
108/256
summary
GPS is not the only GNSS!
accuracy increases
time to first fix decreases
other systems: keep an eye on
how to communicate with a GNSS receiver: check communications section
109/256
8. identification
110/256
identification
some systems have to identify / authenticate external objects:
– truck trailers
– shipping containers
– bottles of perfumes
– bottles of wine
– etc.
111/256
identification
RFID (Radio Frequency Identification):
– tag / label with (almost) unique identity
– passive (no battery) or active (battery)
– read-only or read/write
– reader: transmits
– 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)
112/256
identification
questions: how to identify objects on a global basis, and let everyorganization 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 (ObjectName Service), discovery services, etc.
– etc.
a world in itself...
113/256
9. communications
9.1. overview9.2. framing9.3. wireless networks9.4. wired networks9.5. messaging protocols
114/256
communications - overview
central part of IoT 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.
115/256
communications - important characteristics
shared or not
geographic coverage + possibility to adapt it
latency
connectivity setup time
addressability
required power for transmission
terminal cost
communication cost
ease of integration
throughput
confidentiality
reliability
availability
etc.
116/256
9. communications
9.1. overview9.2. framing9.3. wireless networks9.4. wired networks9.5. messaging protocols
117/256
framing
before going farther, let’s look at how to transmit messages over a seriallink, for instance to
– use a location module
– use a communication module
118/256
framing
communicationmodule
microcontroller+ memoryinterfaces
locationmodule
userinterface
communicationnetwork
data storage
command + datainterfaces
command + datainterfaces
119/256
framing
control bytes:
– to configure the module (link speed, power mode, etc.)
– to signal specific events
data bytes:– for a GNSS receiver: location, satellite information, etc.
– for a communication module: data to be sent to / received from remote side
multiplex control bytes and data bytes
error control
sequence control
flow control
time-out control
transparency
=> framing + acknowledgement + possible repetition
120/256
framing
header payloadcheck
sequence
detailed frame structure depends on protocol
header may contain:
– packet numbering
– number of last good packet received
– frame class
– etc.
check sequence:– result of a mathematical operation performed on payload bytes
– receiver performs the same operation and compares result
Questions: – how to know when a frame starts and when it stops?
– how to ensure transparency for payload?
121/256
framing - delimitation
several solutions for delimitation:
– byte count
– flag bytes
– etc.
byte count:
flag bytes:
header payloadcheck
sequence
payloadsize
header payloadcheck
sequence
B E
122/256
framing - delimitation
byte count: in case of error in the middle of a frame or in the count itself,how to re-synchronize?
flag byte: how to allow E byte to be present in payload?
=> transparency
123/256
framing - transparency
use a predefined escape byte, ESC for instance
on transmission side:
– when E is in payload, insert an ESC before it
– when ESC is in payload, insert another ESC before it
on reception side:– when ESC is received, delete it and keep following byte
another solution: reduce payload allowed byte set!
etc.
124/256
framing - always required?
framing is always required
but error processing may be ignored in some environments (typically onshort links in non-noisy environments)
125/256
framing - NMEA 0183 example
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
flag byte
only readableASCII characters
(no CR)flag byte: CR
checksequence
126/256
9. communications
9.1. overview9.2. framing9.3. wireless networks9.4. wired networks9.5. messaging protocols
127/256
wireless - PMR
Professional Mobile Radio
– not accessible to consumer
– 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. In France:
– 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
128/256
wireless - PMR
Frequency (bands):
– 40 MHz, 80 MHz, 150 MHz, 400 MHz, 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
– TEDS, GSM-R
Coverage:
– from ⋍ 30 km (mono-site) up to wide area coverage (multi-sites / trunk)
TDMA: Time Division Multiple AccessFDMA: Frequency Division Multiple Access
129/256
wireless - PMR - data
data communication:
– usually, using a dedicated connector on transceiver
– 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
130/256
wireless - PMR
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.
131/256
wireless - unlicensed
France regulation:
– 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
– throughput: from several 100s of b/s to several 1000s of b/s
ERP: Effective Radiated PowerLoS: Line of Sight
132/256
wireless - unlicensed long range
for a given radiated power and a given bit error rate, range can beincreased either by:
– using lower bit rate with traditional modulation technologies. But this narrowsspectrum => precise frequency reference is required to decode receivedmodulation.
or by– using 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
133/256
interfacing with comm. module
example: Microchip LoRaWAN RN2483
serial link: 57600 b/s, 8 bits, no parity
frame:
– ASCII, terminated by CR LF
– three command types: sys mac radio– examples:
– sys sleep 100– sys set nvm 300 AA– mac reset 868– radio set mod lora
[Com01]
134/256
wireless - PLMN
Public Land Mobile Network
two main families of standards / technologies:
– 3GPP: 3rd Generation Partnership Project
– GSM, GPRS, EDGE, HSDPA, HSUPA, MBMS, LTE, LTE Advanced...
– 3GPP2: 3rd Generation Partnership Project 2
– CDMA2000, UMB, LTE...
shared between anybody who subscribes
broad coverage, but target is population, not territory
135/256
wireless - 3GPP
data services:
– CSD (Circuit Switched Data): obsolete
– SMS (Short Message Service)
– 140 to 160 characters / bytes
– USSD (Unstructured Supplementary Service Data)
– specific services
– 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 ServiceEDGE: Enhanced Data rates for GSM EvolutionHSDPA: High-Speed Downlink Packet AccessLTE: Long Term Evolution
136/256
wireless - 3GPP IoT-oriented
three LPWA technologies in Release 13:
– NB-IoT (Narrow-Band IoT)
– EC-GSM-IoT (Extended Coverage GSM for the IoT)
– LTE-M (LTE for Machines)
LPWA : Low Power Wide Area
137/256
wireless - NB-IoT
power consumption decreased => battery life > 10 years (!)
spectrum efficiency improved
extended coverage (rural and deep indoors)
low device complexity => low cost
138/256
wireless - EC-GSM-IoT
based on eGPRS (EDGE for GPRS)
software upgrade of existing GSM networks
battery life > 10 years (!)
139/256
wireless - LTE-M
simplified term for LTE-MTC CatM1
lower device complexity - cost reduced to 25% of current eGPRSmodules
extended coverage
battery life > 10 years (!)
140/256
wireless - LPWA comparison
10 year life impossible if received signal too low
data rate can be decreased => longer TX => lower battery life
[Com04]
141/256
interfacing with 3GPP module
AT commands, defined in 3GPP TS 27.007 (and TS 07.07)
commands:
[Com02]
142/256
interfacing with 3GPP module
responses:
143/256
wireless - 3GPP - IP connectivity
APN (Access Point Name):
– name of gateway between 3GPP network and the Internet - real name:GGSN
– defined by the operator
– defines following gateway characteristics:
– static or dynamic IP address
– public or private IP address
– allowed protocols (TCP, UDP, etc.)
– allowed ports
144/256
wireless - 3GPP - IP connectivity with IP stack in µc board
mobile network the Internet
GGSN (APN)
1 - attach
2 – define and activate context + start comm.
=> comm. module knownto network
=> IP address assigned tocomm. module
3 – start a PPP session
=> IP address assigned toremote device
communicationmodule
microcontrollerboard
AT commands
GGSN: GPRS Gateway Support Node[Com03][Com04]
145/256
wireless - 3GPP - IP connectivity
1/ attach:
AT+CGATT=1
OK
2/ define PDP context 3:
AT+CGDCONT=3,"IP","orange.m2m.spec"
OK
activate PDP context 3:
AT+CGACT=1,3
OK
establish communication using PDP context 3:
ATD*99***3#
CONNECT
3/ start a PPP session
146/256
wireless - 3GPP - IP connectivity with IP stack in µc board -router
mobile network the Internet
GGSN
1 - register
2 – define and activate context + start comm.
=> comm. module knownto network
=> IP address assigned tocomm. module
AT commands
3 – define NAT / PAT rule
=> comm. moduleperforms NAT / PAT
communicationmodule
microcontrollerboard
147/256
wireless - 3GPP - IP connectivity without IP stack in µc board
mobile network the Internet
GGSN (APN)
1 - attach
2 – define and activate context + start comm.
=> comm. module knownto network
=> IP address assigned tocomm. module
3 – send / receive data
communicationmodule
microcontrollerboard
AT commands
148/256
wireless - 3GPP - programmable comm. module
mobile network the Internet
GGSN (APN)
1 - attach
2 – define and activate context + start comm.
=> comm. module knownto network
=> IP address assigned tocomm. module
3 – send / receive data
communicationmodule +
application
API
149/256
wireless - satellites
geostationary orbits
– characteristics:
– 36.000 km above the Earth
– satellite seen from Earth as stationary
– coverage restricted to desired 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 – globalcoverage except polar regions
– IsatM2M: messages of 25 (up) / 100 (down) bytes – latency 30 to 60 s –global coverage except polar regions
– IsatData Pro: messages of 6.4 (up) / 10 (down) kB – latency 15 to 60 s –global coverage except polar regions
– Thuraya
BGAN: Broadband Global Area Network
150/256
wireless - satellites
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
151/256
wireless - short distance
Wi-Fi
– wireless local area network (WLAN) technology based on IEEE802.11standards
– 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)
152/256
wireless - short distance
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
153/256
wireless - comparison
Techno Shared Range Latency Setup time
PMR no from 30 km up to widearea
depends on architecture 0
unlicensed 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
satellitesgeo
yes global 800 ms to 60 s depends
satellitesLEO
yes global min depends
Wi-Fi yes local ms s
154/256
wireless - comparison - 2/2
Techno Addressability TX power Equipment cost Comm.cost
PMR full W 100s € 0 €
unlicensed full mW 10s € 0 €
2.5G/3G restricted W 100s € flat rate
4G restricted W 100s € --> 10s € flat rate
satellitesgeo
restriced W 1000s € high
satellitesLEO
restricted W 100s € high
Wi-Fi full mW 10s € 0 €
155/256
wireless - 3 dimensions
3 dimensions, for wireless networks:– technology
– regulations
– operator
example 1:– 4G is a technology mainly used for public cellular networks
– operators (Orange, Verizon, etc.) have to buy licenses
– 4G can be used on private networks as well
example 2:– Sigfox is an operator using its proprietary technology on license-free bands
– the technology could be used on licensed bands as well
example 3:– LoRa is a technology used on license-free bands
– there are several operators (Orange, Bouygues Telecom, etc.)
– the technology can be used by consumers as well
– the technology can be used on licensed bands as well
156/256
9. communications
9.1. overview9.2. framing9.3. wireless networks9.4. wired networks9.5. messaging protocols
157/256
wired
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 IoT / M2M: more or less obsolete
Public Switched Telephone Network (PSTN)
– requires a modem (modulator – demodulator)
– up to 56 Kb/s
– cost proportional to duration (depends on package)
– long setup time (up to 20 or 30 s)
– for IoT / M2M: not so used
Asymmetric Digital Subscriber Line (ADSL)– pseudo permanent connection
158/256
wired
Local Area Network (LAN)
– Ethernet
field buses:– PROFIBUS
– DeviceNet
– INTERBUS
– FOUNDATION
– Modbus
– Sercos
– PROFINET
– Powerlink
– EtherCAT
– etc.
159/256
9. communications
9.1. overview9.2. framing9.3. wireless networks9.4. wired networks9.5. messaging protocols
160/256
messaging protocols
just a few words about TCP:
– TCP is a stream-oriented protocol:
– “Hello world” can be received as “Hell” and then “o world”
– “Hello” and then “ world” can be received as “Hello world”
– => framing is required
– see communications / framing section. Simpler, for TCP, thanks to TCPcharacteristics:
– ordered data transfer
– error-free data transfer
161/256
messaging protocols
message framing:
– ASN.1: defined 30 years ago by CCITT (now ITU-T) – not so used inM2M/IoT...
– Google re-invented a solution in 2008: Protocol Buffers – not so used eitherin M2M/IoT... (but framing not provided...)
– CBOR (Concise Binary Object Representation): IETF - 2013
– advantages:
– reliable solutions
– data endianness independency
– transparent serialization/deserialization
– forward compatibility
– drawbacks:
– some complexity
– Protocol Buffers needs framing
– libraries in various languages to encode / decode frames
– not so difficult to define your own mechanism
162/256
messaging protocols
applying web technologies to IoT / M2M communications is often not theright choice:
– HTTP: request / response (=> polling), ASCII, complex parsing
– XML: verbose
– JSON: still too verbose
one benefit:– go through firewalls and proxies
but should IoT / M2M communications be transported along with webcommunications?
163/256
messaging protocols - MQTT
MQTT acronym comes from Message Queue (not present in MQTT!) andTelemetry Transport (but MQTT is not restricted to telemetry)
maintained by OASIS Consortium (Organization for the Advancement of Structured InformationStandards)
mixes messaging with publish / subscribe (one to many - applicationdecoupling)
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)
164/256
messaging protocols - CoAP
Constrained Application Protocol
maintained by the IETF (Internet Engineering Task Force) - RFC7252
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)
165/256
messaging protocols - other
many other protocols:
– Open Wireless Telematics Protocol (designed by Mobile Devices)
– Cloud Connector (designed by Digi)
– etc.
not so difficult (for really experienced developer) to define one's ownprotocol
166/256
device management protocols
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
167/256
summary
many different technologies
understanding real user needs is important, to choose right networktechnology/technologies
perhaps the most important part of a system, as it transfers data from onside to the other one
perhaps the most difficult part of a system, at a technical point of view
168/256
10. platforms
10.1. architecture and services10.2. RESTful API
169/256
platforms
beware: the word « platform » may have different meanings
– software development framework
– software application providing communication (and possibly managementand storage) services
– a hosted application providing above services
– hardware system
– hardware system and associated software stack
– etc.
in what follows: hosted application, that makes easier to integratedevices into applications
170/256
platforms
central sideconnected device
long distancenetwork
171/256
platforms
Central sideRemote side
OS
embedded device
communication services - remote
application software - remote
OS
PC / serverperipherals
communication services - central
software components - central
component
com
po
ne
nt
com
po
ne
nt
software components - remote
com
po
ne
nt
com
po
ne
nt
com
po
ne
nt
application software - central
OS API
communicationservices API
OS API
components APIscomponents APIs
communication protocols
components protocols
application protocols
Customer-dedicatedintegration
Technical components
Communication
Execution platforms
management
secu
rity
communicationservices API
172/256
platforms
functions usually provided by a platform (as seen by a user):
– device provisioning
– device management
– device authentication
– support of some communication protocols
– user authentication
– data persistence (raw data or decoded data?)
– device groups
– user groups
– easy way to add new communication protocols
– etc.
two logical interfaces: one for devices, one for applications
173/256
platforms
connected device central side
platformplatform
code solvingcustomer problem
code solvingcustomer problem
customerpays for this,
not for theplatform
relative sizes of softwarecode,
for a complex system
174/256
platforms
perceived value is often not in the platform
a platform may prevent from using some devices (which do not implementa supported protocol)
a platform usually creates a protocol break
when updating the platform, ALL users are impacted
developing a communication layer + minimum device management is notcomplex for an experienced team
=> think twice before deciding on using a platform
anyway, using a platform may be very nice, for some (simple)applications, to demonstrate a new service, or for very large sets ofdevices
175/256
many platforms ?
Afero deviceWISE Microtronics end-to-end platform Sine-Wave AggreGate dweet.io Mobius SIMPro AirVantage Electric Imp MODE SmartThings Ark Enterprise2Cloud mozaiq Solair ARTIK Cloud EVRYTHNG Murano TempoIQ AT&T's M2X Exosite myDevices The ThingBox AWS IoT FlowCloud Nabto thethings.iO Axeda IoT Platform Gaonic Neo ThingFabric AXON GoFactory Net4Things ThingPlug Ayla IoT Cloud Fabric Golgi Netatmo Connect ThingSpeak Beebotte IFTTT netObjex Thingsquare Berg iMotion NetPro ThingWorx Blynk Impact n.io UnificationEngine Bosch IoT Suite Initial State Octoblu Verizon's M2M platform Busit IoT Acceleration Platform OpenMTC Vortex Canopy Itron OpenSensorCloud Waygum Carriots Hologram Cellular Platform OpenSensors waylay CloudConnect Home2Cloud Open.Sen.se WyzBee Combicloud IBM IoT Cloud Parse Xively Concirrus IoTfy People Power - now FabrUX Yaler Connext DDS IoT lab Plat-One Zatar Coversant IoT Cloud IoT-X PubNub Dashboard of Things iQmenic REDtone IOT Canopy dataplicity Kii resin.io DeviceHive Datavenue Lelylan restack FI-WARE Deutsche Telekom's M2M Device Cloud Loop RuBAN Home*Star / IOTDB Device Connection Platform Lumata Samsung SAMIIO IoTivity DeviceCloud M2M Intelligence SAP HANA Kaa DeviceHub MachineShop SensorLogic macchina.io DevicePilot mbed Device Server SkyNet Nimbits
Node-RED OpenIoT OpenRemotecheck http://www.monblocnotes.com/node/1979
open source
176/256
platforms - example - Sierra Wireless
connectivity management
– SIM inventory
– usage tracking
– etc.
application enablement– RESTful API
– data storage
– rules engine
– device protocol support
– etc.
device management– device monitoring
– command transmission
– OTA firmware update
– configuration deployment
– etc.
[Pla02]
177/256
platforms - how to use one
usual steps, to use a platform for a new development:
– register
– check list of supported devices, and select one, possibly a simulatedone
– download client source code or library
– build an « Hello World » client (send/receive data)
– test it
– check send/receive data using available web application
– download central application source code or library
– build an « Hello World » application (send/receive data)
– test it
– test the whole system
178/256
10. platforms
10.1. architecture and services10.2. RESTful API
179/256
overview
REST: representational state transfer
invented in 2000 - an architecture, not a protocol
– client-server
– stateless
– cacheable
– layered system
– uniform interface
– [code on demand]
for web services: RESTful APIs
– base URL
– HTTP method (GET, HEAD, PUT, POST, DELETE, TRACE, CONNECT)
– data elements - JSON
180/256
example - when you visit google.com from France
client server
GET / HTTP/1.1User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0Host: google.comAccept: */*
open TCP socket with address google.com
HTTP/1.1 302 FoundCache-Control: privateContent-Type: text/html; charset=UTF-8Location: https://www.google.fr/?gfe_rd=cr&ei=J8-MWPedMPL-8AePwISQDAContent-Length: 259Date: Sat, 28 Jan 2017 17:04:39 GMTAlt-Svc: quic=":443"; ma=2592000; v="35,34"
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"><TITLE>302 Moved</TITLE></HEAD><BODY><H1>302 Moved</H1>The document has moved<A HREF="https://www.google.fr/?gfe_rd=cr&ei=J8-MWPedMPL-8AePwISQDA">here</A>.</BODY></HTML>
181/256
example - AirVantage API
client server
GET /api/v1/users/current?access_token={token} HTTP/1.1
....
{ uid: "81210eca05484d34a29bc6c34dc31bf7", email: "[email protected]", name: "David Sciamma", company: { uid: "97ba9e22078548a2847912a87152e3f4", name: "Sierra Wireless" }, profile: { uid: "df1c0f7d5f8c4db2b45978f98e1093ad", name: "Manager" }}
182/256
example - AirVantage API
after authentication:
– get received data
– send command to a device
– get monitoring data
– etc.
183/256
11. central side
184/256
computational viewpoint
Central sideRemote side
OS
embedded device
communication services - remote
application software - remote
OS
PC / serverperipherals
communication services - central
software components - central
component
com
po
ne
nt
com
po
ne
nt
software components - remote
com
po
ne
nt
com
po
ne
nt
com
po
ne
nt
application software - central
OS API
communicationservices API
OS API
components APIscomponents APIs
communication protocols
components protocols
application protocols
Customer-dedicatedintegration
Technical components
Communication
Execution platforms
management
secu
rity
communicationservices API
185/256
computational viewpoint
communication server
database
geographic information system (GIS) functions
data filtering and processing
user interface(s)
etc.
186/256
communication server
communication server:
– provides an interface to communicate with devices
– may handle several different network technologies
– switching to another network technology or supporting a new one should beeasy and rapid
– other usual requirements:
– security concerns: authentication, integrity, privacy, (non-repudiation)
– reliability
– scalability
– etc.
187/256
communication server
example:
– for PMR or unlicensed radio
antennastransceivers+ modems
communicationserver
[Cen01]
188/256
communication server
example:
– for 3GPP
communicationserver
Internet
189/256
communication server
3GPP example (cont'd):
– uplink (from devices to server):
– server IP address must be reachable => public or VPN
– downlink:
– device IP address characteristics depend on APN
– static or dynamic?
– public or private?
– several solutions depending on user need and required genericity:
– device initiates and maintains a TCP session
– server sends an SMS to device, requesting its connection
– devices connects periodically
– private APN => VPN
– etc.
190/256
databases
3 main technologies:
– relational database
– object database
– NoSQL database
another dimension to be considered sometimes:– spatial database (but GIS function can be provided as a service)
a question may arise:– do application data have to be separated from “technical” data?
– there is no one right answer
another question:– should all device generated data be mirrored in the central database?
– again: there is no one right answer
191/256
Geographic Information Systems
some applications need
– to perform spatial operations and / or
– to display spatial information
at a technical point of view, two different elements:– functions:
– spatial queries against spatial database
– spatial libraries
– data:
– digital maps
– georeferenced data
at an architectural point of view:– web GIS
– rich client
192/256
Geographic Information Systems
all-in-one (functions + data) web GIS:
– Google Maps JavaScript API
– Bing Maps APIs
– etc.
functions only web GIS:– MapServer (Open Source)
– GeoServer (Open Source)
– etc.
functions only rich client GIS:– GRASS GIS (Open Source)
– QGIS (Open Source)
– uDig (Open Source)
– etc.
193/256
Geographic Information Systems
data:
– OpenStreetMap (Open Source)
194/256
Geographic Information Systems
many providers of commercial products:
– rich client / desktop GIS
– web GIS
– data (vector, bitmap, additional layers)
GIS is a complex matter:– do not try to reinvent the wheel
– take some time to get some experience
195/256
User Interface
as for GIS: web or rich client
web:
– ⊕ good for large number of distributed users
– ⊕ can be good for supporting multi-device / multi-OS
– ⊕ good for software updates
– ⊖ usually bad for user-perceived response time
– ⊖ usually bad for « real-time » or complex user interfaces
– ⊖ usually bad for license cost
– etc.
rich client:– almost the other way round...
mixing the two of them can be a good solution
196/256
12. big data
197/256
big data
data sets too large / too complex to be processed with traditional tools
we are not talking about Terabyte (1012 bytes)
we are talking about Petabyte (1015 bytes), Exabyte (1018 bytes), etc.
Volume, Velocity, Variety
some tools:
– Hadoop (distributed processing - MapReduce, YARN, HDFS)
– Spark (analytics over Hadoop file system)
– Cassandra (distributed NoSQL)
– ElasticSearch (analytics)
– many, many, many more tools
– check http://bigdata.andreamostosi.name/
198/256
where is big data?
Q: why big data is not addressed in the central side section?
199/256
where is big data?
A:
– currently, big data technologies are used at central side
– remember: an IoT system is a whole
– more power processing available on the edge and in devices
– => big data processing could be distributed over devices soon
200/256
an example
cellularnetwork
400 MB / vehicle / month
201/256
an example
for electric vehicle prototypes: data about battery, electric engine,location, speed, etc.
for 100 vehicles during one year:
– 400 MB x 100 x 12 = 480 GB - this is not big data!
for 1 million vehicles during one year:– 400 MB x 1 000 000 x 12 = 4.8 x 1015 B (4.8 Petabytes) - this is big data
but...
202/256
an example
but
– current mobile data plans are currently too expansive for such volumes
– mobile network coverage is currently not full => buffering is required =>memory cost
– there is enough processing power AND energy in a vehicle => processingcan be performed on the fly, so that only main results are sent to the centralside
203/256
more generally
there is no one fits all architecture
204/256
13. security
205/256
information security
we talk about information security only
three objectives, according to the CIA triad:
– confidentiality
– integrity
– availability
206/256
checklist
business processes:
– who is in charge?
– how to address security?
device hardware and physical security:
– secure boot process
– no active debug interface
– physical protection against tampering
– etc.
device application:
– signed software
– signed remote software updates
– unused ports are disabled
– good practice coding standard
– well define source code management
– safe failures
– etc.
[Sec01]
207/256
checklist
device operating system:
– most current patches
– plan for remote update
– non-essential services are remoed
– etc.
device wired and wireless interfaces:
– unauthorized connections are prevented
– IP packets forwarding between interfaces is disabled
– unused ports are closed
– if existing, default connection password is unique to each device
– connections are secured (TLS...)
– etc.
208/256
checklist
authentication and authorization:
– code and data are binded to a specific devie hardware
– a password can’t be null or blank
– protection against repeated login attempts
– stored passwords are encrypted
– etc.
encryption and key management for hardware:
– true random number generator
– tamper proof location for sensitive data
– etc.
web user interface:
– strong user authentication
– automatic session timeout
– input validation
– etc.
209/256
checklist
mobile application:
– minimum required amount of personal information is stored
– personal user data is encrypted
– stored passwords are encrypted
– etc.
privacy:
– only authorised personnel have access to personal data of users
– personal data is anonymized
– data retention policy
– product owner is informed about data collection
– etc.
cloud and network elements:
– latest security patches
– webserver identification switched off
– etc.
210/256
checklist
secure supply chain and production:
– test and calibration software erased before dispatch
– duplicate serial numbers are detected
– securely controlled area may be required
– etc.
211/256
summary
security is a world by itself
it applies to all subcomponents
a broad view is required
rely on real experience
212/256
14. standardization
213/256
standardization
some “old” standards:
– V.24, V.28, etc.– MODBUS, Fieldbus, etc.– SPI, I2C, etc.
but that's really far from being enough
let's dream:
– any remote side should be able to communicate with any centralside
– any central side should be able to communicate with any centralside
– any side receiving a new type of data should be able to knowwhether it has to process this data, and/or what it means(semantics, ontology)
214/256
standardization
in Europe: ETSI (European Telecommunications Standards Institute)
most of ETSI M2M standardization work has been transferred tooneM2M in 2012
oneM2M is a global partnership project (China, Japan, Europe, NorthAmerica, etc.)
OMA (Open Mobile Alliance) is member of oneM2M
goal:
develop technical specifications which address theneed for a common M2M Service Layer that can bereadily embedded within various hardware and software
215/256
standardization
AE: Application Entity - CSE: Common Services Entity - NSE: Network Services Entity
[Sta01]]
216/256
ITU-T - technical overview
[Sta02]
217/256
ITU-T - types of devices and relationship with physical things
218/256
standardization
many other standardization organizations:
– Open Connectivity Foundation– Thread Group– Hypercat Consortium– Industrial Internet Consortium (IIC)– Global Standards Initiative on Internet of Things (IoT-GSI)– ITU Joint Coordination Activity on IoT (JCA-IoT)– TIA TR-50– Open Mobile Alliance (OMA)– OMG Data-Distribution Service for Real-Time Systems (DDS)– IEEE IoT Architecture Working Group
219/256
standardization
many other standardization organizations (cont'd):
– Internet Engineering Task Force (IETF)– IPSO Alliance– W3C Web of Things Community Group– W3C Semantic Sensor Network Incubator Group– ZigBee Alliance– ULE Alliance– Z-Wave Alliance– etc. (see http://www.monblocnotes.com/node/2034)
220/256
standardization
Q: so many standards... What to do with them?
A: what you want
more seriously:
– for an integrator:– try to use standardized interfaces and products– stay informed
221/256
15. ecosystem
222/256
ecosystem
what we saw:
– many different use cases
– several different technologies
=> ecosystem and value chain are complex
223/256
ecosystem
usually, value chain is depicted like this:
Devices Connectivity Integration Applications Customers
224/256
ecosystem
more realistic view:
Softwaredeveloper
Middlewaredeveloper
Softwarecomponentdeveloper
Devicemanufacturer
Locationtechnology
provider
Wirelessmodule
manufacturer
Networkoperator
Integrator Installer
Geocoded dataprovider
CustomerServiceprovider
Embedded OSdeveloper
User
Sensor /actuator
manufacturer
Embeddedsoftware
developer
Electronicboard
manufacturer
Hosting
225/256
ecosystem
many different type of activities
– it's quite common that one company runs several activities important activity: integration
– the integrator tries to get a working system! another important activity, often forgotten about:
– installation (at home, in a vehicle, in a factory...)– bad installation => lot of glitches, very difficult to diagnose
226/256
16. project perspective
227/256
usual difficulties
a project must deliver a technical solution that matches user needs
difficulties:
– complex ecosystem– user needs not defined correctly– too many standards / lack of standards– unreliable communication network– system distributed over several physical components– electronics and software do not obey same life cycles– some specific software expertise required– high reliability sometimes required– etc.
following examples: how some difficulties were handled (or not)
228/256
example - user needs - 1/4 A
229/256
example - user needs - 1/4 B
project: RFP for a waste collection management system
time spent talking with the customer led project team to understand thatthere was no need for real-time data transmission
proposal: truck data downloaded by wire at the end of the day
– => lower operating cost than competitors' proposals– contract signed, while the provider had no experience about waste
collection management system
understand customer needs better than himself
230/256
example - user needs - 2/4 A
231/256
example - user needs - 2/4 B
project: RFP for a taxi dispatch system
taxi drivers had no experience of a dispatch system
neither the provider
agreement about « agility »:
– minimum viable product delivered as soon as possible– feedback from drivers and dispatch people
– => modification of some delivered functions– => decision about new ones to be added– => new version
– several successive versions
be agile
232/256
example - user needs - 3/4 A
233/256
example - user needs - 3/4 B
project: RFP for a bus schedule checking system
« big brother » feeling: bus drivers could decide to go on strike
– => first delivered functions were providing immediate value to busdrivers (free voice calls, attack alarm)
– => no more problem with trade unions
rapidly deliver value to the users
234/256
example - user needs - 4/4 A
235/256
example - user needs - 4/4 B
project: for a customer, develop a system allowing to check innerworkings of several car prototypes
provider's Business Unit asked their R&D to develop the system. Theydecided on a monthly 40 MB data package (usual data packages: 10MB).
R&D work was done by beginners in the domain. They implemented athin client architecture, and were very proud of it (M2M 2.0!) But monthlydata volume was more than 400 MB! And data was lost for every lengthyloss of connectivity.
keep broad view in mind
don't think you are clever than other people when you enter a newdomain
236/256
example - technology - 1/4 A
237/256
example - technology - 1/4 B
GPRS was documented as THE solution for packet data over GSMnetworks
one undocumented trap:
– connectivity reset by the operator on a periodic basis
not a big deal for developers used to wireless technology
but a problem for many developers used to LAN
never assume things work as documented
238/256
example - technology - 2/4 A
239/256
example - technology - 2/4 B
for a taxi dispatch system:
– the provider ordered an onboard device from a very well knowncompany (new product)
– two design flaws appeared after first tests (HW + SW)
no time for correction: a software workaround had to be implemented
never assume things work as documented (bis)
plan for contingencies
240/256
example - technology - 3/4 A
241/256
example - technology - 3/4 B
for corrected version of previous device, manufacturer introduced newfunctions required by other customers
– => design too complex– => cost too high
it was decided to perform design in-house.
costly effort:
– => skills ramp-up– => development of an SDK + testing tools
but return on investment:
– control over roadmap– cost reduction by using device for all projects (some components
not assembled, depending on project)– etc.
control core technology
242/256
example - technology - 4/4 A
243/256
example - technology - 4/4 B
request to an electronic design company: design a low powerconsumption device, sending some sensor data to a central application,on a periodic basis.
they designed a board with:
– a low power microcontroller– a low power communication module
but, to upload the few KB of data on a periodic basis, they used FTP(instead of byte streaming over TCP for instance)
– => longer connections– => data overhead– => more power used!
keep the broad view in mind
244/256
example - legal aspects - A
245/256
example - legal aspects - B
project: first french « Pay As You Drive » service, for a car insurancecompany
the system was designed and developed
then, authorization was requested from CNIL (French Personal DataProtection Agency)
– answer was: « no »
system had to be re-designed
think about legal aspects before it's too late
246/256
17. want to play?
247/256
hardware for devices
many, many, many open source and/or free (or low cost) materials
microcontroller boards:
– BeagleBone Black Wireless (Wi-Fi BT) 69 €
– ESP-WROVER-KIT (Wi-Fi, camera interface) 44 €
– CHIP Pro (Wi-Fi BT - open source) US$ 16
– Arduino
check http://systev.com/iot-device-dev-kits/ electronics:
– https://www.adafruit.com/
– http://www.cooking-hacks.com/
– http://www.seeedstudio.com/
– https://www.tindie.com/
– Farnell, Mouser, RS
check http://www.monblocnotes.com/node/2114
248/256
software for devices
software development tools for devices:
– BeagleBone Black Wireless: Linux
– ESP-WROVER-KIT: dedicated RTOS SDK
– CHIP Pro: Linux
– Arduino: Arduino IDE
various software stacks:– protocols (refer to previous slides)
– etc.
249/256
software for central side and communications
open source platforms
– DeviceHive
– FI-WARE
– Home*Star
– IoTivity
– Kaa
– Nimbits
– Node-RED
– OpenIoT
– OpenRemote
– SiteWhere
– thinger.io
250/256
18. conclusion
251/256
conclusion
developing IoT systems can be challenging because:
– large diversity of user needs– sometimes difficult to get real user needs– different software development paradigms– integration of technologies from different fields
252/256
conclusion
perhaps more than in other domains:
– spend time with users– get (really) experienced with involved technologies– get the overall view– be agile– design/use hardware that allows for agility (easy (remote) update)
but, in any case, if you choose this domain, you'll have fun!
254/256
credits and references[Def01] https://material.io/icons/[Def02] https://openclipart.org/detail/237859/factory[Def03] https://en.wikipedia.org/wiki/Internet_of_things
[Fct01] http://www.libelium.com/resources/top_50_iot_sensor_applications_ranking/[Fct02] https://www.aylanetworks.com/iot-use-cases/connected-home
[Pr101] http://homelive.orange.fr/accueil/[Pr102] http://www.samsung.com/fr/consumer/mobile-devices/smartphones[Pr103] https://openclipart.org/detail/155101/server
[Pr201] https://www.u-blox.com/en/product/neo-m8-series[Pr202] http://www.ti.com/product/CC3200MOD/description[Pr203] https://www.sierrawireless.com/products-and-solutions/embedded-solutions/automotive-modules/[Pr204] https://developer.mbed.org/platforms/FRDM-K64F/[Pr205] https://openclipart.org/detail/210237/misc-depression-button[Pr206] https://www.u-blox.com/en/product/c027[Pr207] https://www.iridium.com/products/details/iridiumedge
[Arc01] http://www.rm-odp.net/[Arc01] https://openclipart.org/detail/232991/sedan[Arc02] https://openclipart.org/detail/177832/radiator[Arc03] https://openclipart.org/detail/24535/street-lamp[Arc04] https://openclipart.org/detail/202078/printer-inkjet
255/256
credits and references[Dev01] https://www.adafruit.com/products/2590[Dev02] https://www.adafruit.com/products/2542[Dev03] https://www.adafruit.com/products/2461[Dev04] https://www.adafruit.com/products/1991
[Per01] https://wiki.openwrt.org/doc/hardware/port.gpio[Per02] http://maxembedded.com/2011/06/the-adc-of-the-avr/
[Per03][Per04] https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus[Per05] https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi[Per06] http://www.engineersgarage.com/contribution/i2cinter-integrated-circuittwitwo-wire-interface[Per07] http://maxembedded.com/2014/02/inter-integrated-circuits-i2c-basics/
[Per08] https://autoelectricalsystems.wordpress.com/2015/11/10/basics-of-controller-area-network-can-bus-part-1/
[Com01] http://www.microchip.com/wwwproducts/en/RN2483[Com02] https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1515[Com03] http://www.wikiwand.com/it/Gateway_GPRS_Support_Node[Com04] http://www.robotshop.com/eu/fr/plateforme-developpement-beaglebone-black-beagleboard.html
[Com05]
[Pla01] http://www.aeris.com/technology/aercloud/
[Pla02]
http://eu.mouser.com/Connectors/D-Sub-Connectors/D-Sub-Standard-Connectors/_/N-9gybx?No=50&P=1ytmhdqZ1yzv7x2Z1z0z812
https://www.sierrawireless.com/iot-blog/iot-blog/2016/08/lpwa_for_the_iot_part_2_standard_vs_proprietary_technologies/
https://www.sierrawireless.com/products-and-solutions/sims-connectivity-and-cloud-services/iot-cloud-platform/
256/256
credits and references[Cen01] https://openclipart.org/detail/17312/antenna-square
[Sec01] https://iotsecurityfoundation.org/
[Sta01] http://onem2m.org/images/files/deliverables/Release2/TS-0001-%20Functional_Architecture-V2_10_0.pdf[Sta02] http://www.itu.int/rec/T-REC-Y.2060-201206-I
[Pro01] https://openclipart.org/detail/259142/garbage-truck[Pro02] https://openclipart.org/detail/204589/old-british-taxi[Pro03] https://openclipart.org/detail/144367/chiva[Pro04] https://openclipart.org/detail/139267/eco-car[Pro05] https://dir.indiamart.com/impcat/gprs-modem.html[Pro06] https://openclipart.org/detail/116599/solar-panel[Pro07] https://openclipart.org/detail/181618/crashed-car