Slide 1

Slide 1 text

CoAPing with the Internet of Things RFC 7252 Anmol Sarma Huawei

Slide 2

Slide 2 text

Agenda What Why How Demo!

Slide 3

Slide 3 text

CoAP “The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained networks.” – RFC 7252

Slide 4

Slide 4 text

Constrained-Node Networks Obligatory RFC 7228 reference. . .

Slide 5

Slide 5 text

Constrained-Node Networks Obligatory RFC 7228 reference. . . Basically: Small Slow Lossy

Slide 6

Slide 6 text

Constrained-Node Networks Obligatory RFC 7228 reference. . . Basically: Small Slow Lossy Think more Arduino, less RaspberryPi

Slide 7

Slide 7 text

Internet of Things Currently: WWW: TCP + (TLS) + HTTP Very widely used and very familiar

Slide 8

Slide 8 text

Internet of Things Currently: WWW: TCP + (TLS) + HTTP Very widely used and very familiar IoT? IoE? WoT?

Slide 9

Slide 9 text

Internet of Things Currently: WWW: TCP + (TLS) + HTTP Very widely used and very familiar IoT? IoE? WoT? Something more lightweight Something semantically compatible

Slide 10

Slide 10 text

RESTful

Slide 11

Slide 11 text

RESTful Pause for rants, flames and holy wars. . .

Slide 12

Slide 12 text

RESTful Pause for rants, flames and holy wars. . . Client-Server Stateless Cache Layered System Uniform Interface

Slide 13

Slide 13 text

RESTful Pause for rants, flames and holy wars. . . Client-Server Stateless Cache Layered System Uniform Interface Hypermedia as the Engine of Application State

Slide 14

Slide 14 text

Constrained RESTful Environments (core) “. . . provides a framework for resource-oriented applications intended to run on constrained IP networks.” “. . . the working group has defined a Constrained Application Protocol (CoAP) for the manipulation of Resources on a Device.”

Slide 15

Slide 15 text

CoAP Features Asynchronous request-response model Methods analogous to HTTP (GET, PUT, POST) Response codes similar to HTTP (2.05, 4.03, 5.00) Options in place of headers MIME types (JSON, CBOR) URI support: coap://[HOST]:PORT/path?q=query Compact binary protocol (4 byte header) UDP binding (TCP and SMS bindings also possible) Observation i.e. subscription mechanism Resource discovery Block transfer

Slide 16

Slide 16 text

Semantics of CoAP methods . . . are “almost, but not entirely unlike” [HHGTTG] those of HTTP methods. Message Types: CONfirmable NON-confirmable ACKnowledgment RST

Slide 17

Slide 17 text

Piggybacked Response

Slide 18

Slide 18 text

Deferred (Async) Response

Slide 19

Slide 19 text

Observe

Slide 20

Slide 20 text

Resource Discovery RFC 6690

Slide 21

Slide 21 text

Resource Discovery RFC 6690 REQ: GET /.well-known/core

Slide 22

Slide 22 text

Resource Discovery RFC 6690 REQ: GET /.well-known/core RES: 2.05 Content ;ct=40

Slide 23

Slide 23 text

Resource Discovery RFC 6690 REQ: GET /.well-known/core RES: 2.05 Content ;ct=40 REQ: GET /sensors

Slide 24

Slide 24 text

Resource Discovery RFC 6690 REQ: GET /.well-known/core RES: 2.05 Content ;ct=40 REQ: GET /sensors RES: 2.05 Content ;rt="temperature-c";if="sensor", ;rt="light-lux";if="sensor"

Slide 25

Slide 25 text

Resource Directory (Draft)

Slide 26

Slide 26 text

Resource Directory (Draft)

Slide 27

Slide 27 text

Resource Directory (Draft) Cache / Reverse Crawler

Slide 28

Slide 28 text

Application Profiles OMA LWM2M IPSO Alliance IETF CoRE Interfaces (Draft) Implementations http://coap.technology/impls.html

Slide 29

Slide 29 text

Message Format

Slide 30

Slide 30 text

Option Format

Slide 31

Slide 31 text

Demo!

Slide 32

Slide 32 text

?? || //