Oct 4, 2013 - Broad application domain ... a minimal subset of REST (GET, PUT, POST, DELETE on URIs) ... Best TinyOS ...
Internet of Things Jeroen Hoebeke, Ingrid Moerman www.ibcn.intec.ugent.be Internet Based Communication Networks and Services (IBCN) Department of Information Technology (INTEC) Ghent University - iMinds 03/10/13
1
Introduction
Internet of Things
03/10/13
2
03/10/13
3
Source Cisco
Heterogeneous objects (sensors, actuators…) reveal information about the physical world, inject it into the virtual world (Internet) where it can be used as input to services, which can act again upon the physical world. = Uniquely identifiable things with a virtual representation 4
Application domains
03/10/13
Source: “Embedded Web Services”, Sensinode
5
04/10/13
Source: Quirky
6
• • • •
Broad application domain Many vertical solutions Trend towards platforms (horizontals) Building upon (communication) standards
03/10/13
7
A little history of IoT progress Radio-frequency identification • Equip objects with tags, read radio tags, identify and inventory • First use of IoT (1999)
Machine-to-machine (M2M) • One device = one SIM card • Operator managed access + communication through server
Internet of Things (IoT) • • •
One device = one IP address Internet-based device access: operator = transport network Direct interactions, flexible applications over multiple communication technologies 03/10/13
8
A little history of IoT progress ! Internet integration: from proprietary stacks...
! … to IP-based integration “Success in extending IP functionality to literally billions of devices absolutely requires a framework of standards that defines the necessary technology03/10/13 ecosystem” – CEO Sensinode – 9
IoT standardization ! Standards tailored to constrained devices (focus on IETF) ! Physical layer: IEEE 802.15.4 ! Network layer: integration in IPv6 world ! IETF 6LoWPAN: IPv6 over Low power WPAN ! IETF ROLL: Routing over Low power and Lossy networks (LLNs) ! IETF CoRE: Constrained RESTful environments Isam Ishaq, David Carels, Girum K. Teklemariam, Jeroen Hoebeke, Floris Van den Abeele, Eli De Poorter, Ingrid Moerman and Piet Demeester, “IETF Standardization in the Field of Internet of Things (IoT): A Survey”, Journal of Sensors and Actuator Networks, 2(2), 2013, pp. 235-287, doi:10.3390/jsan2020235
03/10/13
10
Need for and adoption of CoAP
Embedded web services
03/10/13
11
Need? ! Success of today’s Internet? Web services (over HTTP) ! Not suited for constrained networks/LLNs ! Constrained devices
! Different interaction models ! Short exchanges ! Sleeping nodes
! Embedded counterpart needed 03/10/13
12
IETF CoRE - WG ! CoRE = Constrained RESTful environments ! Goal: ! Design of application transfer protocol that realizes ! a minimal subset of REST (GET, PUT, POST, DELETE on URIs) ! + resource discovery, subscription/notification ! + security measures
" Constrained Application Protocol (CoAP) (+/- embedded version of HTTP) ! Bring successful web architecture to constrained devices " realization of Web of Things
13
IETF CoRE – Status ! 1 RFC ! CoRE Link Format (RFC 6690)
! 1 draft in IESG processing phase ! CoAP v18: final evaluation, RFC soon
! 7 adopted drafts (4 newly adopted, following charter) ! ! ! ! ! ! !
Observe v9 Block transfer v12 Group communication v13 (Informational) HTTP mapping v01 (Informational) CoRE interfaces v00 (Informational) Links JSON v00 Resource directory v00
! 32 other individual drafts (3 iMinds (co)-authored)) ! Topics: Security, congestion control, CoAP over X, profiles, sleepy nodes, new CoAP options… *work started end of 2010
14
Is CoAP needed? ! Goal: turn constrained devices into web server ! Constraints? ! 802.15.4: max packet length is 127 bytes ! RAM and ROM limited
! HTTP/TCP? CoAP
HTTP
TinyCoAP
HTTP/TCP
CoAP header: 4 bytes
GET /test HTTP/1.0\r\n Host: fec0::2\r\n\r\n
31.812B ROM
39.484B ROM
Best TinyOS implementation
Minimal TCP
CoAP URI path: 6 bytes CoAP token: 0-8 bytes
Footprint
Payload: 0 bytes TOTAL: 10-18 bytes + UDP
TOTAL: 37 bytes + TCP
GET request for resource /test
HTTP/TCP: footprint & communication overhead are too big! 03/10/13
15
Will CoAP be adopted by industry? ! ETSI interoperability events ! March 2012 (co-located with IETF): Huawei, Intecs, Koanlogic, Sensinode, Toyota, Vitaverna, Watteco, Hitachi, Patavina Technologies, ETH Zurich, iMinds, Uni Bremen, Uni Rostock, Ferrara
! November 2012: Watteco, Sensinode, InterDigital, Intecs, Hitachi, iMinds, Uni Bremen, ETH Zurich…
! November 2013: Assess interoperability of multivendor CoAP implementations + coverage of OMA LWM2M and DTLS
Will CoAP be adopted by industry? ! First commercial products (sensor/sensorGW device manufacturers)
17
! Adoption by IPSO Alliance and OMA LWM2M
IPSO Alliance ! Primary advocate for IP networked devices for use in energy, consumer, healthcare and industrial applications. ! Non-profit association of more than 60 members from leading technology, communications and energy companies around the world.
18
IPSO Alliance – CoAP adoption ! IPSO Application framework ! RESTful design for use in IP smart object systems ! Not a standard
! Definition of function sets ! REST interfaces that may be used to represent available resources, interact with other smart objects and backend services. ! E.g. light control function set
04/10/13
19
Open Mobile Alliance ! Develops standards for mobile phone industry ! OMA M2M ! Building common set of standards for managing light weight and low capability devices on a variety of networks ! The ability to monitor, provision and manage these billions of connected devices to be expected becomes absolutely essential. ! Focus on cellular devices
! OMA M2M challenges
S. Scarpina, Telecom Italia, Device Management Working group Vice Chairman, OMA, 2012 04/10/13
20
OMA – CoAP Adoption ! OMA Lightweight M2M (LWM2M) ! Efficient Device-Server interface based on open IETF standards ! CoAP and DTLS bound to UDP or SMS ! For bootstrapping, registration, management, reporting, etc.
! Extensible Object and Resource model for application semantics ! OMA, other SDOs/enterprises can define & register objects
! Standard to be published in 2013
04/10/13
21
CoAP adoption / industrial interest Key driver of IoT standardization (IETF, IPSO, OMA, ZigBee IP, etc.),
03/10/13
22
CoAP primer
03/10/13
23
IETF CoRE - CoAP ! Constrained Application Protocol (CoAP) ! Embedded counterpart of HTTP ! Features: ! ! ! ! ! ! !
Asynchronous transaction model UDP with reliability and multicast support GET, PUT, POST and DELETE using URIs Small, simple header: 4 bytes base header + TLV options Mapping to HTTP possible coap:// scheme Optional observation, block transfer and discovery
03/10/13
24
CoAP architecture
! Goal: provide RESTful access to resource constrained devices ! Similar to HTTP (get, put, post, …) ! Suitable for direct end-to-end communication between constrained devices 03/10/13
25
CoAP message format
CoAP option format
Example CoAP options: Uri-path, Content-Format, Max-Age, Uri-Query, Observe, etc.
04/10/13
26
CoAP example CoAP Client
CoAP Server
Resource /.well-known/core used for resource discovery
GET /.well-known/core 2.05 "Content" ;rt="TemperatureC";if="sensor“, ;rt="LightLux";if="sensor"
GET /s/t
Result = collection of resources in “application/link-format” • URI reference • Target attributes: describe information useful to access the resource " coap://[IPv6_sensor]/s/t exists
2.05 “Content” 23.5C
03/10/13
27
CoAP Observe option Client
Server Get/.well-known/core
! Client can register interest for having an always fresh representation of a resource: send request with observe option ! Notifications upon ! Every state change of resource ! When max-age expires (for freshness)
04/10/13
2.05 “Content” ;rt=“TemperatureC”;if=“sensor”, ;rt=“LightLux”;if=“Sensor” GET /s/t Observe: 10 Token: 0x4a 2.05 “Content” Observe: 12 Token: 0x4a Payload: 22.7C 2.05 “Content” Observe: 21 Token: 0x4a Payload: 23.4C
(Resource Discovery)
(Registration)
(Notification)
(Notification) 28
CoAP Blockwise transfers ! "Block" options, for transferring efficiently multiple blocks of information from a resource representation in multiple request-response pairs. ! Note: 802.15.4’s standard packet size = 127 bytes
04/10/13
29
Resource directory ! = Directory server: hosts descriptions of resources held on other servers, allowing lookups to be performed for those resources ! Functions ! Registration: registration of an endpoint’s resources using the registration interface.
! Also: update, validation, removal 04/10/13
30
Resource directory ! Functions ! Lookup: allows lookups for domains, groups, endpoints and resources using attributes. ! Resource lookup example
! Endpoint lookup example
04/10/13
31
Other relevant extensions ! Group Communication ! Group communication draft: using multicast
! HTTP/CoAP mapping ! Concept of caching ! Max-age of resources
! Solutions to interact with sleepy devices
03/10/13
32
1) Conditional observe
Building upon CoAP Girum Ketema, Jeroen Hoebeke, Ingrid Moerman, Piet Demeester, Tao Shi, Antonio J. Jara, “Efficiently Observing Internet of Things Resources”, 2012 IEEE International Conference on Green Computing and Communications, Conference on Internet of Things, and Conference on Cyber, Physical and Social Computing, 2012, pp. 446-449, DOI: 10.1109/GreenCom.2012.70 Teklemariam Ketema Girum, Hoebeke Jeroen, Moerman Ingrid, Demeester Piet, “Facilitating the creation of IoT applications through conditional observations in CoAP”, EURASIP Journal on Wireless Communications and Networking 2013, 2013:177, doi: 10.1186/1687-1499-2013-177 http://tools.ietf.org/html/draft-li-core-conditional-observe-04
03/10/13
33
CoAP Observe Limitations E.g. Air Pollution Monitoring
Air Quality Sensor
Client Node (also Acts as Gateway to HQ)
Possible scenario • Collect data every 30 minutes • If threshold exceeded, monitor every 5 minutes 03/10/13
Pollution Control HQ
Possible solutions • Polling • Observe: collect ALL values and filter " not efficient 34
CoAP Conditional observe ! Extension to observe to generate notifications only when condition is fulfilled
• Co-authored IETF draft on conditional observe • Implementation • Contiki implementation based on Erbium CoAP framework • Running on Tmote Sky (10kB RAM, 48kB Flash)
Useful for / common to wide range of resources
• C++ implementation 04/10/13
35
CoAP Conditional Observe option Server
Client Get/.well-known/core
2.05 “Content” ;rt=“TemperatureC”;if=“sensor”, ;rt=“LightLux”;if=“Sensor” GET /s/t Observe: 10; Condition: T: >, V:23 Token: 0x4a 2.05 “Content” Observe: 12 Token: 0x4a Payload: 22.7C
2.05 “Content” Observe: 21 Token: 0x4a Payload: 23.6C
(Resource Discovery)
(Registration)
22.7 (Initial Notification) 23 (Criteria not met. No Notification) 23.6 (Criteria Met. Send Notification)
Evaluation: Cooja CoAP server on sensor
100 Pseudo Random Numbers between 20 – 29 (Avg. 24)
Client: cond. observe with condition “All Values Greater”
0-5 Intermediate Nodes
Average Power Consumption vs Hop Count Power Consumption (mW)
2.40
Normal observe Cond. 20C
2.35 2.30 2.25
Cond. 25C
2.20 2.15
Cond. 29C
2.10
7-13% increase battery life (AA lithium)
2.05 0
1
2
3
4
5
Number of intermediary hops
! Can greatly reduce traffic compared to observe + client-side filtering: ! Strongly dependent on the use case (and thus the conditions) ! More extreme conditions (e.g. alarms) are best
! Implementation on very constrained device feasible 03/10/13
37
Evaluation: theoretical
04/10/13
S = time between resource changes 25% chance condition is fulfilled
38
2) Group communication
Building upon CoAP Isam Ishaq, Jeroen Hoebeke, Floris Van den Abeele, Ingrid Moerman, Piet Demeester, “Group Communication in Constrained Environments using CoAP-based Entities”, IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS) - IoTIP workshop, pp. 345-350, DOI: 10.1109/DCOSS.2013.14 http://tools.ietf.org/html/draft-ishaq-core-entities-00
03/10/13
39
CoAP-enabled Home Automation + No vertical proprietary solutions + Easy interaction with individual sensors + Simplified application development
As end user, how can I realize use cases involving multiple sensors/actuators at the same time? 03/10/13
40
Group Communication ! Need identified in the charter of CoRE WG. ! draft-ietf-core-groupcomm-07: multicast Light Switch
Light-1
Light-2
Light-3
Mcast(PUT, Payload=lights ON)
! Limitations ! Not reliable, proposed draft tries to overcome this by allowing optional unicast replies to multicasts ! Need additional implementation on constrained network ! Need to create and manage multicast group 23 May 2013
41
Alternative solution ! Based on unicast ! Easy way to create groups ! A way to validate the group members ! Possibility to manipulate the behavior after group creation
03/10/13
42
System Overview
Resource Directory
CoAP Client
Resource registration
LLN1
Entity Manager
IPv6 Internet
LLN2
CoAP Sensornode 03/10/13
43
Entity Creation CoAP Client
Internet
Entity Manager
LLN1
Sen8
Sen5
POST coap://[EM]/e (application/link-format) Body: , Entity Validation 2.05 Content (text/plain) Body: /1 created 03/10/13
44
Entity Creation Example (CoAP POST)
04/10/13
48
Usage Example: Client Perspective
03/10/13
50
Usage Example: Behind the Scenes
03/10/13
51
Summary Feature
Multicast based group communication
Our Approach
Way$of$communica,on$
Mul,cast$
Unicast$
What$is$grouped$
Endpoints$
Resource$or$Endpoint$
No$
Yes$
In$client$
In$En,ty$Manager$$ can$be$located$anywhere$$ (also$in$client)$
Complex$because$reliable$ mul,cast$is$needed$
Relies$on$$ builtDin$CoAP$confirmable$messages$
All$nodes$in$the$mul,cast$tree$ need$to$support$mul,cast$and$ process$all$packets$$
No$need$to$change$anything$on$the$ network$
Not$possible$in$mul,cast$
Possible$
Fixed$
Flexible$
Not$possible$at$CoAP$level$$ (DTLS$is$unicast$only)$ 23 May 2013
Possible$
Valida,on$ Response$processing$
Reliability$ Impact$on$LLN$
Message$aggrega,on$ Group$behavior$ Secure$communica,on$
52
CoAP as enabler
03/10/13
60
Integration in web site Drupal module
04/10/13
61
COMACOD ! Control and management of constrained devices ! Goals: Data transfer, and configurability and management of constrained devices: ! Configurable data exchange middleware ! Backend service platform
! Building upon CoAP ! Spanning heterogeneous application domains
03/10/13
62
O’CareCloudS
Tagging + semantics
Reasoning on sensor and other data CoAP-enabled sensors
03/10/13
63
Summary
03/10/13
64
Summary ! IoT standarization is ongoing and becoming mature ! Shift towards open standards
! CoAP enables embedded web services: Web of Things ! Constrained devices will become a full end point at both the communication and service level ! Standards cannot be ignored, but they are fertile ground for further (applied) research ! E.g. advanced CoAP extensions, semantic Web of Things… 04/10/13
65
Questions ? Jeroen Hoebeke
[email protected] www.ibcn.intec.ugent.be Internet Based Communication Networks and Services (IBCN) Department of Information Technology (INTEC) Ghent University - iMinds 03/10/13
66