Académique Documents
Professionnel Documents
Culture Documents
Tutorial Overview
The Web of Things
Example Applications
The Web & REST?
Constrained Application Protocol (CoAP)
Base
CoAP Specification
Observation
Block
Transfer
Getting
TLS WG (DTLS)
OMA
ETSI / OneM2M
W3C
ZigBee IP
Example Applications
Building Automation
SENSEI Consortium
Asset Management
SENSEI Consortium
10
11
Web Naming
12
URL Resolution
13
An HTTP Request
Web Paradigms
15
A REST Request
16
17
See draft-shelby-core-coap-req
18
19
20
CoAP Features
currently defines:
CoAP
Base Messaging
Simple
endpoints
Confirmable
Acknowledgement
or Reset Message
REST Semantics
REST
Method,
23
Option Format
0
1
2
3
4
5
6
7
+---------------+---------------+
|
|
|
| Option Delta | Option Length |
|
|
|
+---------------+---------------+
\
\
/
Option Delta
/
\
(extended)
\
+-------------------------------+
\
\
/
Option Length
/
\
(extended)
\
+-------------------------------+
\
\
/
/
\
\
/
Option Value
/
\
\
/
/
\
\
+-------------------------------+
1 byte
0-2 bytes
0-2 bytes
0 or more bytes
Option Delta - Difference between this option type and the previous
Length - Length of the option value
Value - The value of Length bytes immediately follows Length
24
25
Request Example
Confirmable Request
Piggy-backed Response
26
27
Separate Response
28
SERVER
|
|
|
0
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 1 | 0 |
0
|
GET = 1
|
MID=0x7d34
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
11 |
4
|
"temp" (4 B) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
CLIENT
|
|
|
SERVER
|
|
|
0
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 1 | 2 |
0
|
2.05=69
|
MID=0x7d34
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
"22.3 C" (6 B) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
29
Caching
CoAP includes a simple caching model
Cacheability
An
Freshness model
Max-Age
Validation model
Validity
sleeping node,
or
31
Observation
See draft-ietf-core-observe
32
Block transfer
See draft-ietf-core-block
33
libCoAP C Library
OpenCoAP C Library
Sensinode NanoService
35
36
Relation
Target
Attributes
37
Resource Discovery
Service Discovery
What
Goal
Usually
Resource Discovery
What
Goal
of finding URIs
Performed
CoRE
38
Defines
Enables
Can
/.well-known/core?optional_query_string
Returns
URL,
39
</dev/bat>;obs;if="";rt="ipso:dev-bat";ct="0",
</dev/mdl>;if="";rt="ipso:dev-mdl";ct="0",
</dev/mfg>;if="";rt="ipso:dev-mfg";ct="0,
</pwr/0/rel>;obs;if="";rt="ipso:pwr-rel";ct="0",
</pwr/0/w>;obs;if="";rt="ipso:pwr-w";ct="0",
</sen/temp>;obs;if="";rt="ucum:Cel";ct="0"
40
Resource Directory
CoRE Link Format only defines
Peer-to-peer discovery
Resource Directory
See draft-shelby-core-resource-directory
42
SenML
text/plain (0)
44
CoRE Interfaces
CoRE Interfaces [draft-shelby-core-interfaces]
A paradigm
Simple
interface types
+-------------------+----------+------------------------------------+
|
Interface | if=
| Methods
+-------------------+----------+------------------------------------+
|
|
|
| GET
| applicable)
| GET
Sensor | core.s
Parameter | core.p
| GET, PUT
Read-only | core.rp
| GET
Parameter |
|
|
Actuator | core.a
+-------------------+----------+------------------------------------+
45
46
Architecture
Sensinode 2013
47