![Page 1: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/1.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 1|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Matthias Kovatsch
CoAP for the Web of Things:From Tiny Resource-constrained Devicesto the Web Browser
Monday, 9 Sep 20134th International Workshop on the Web of Things (WoT 2013)Zurich, Switzerland
![Page 2: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/2.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 2|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
The Web of Things
Electronic things are invading us...
Slide courtesyof Vlad Trifa
![Page 3: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/3.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 3|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
The Web of Things – of Powerful Devices
Often mains-powered, capable of running Linux, or using application-level gateways
![Page 4: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/4.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 4|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Directly connecting to the Internet in a secure manner
Tiny Resource-constrained Devices
Target ofless than $1
Class 1 devices~100kB ROM~10kB RAM
![Page 5: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/5.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 5|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
6LoWPAN for seamless Internet integration
Custom WSN Protocols on the Retreat
TCP and HTTPproblematic in
low-powernetworks
![Page 6: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/6.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 6|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
RESTful protocol designed from scratch Transparent mapping to HTTP Additional features for M2M scenarios
Constrained Application Protocol (CoAP)
Message Sub-layerReliability
UDP DTLS …
Request/Response Sub-layerRESTful interaction
GET, POST, PUT, DELETE,URIs, and Internet Media Types
Deduplication andoptional retransmissions (Confirmables)
Co
AP
![Page 7: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/7.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 7|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Binary protocol Low parsing complexity Small message size
Header options Numbers with IANA registry Type-Length-Value Special option header
marks payload if present
Constrained Application Protocol (CoAP)
0 – 8 Bytes TokenExchange handle for client
4-byte Base HeaderVersion | T-len | Type | Code | ID
Header OptionsLocation, Max-Age, ETag, …
Marker0xFF
PayloadRepresentation
![Page 8: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/8.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 8|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Observing Resources
Server
Client
Resource state at origin server
Replicated state at client
Notification
Notification
Notification
Notificationlost
Notification
Max-A
geObserve illustration courtesy of Klaus Hartke
GE
T O
bser
ve
![Page 9: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/9.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 9|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Observing Resources – CON Notifications
Server
Client
Resource state at origin server
Replicated state at client
GE
T O
bser
ve Notification
Notification
Notification
Notification
Retransm
ission
Observe illustration courtesy of Klaus Hartke
![Page 10: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/10.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 10|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
RESTful Group Communication
all-lights.floor-d.example.com
GET /status/power
PUT /control/color#00FF00
Enabled by IP multicast
![Page 11: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/11.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 11|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Based on Web Linking (RFC 5988) Extended to CoRE Link Format (RFC 6690)
Multicast Discovery Resource Directories
Resource Discovery
</config/groups>;rt="core.gp";ct=39,
</sensors/temperature>;rt="ucum.Cel";ct="0 41
50";obs,
</large>;rt="block";sz=1280;title="Large
resource"
GET /.well-known/core (RFC 5785)
![Page 12: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/12.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 12|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Short Message Service (SMS) Unstructured Supplementary
Service Data (USSD)
Addressable through URIs
(URI scheme not finalized)
Response possible over UDP/IPthrough Return-Path option
Alternative Transports
*101#
coap+sms://+123456789/bananas/temperature
![Page 13: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/13.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 13|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Proposed Standard since 15 Jul 2013 draft-ietf-core-coap-18
In RFC Editor Queue: MISSREF draft-ietf-tls-oob-pubkey (Raw Public Keys) draft-mcgrew-tls-aes-ccm-ecc (Elliptic Curve Crypto)
In use by OMA Lightweight M2M IPSO Alliance ETSI M2M Accounting and monitoring for network operators Lighting systems for smart cities
Status of CoAP
![Page 14: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/14.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 14|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
48 participants knowledgeable about CoAP and the IoT Contiki and TinyOS communities (Wireless Sensor Networks) ETSI M2M associates (M2M solutions) IETF followers (Internet technology)
Differentiation checked with Wilcoxon rank-sum test
User Study
Academiaand
Hobbyists(30+2)
Industry(16)
0-4 yearsexperience
(33)
5+ years(15)
![Page 15: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/15.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 15|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Agreement with our Hypotheses
Responses from 48 participants on the Likert scale
(0 = strongly disagree, 4 = strongly agree, error bars: +/- 1 std. dev.)
Internet protocols ease the development of distributed software for tiny devices.
Web patterns ease the development of distributed software for tiny devices.
CoAP in addition to HTTP is a necessity for the In-
ternet of Things.
I prefer using a HTTP-CoAP cross-proxy for
accessing devices.
0
1
2
3
4
Overall
Academia
Industry
Less than 5 years
5 years and more
![Page 16: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/16.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 16|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
CoAP protocol handlerfor Mozilla Firefox
Browsing and bookmarkingof CoAP URIs
Interaction with resource likeRESTClient1 or Poster2
Treat tiny devices likenormal RESTful Web services
CoAP Support in the Web Browser
1 https://addons.mozilla.org/en-US/refox/addon/poster/2 https://addons.mozilla.org/en-US/refox/addon/restclient/
https://addons.mozilla.org/firefox/addon/copper-270430/
![Page 17: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/17.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 17|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Copper (Cu)
![Page 18: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/18.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 18|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Majority (N=41) prefers the Web browser as CoAP clientfor user interaction
Main use cases for Copper (Cu) Debugging own implementation Giving a demo Browsing existing
CoAP Web services
Reasons for a different client Automation and scripting (55%) I do not use Firefox (8%)
Market Share of CoAP Clients
Copper (Cu)41%
libcoap client17%
SensinodeNanoServiceJava Client
5%Californium (Cf)
GUI client5%
Californium (Cf)console client
10%
other22%
![Page 19: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/19.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 19|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Web-like interaction withtiny devices is preferable
People not as confident to seenative support in Web browsers
2.8 / 4 on the Likert scale
UDP and DTLS support through Real-time communicationin Web browsers (RTCWeb)
Mozilla open for patches
Native CoAP Support in Web Browsers
Web browserintegration of CoAP
(77%)
standalone(23%)
![Page 20: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/20.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 20|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Actinium (Ac) App-server for Cf Server-side JavaScript CoapRequest object API Mashups in the background
Future work Enable CoapRequest object
in the Web browser Script interactions Visualize data Mashups with GUI
Scripting for Physical Mashups
![Page 21: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/21.jpg)
Questions?
Matthias Kovatsch https://github.com/mkovatsc/[email protected] http://people.inf.ethz.ch/mkovatsc/
![Page 22: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/22.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 22|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Application-agnostic Device Infrastructure
Erbium (Er) REST Engine RESTful wrapper for hardware Impact of radio duty cycling
on application-layer protocols[A Low-Power CoAP for Contiki, MASS 2012]
Implementation guidance[draft-kovatsch-lwig-coap-01, IETF 2013]
https://github.com/contiki-os/contiki
The Thin Server Architecture
![Page 23: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/23.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 23|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Application development outside of the embedded domain
Californium (Cf) framework Unconstrained service back-end
[Moving Application Logic from the Firmware to the Cloud: Towards the Thin Server Architecture for the Internet of Things, IMIS 2012]
DTLS 1.2 implementation IETF “running code” ETSI Plugtests
[Industry Adoption of the Internet of Things:A Constrained Application Protocol Survey, SOCNE 2012]
https://github.com/mkovatsc/Californium
Application Logic in the Cloud
![Page 24: CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser](https://reader033.vdocument.in/reader033/viewer/2022061300/54c850ed4a7959af638b45f6/html5/thumbnails/24.jpg)
CoAP for the Web of Things: From Tiny Resource-constrained Devices to the Web Browser 24|Matthias Kovatschhttp://people.inf.ethz.ch/mkovatsc
Customization for SMEs and consumers
Actinium (Ac) App-server for Cf Server-side JavaScript CoapRequest object API Feasibility study of scripting for
IoT applications[Actinium: A RESTful Runtime Container for Scriptable Internet of Things Applications,IoT 2012]
https://github.com/mkovatsc/Actinium
Scripting for End-user Mashups