1. Firma convenzione
Politecnico di Milano e Veneranda Fabbrica
del Duomo di Milano
Aula Magna – Rettorato
Mercoledì 27 maggio 2015
Lesson 2: Internet of Things and enabling
technologies
Luca Cerina – luca.cerina@polimi.it
Ver. Updated – 30/11/2017
4. Luca Cerina, R.A. @ NECSTLab – DEIB
The Quantied Self
“Not all important things in life can be measured and not
everything that can be measured is important”
(Quantified Self Institute)
6. Luca Cerina, R.A. @ NECSTLab – DEIB
Device design: outline
●
Existent technologies
●
NFC
●
Bluetooth
●
LoRa
●
Bird’s eye view on: Fog Computing
●
Focus on: design for human interaction
7. Luca Cerina, R.A. @ NECSTLab – DEIB
NFC/RFID
●
The reader uses the antenna to
constantly scan the area sending
radio waves
●
The transponder send its ID, with an
active signal (active RFID) or
piggybacking the reader waves
(passive RFID)
The frequencies are:
●
LF (125-134KHz) 1-10cm→
●
HF (13.56MHz) 1m (NFC)→
●
UHF (865-960MHz) long range→
9. Luca Cerina, R.A. @ NECSTLab – DEIB
Call for Ideas
What would you design?
10. Luca Cerina, R.A. @ NECSTLab – DEIB
Bluetooth Low Energy
Bluetooth LE enable short-burst wireless
connections and uses multiple network topologies:
●
Point-to-Point (1:1) data transfer and fitness→
trackers
●
Broadcast (1:many) beacons, information→
sharing
●
Mesh (HOT! NEW!) (m:m) large scale topology→
for sensor networks, automation, devices chatting
12. Luca Cerina, R.A. @ NECSTLab – DEIB
BLE Radio
●
Frequency: 2.4 GHz ISM
(Industrial Scientific
Medical) band
●
40 channels with 2 MHz
spacing
●
Range 0 – 100m (BT
5.0)
●
Enabling technology
invented by Hedi Lamarr
13. Luca Cerina, R.A. @ NECSTLab – DEIB
BLE Roles
Advertiser broadcasts adv. packets, can be→
connectable or not
Scanner listen to adv. Packets, passively or→
actively (scan request)
Master/central device connected to→
slave/peripherals
Slave/peripheral device connected to Central→
Mesh node advertise and scan at the same time,→
performs drop logic on the packets
14. Luca Cerina, R.A. @ NECSTLab – DEIB
BLE Generic Atribute Proile
Provide access to device discovery & connection
control
GAP defines roles:
●
Broadcaster advertiser→
●
Observer scanner→
●
Peripheral always slave→
●
Central always master, never advertise→
15. Luca Cerina, R.A. @ NECSTLab – DEIB
BLE GAP Modes
Connectable
●
Can make a connection
●
Not connectable / connectable
Discoverable
●
Can be discovered (advertising)
●
None, limited, general
Bondable
●
Can pair with a device for long term connections
●
Not bondable / bondable
16. Luca Cerina, R.A. @ NECSTLab – DEIB
BLE Generic ATTributes (GATT)
●
GATT defines only two roles: Server and Client
●
The attribute is the smallest data element available, it is
defined by a 128 bit Unique Identifier (UUID) or a 16bit
handle.
An attribute can be: Readable, Writable, R/W, None
17. Luca Cerina, R.A. @ NECSTLab – DEIB
GATT hierarchy
GATT defines a precise hierarchy
for data and reusability.
Service/Profile:
conceptually related attributes
(e.g. heart rate)
Characteristic:
single value or metadata
container
Descriptor:
single value, which meaning its
defined by the characteristic
metadata.
19. Luca Cerina, R.A. @ NECSTLab – DEIB
How to use BLE in your applicaton
Raspberry Pi & co:
→ Bluepy ( Python )
→ BlueZ ( C )
Microcontrollers:
→ Redbear Nano/Duo (redbear.cc)
→ Arduino 101 (arduino.cc)
→ SensiBLE (sensiedge.com)
Smartphone
→ Bluetooth core libraries
20. Luca Cerina, R.A. @ NECSTLab – DEIB
Call for Ideas
What would you design?
21. Luca Cerina, R.A. @ NECSTLab – DEIB
LoRaWAN: Long Range Wide Area Network
22. Luca Cerina, R.A. @ NECSTLab – DEIB
LoRaWAN: Long Range Wide Area Network
Long range communication link
●
Up to 2.5km in cities
●
Up to 10km in countryside
Frequency (Europe): 868 MHz
Low data rate: 0.3 – 50 kbps
24. Luca Cerina, R.A. @ NECSTLab – DEIB
LoRa end-device
Every network is identified by a 7bit identifier (NwkID, not
unique).
Private networks use 0x0 as ID.
Each device has a 25bit address, static or given by the
network at join-time.
The full DevAddr is 32bit = NwkID + deviceID
25. Luca Cerina, R.A. @ NECSTLab – DEIB
LoRa end-device
Every device should comply to a specific “application” and
use a 64bit IEEE AppEUI value.
To increase security, each end-device uses two 128bit AES
symmetric keys:
●
NwkSKey protection from network artefacts→
●
AppSKey protection on application layer traffic→
26. Luca Cerina, R.A. @ NECSTLab – DEIB
LoRa dynamic join
End-device could also avoid pre-provisioning and perform
a join request to the network. In this case the device needs:
●
A 128 bit unique appKey for encryption
●
A valid 64 bit AppEUI
●
A device ID which should be a valid EUI called devEUI
If the join is successful, the server answers with a join
accept and provide DevAddr, NwkSKey and AppSKey
through the downlink
27. Luca Cerina, R.A. @ NECSTLab – DEIB
LoRa devices
Nodes
→ The things UNO
→ Arduino MKR WAN 1300
→ Adafruit Feather LoRa
Gateways (~200-250 )€
→ Multitech Conduit
→ Lorrier LR2
→ The things gateway
28. Luca Cerina, R.A. @ NECSTLab – DEIB
How to connect
Free, community based, LoRa network
29. Luca Cerina, R.A. @ NECSTLab – DEIB
Call for Ideas
What would you design?
30. Luca Cerina, R.A. @ NECSTLab – DEIB
The rise of Edge/Fog computng
https://nordicapis.com/what-is-fog-computing/
31. Luca Cerina, R.A. @ NECSTLab – DEIB
State of the art: challenges
31
To represent the real breakthrough in Cloud and
IoT technologies, the Fog needs to be:
Reliable and
scalable [1]
●
Deployment plan of
nodes
●
Orchestration models
●
Nodes interaction
control
[1] Z. Wen, R. Yang, P. Garraghan, T. Lin, J. Xu, and M. Rovatsos, “Fog orchestration for
internet of things services,” 2017.
32. Luca Cerina, R.A. @ NECSTLab – DEIB
State of the art: challenges
To represent the real breakthrough in Cloud and
IoT technologies, the Fog needs to be:
Secure [2]
●
Resistance to attacks
●
Trusted authentication
systems
●
Detection of rogue
nodes
[2] A. Alrawais, A. Alhothaily, C. Hu, and X. Cheng, “Fog computing for the internet of
things: Security and privacy issues,”, 2017.
33. Luca Cerina, R.A. @ NECSTLab – DEIB
State of the art: challenges
Manageable [3]
●
Workflow policies
●
Data migration
●
Scheduling at runtime
[3] Z. Hao, E. Novak, S. Yi, and Q. Li, “Challenges and software architecture for fog
computing,” 2017.
To represent the real breakthrough in Cloud and
IoT technologies, the Fog needs to be:
34. Luca Cerina, R.A. @ NECSTLab – DEIB
FPGAs in the Fog
The OpenFog consortium technical
reference includes hardware
accelerators such as Field
Programmable Gate Arrays (FPGA)
to:
“Provide supplementary computational throughput” and
“satisfy both latency and power constraints as it relates to
a given scenario”
Minimal power consumption
and high performance
Extreme re-programmability
Faster time-to-market and
lower costs
36. Luca Cerina, R.A. @ NECSTLab – DEIB
Interacton layer
Sensors produces data, Actuators consume it in form of commands, and
both communicate with the Mesh Layer above them.
The Human-in-the-loop can consume and produce data, and act
upon it (e.g. application interaction or physical outcomes).
All the elements communicate through wireless protocols (BLE 4.2 in the
current deployment)
37. Luca Cerina, R.A. @ NECSTLab – DEIB
Fog node and cloud
The Fog Node acts as a central point of communication between the
Mesh and the Cloud. It comprises an ARM CPU and an FPGA accelerator
(Xilinx Zynq 7000 Architecture)
The FPGA circuit can be reprogrammed at runtime to handle specific
tasks, like data aggregation from sensors towards the Cloud, or to directly
act on physical actuators without the intervention of Cloud computing.
38. Luca Cerina, R.A. @ NECSTLab – DEIB
Call for Ideas
What would you design?
39. Luca Cerina, R.A. @ NECSTLab – DEIB
Design for human interacton
One basic principle:
KISS
43. Luca Cerina, R.A. @ NECSTLab – DEIB
Design for human interacton
“Interaction design is about shaping digital things for
people’s use” (Jonas Lowgren)
“An interaction designer must become an expert in
how human beings relate to each other, and to the
world, and to the changing nature of technology” (Jon
Kolko)
48. Luca Cerina, R.A. @ NECSTLab – DEIB
Prototype
INEXPENSIVE, scaled down versions of the product/feature to be analyzed
49. Luca Cerina, R.A. @ NECSTLab – DEIB
Test
Pay close attention to the concepts of COGNITIVE FRICTION and OVERLOAD
50. Luca Cerina, R.A. @ NECSTLab – DEIB
Last take away
www.shutterstock.com
User engagement / Actionable items
No direct meaning in the numbers
Abandon rate up to 33% after 6 months
Jacket1234 @Deviantart
Data quality
Need for consistency and validation
Mean heart rate Insights with low valence→
Kasey McMahon
Technology
To integrate wearables with multi-task smart
ambient devices