<s>
Constrained	B-Device
Application	I-Device
Protocol	I-Device
(	O
CoAP	B-Device
)	O
is	O
a	O
specialized	O
Internet	O
application	O
protocol	O
for	O
constrained	O
devices	O
,	O
as	O
defined	O
in	O
.	O
</s>
<s>
CoAP	B-Device
is	O
designed	O
for	O
use	O
between	O
devices	O
on	O
the	O
same	O
constrained	O
network	O
(	O
e.g.	O
,	O
low-power	O
,	O
lossy	O
networks	O
)	O
,	O
between	O
devices	O
and	O
general	O
nodes	O
on	O
the	O
Internet	O
,	O
and	O
between	O
devices	O
on	O
different	O
constrained	O
networks	O
both	O
joined	O
by	O
an	O
internet	O
.	O
</s>
<s>
CoAP	B-Device
is	O
also	O
being	O
used	O
via	O
other	O
mechanisms	O
,	O
such	O
as	O
SMS	O
on	O
mobile	O
communication	O
networks	O
.	O
</s>
<s>
CoAP	B-Device
is	O
an	O
application-layer	O
protocol	O
that	O
is	O
intended	O
for	O
use	O
in	O
resource-constrained	O
Internet	O
devices	O
,	O
such	O
as	O
wireless	B-Architecture
sensor	I-Architecture
network	I-Architecture
nodes	O
.	O
</s>
<s>
CoAP	B-Device
is	O
designed	O
to	O
easily	O
translate	O
to	O
HTTP	B-Protocol
for	O
simplified	O
integration	O
with	O
the	O
web	O
,	O
while	O
also	O
meeting	O
specialized	O
requirements	O
such	O
as	O
multicast	O
support	O
,	O
very	O
low	O
overhead	O
,	O
and	O
simplicity	O
.	O
</s>
<s>
Multicast	O
,	O
low	O
overhead	O
,	O
and	O
simplicity	O
are	O
important	O
for	O
Internet	B-Operating_System
of	I-Operating_System
things	I-Operating_System
(	O
IoT	B-Operating_System
)	O
and	O
machine-to-machine	O
(	O
M2M	O
)	O
communication	O
,	O
which	O
tend	O
to	O
be	O
embedded	B-Architecture
and	O
have	O
much	O
less	O
memory	O
and	O
power	O
supply	O
than	O
traditional	O
Internet	O
devices	O
have	O
.	O
</s>
<s>
CoAP	B-Device
can	O
run	O
on	O
most	O
devices	O
that	O
support	O
UDP	B-Protocol
or	O
a	O
UDP	B-Protocol
analogue	O
.	O
</s>
<s>
The	O
Internet	O
Engineering	O
Task	O
Force	O
(	O
IETF	O
)	O
Constrained	O
RESTful	B-Protocol
Environments	O
Working	O
Group	O
(	O
)	O
has	O
done	O
the	O
major	O
standardization	O
work	O
for	O
this	O
protocol	O
.	O
</s>
<s>
In	O
order	O
to	O
make	O
the	O
protocol	O
suitable	O
to	O
IoT	B-Operating_System
and	O
M2M	O
applications	O
,	O
various	O
new	O
functions	O
have	O
been	O
added	O
.	O
</s>
<s>
CoAP	B-Device
makes	O
use	O
of	O
two	O
message	O
types	O
,	O
requests	O
and	O
responses	O
,	O
using	O
a	O
simple	O
,	O
binary	O
header	O
format	O
.	O
</s>
<s>
CoAP	B-Device
is	O
by	O
default	O
bound	O
to	O
UDP	B-Protocol
and	O
optionally	O
to	O
DTLS	B-General_Concept
,	O
providing	O
a	O
high	O
level	O
of	O
communications	O
security	O
.	O
</s>
<s>
When	O
bound	O
to	O
UDP	B-Protocol
,	O
the	O
entire	O
message	O
must	O
fit	O
within	O
a	O
single	O
datagram	O
.	O
</s>
<s>
When	O
used	O
with	O
6LoWPAN	B-Protocol
as	O
defined	O
in	O
RFC	O
4944	O
,	O
messages	O
should	O
fit	O
into	O
a	O
single	O
IEEE	O
802.15.4	O
frame	O
to	O
minimize	O
fragmentation	O
.	O
</s>
<s>
The	O
smallest	O
CoAP	B-Device
message	O
is	O
4	O
bytes	O
in	O
length	O
,	O
if	O
the	O
token	O
,	O
options	O
and	O
payload	O
fields	O
are	O
omitted	O
,	O
i.e.	O
</s>
<s>
if	O
it	O
only	O
consists	O
of	O
the	O
CoAP	B-Device
header	O
.	O
</s>
<s>
The	O
first	O
4	O
bytes	O
are	O
mandatory	O
in	O
all	O
CoAP	B-Device
datagrams	O
,	O
they	O
constitute	O
the	O
fixed-size	O
header	O
.	O
</s>
<s>
Indicates	O
the	O
CoAP	B-Device
version	O
number	O
.	O
</s>
<s>
The	O
three	O
most	O
significant	O
bits	O
form	O
a	O
number	O
known	O
as	O
the	O
"	O
class	O
"	O
,	O
which	O
is	O
analogous	O
to	O
the	O
class	B-Protocol
of	I-Protocol
HTTP	I-Protocol
status	I-Protocol
codes	I-Protocol
.	O
</s>
<s>
You	O
can	O
find	O
the	O
latest	O
CoAP	B-Device
request/response	O
codes	O
at	O
,	O
though	O
the	O
below	O
list	O
gives	O
some	O
examples	O
:	O
</s>
<s>
Name	O
Programming	O
Language	O
Implemented	O
CoAP	B-Device
version	O
Client/Server	O
Implemented	O
CoAP	B-Device
features	O
License	O
Link	O
coap	B-Device
Dart	O
RFC	O
7252	O
Client	O
Blockwise	O
Transfers	O
,	O
Observe	O
,	O
Multicast	O
,	O
Proxying	O
(	O
partial	O
)	O
MIT	O
https://github.com/shamblett/coap	O
aiocoap	O
Python	O
3	O
RFC	O
7252	O
Client	O
+	O
Server	O
Blockwise	O
Transfers	O
,	O
Observe	O
(	O
partial	O
)	O
MIT	O
https://pypi.python.org/pypi/aiocoap	O
Californium	O
Java	O
RFC	O
7252	O
,	O
RFC	O
7641	O
,	O
RFC	O
7959	O
Client	O
+	O
Server	O
Observe	O
,	O
Blockwise	O
Transfers	O
,	O
Multicast	O
(	O
since	O
2.x	O
)	O
,	O
DTLS	B-General_Concept
( +	O
DTLS	B-General_Concept
1.2	O
Connection	O
ID	O
)	O
EPL+EDL	O
https://www.eclipse.org/californium	O
https://github.com/eclipse/californium	O
cantcoap	O
C++	O
/C	O
RFC	O
7252	O
Client	O
+	O
Server	O
BSD	O
https://github.com/staropram/cantcoap	O
Canopus	O
Go	B-Application
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
Apache	O
License	O
2.0	O
https://github.com/zubairhamed/canopus	O
Go-CoAP	O
Go	B-Application
RFC	O
7252	O
,	O
RFC	O
8232	O
,	O
RFC	O
7641	O
,	O
RFC	O
7959	O
Client	O
+	O
Server	O
Core	O
,	O
Observe	O
,	O
Blockwise	O
,	O
Multicast	O
,	O
TCP/TLS	O
Apache	O
License	O
2.0	O
https://github.com/plgd-dev/go-coap	O
CoAP	B-Device
implementation	O
for	O
Go	B-Application
Go	B-Application
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
+	O
Draft	O
Subscribe	O
MIT	O
https://github.com/dustin/go-coap	O
CoAP.NET	O
C#	O
RFC	O
7252	O
,	O
coap-13	O
,	O
coap-08	O
,	O
coap-03	O
Client	O
+	O
Server	O
Core	O
,	O
Observe	O
,	O
Blockwise	O
Transfers	O
3-clause	O
BSD	O
https://github.com/smeshlink/CoAP.NET	O
CoAPSharp	O
C#	O
,	O
.NET	O
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
,	O
Observe	O
,	O
Block	O
,	O
RD	O
LGPL	O
http://www.coapsharp.com	O
CoAPthon	O
Python	O
RFC	O
7252	O
Client	O
+	O
Server	O
+	O
Forward	O
Proxy	O
+	O
Reverse	O
Proxy	O
Observe	O
,	O
Multicast	O
server	O
discovery	O
,	O
CoRE	O
Link	O
Format	O
parsing	O
,	O
Block-wise	O
MIT	O
https://github.com/Tanganelli/CoAPthon	O
CoAP	B-Device
Shell	O
Java	O
RFC	O
7252	O
Client	O
Observe	O
,	O
Blockwise	O
Transfers	O
,	O
DTLS	B-General_Concept
Apache	O
License	O
2.0	O
https://github.com/tzolov/coap-shell	O
Copper	O
JavaScript	O
(	O
Browser	O
Plugin	O
)	O
RFC	O
7252	O
Client	O
Observe	O
,	O
Blockwise	O
Transfers	O
3-clause	O
BSD	O
https://github.com/mkovatsc/Copper	O
https://addons.mozilla.org/firefox/addon/copper-270430/	O
eCoAP	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
MIT	O
https://gitlab.com/jobol/ecoap	O
Erbium	O
for	O
Contiki	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
Observe	O
,	O
Blockwise	O
Transfers	O
3-clause	O
BSD	O
http://www.contiki-os.org/	O
(	O
er-rest-example	O
)	O
FreeCoAP	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
+	O
HTTP/CoAP	O
Proxy	O
Core	O
,	O
DTLS	B-General_Concept
,	O
Blockwise	O
Transfers	O
BSD	O
https://github.com/keith-cullen/FreeCoAP	O
iCoAP	O
Objective-C	O
RFC	O
7252	O
Client	O
Core	O
,	O
Observe	O
,	O
Blockwise	O
Transfers	O
MIT	O
https://github.com/stuffrabbit/iCoAP	O
java-coap	O
Java	O
RFC	O
7252	O
,	O
RFC	O
7641	O
,	O
RFC	O
7959	O
,	O
RFC	O
8323	O
Client	O
+	O
Server	O
Apache	O
License	O
2.0	O
https://github.com/PelionIoT/java-coap	O
jCoAP	O
Java	O
RFC	O
7252	O
Client	O
+	O
Server	O
Observe	O
,	O
Blockwise	O
Transfers	O
Apache	O
License	O
2.0	O
https://code.google.com/p/jcoap/	O
libcoap	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
Observe	O
,	O
Blockwise	O
Transfers	O
,	O
DTLS	B-General_Concept
BSD/GPL	O
https://github.com/obgm/libcoap	O
LibNyoci	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
,	O
Observe	O
,	O
Block	O
,	O
DTLS	B-General_Concept
MIT	O
https://github.com/darconeous/libnyoci	O
lobaro-coap	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
Observe	O
,	O
Blockwise	O
Transfers	O
MIT	O
http://www.lobaro.com/lobaro-coap	O
microcoap	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
MIT	O
https://github.com/1248/microcoap	O
microCoAPy	O
MicroPython	O
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
Apache	O
License	O
2.0	O
https://github.com/insighio/microCoAPy	O
nanoCoAP	O
C	O
RFC	O
7252	O
Client	O
+	O
Server	O
Core	O
,	O
Blockwise	O
Transfers	O
,	O
DTLS	B-General_Concept
LGPL	O
https://api.riot-os.org/group__net__nanocoap.html	O
nCoap	O
Java	O
RFC	O
7252	O
Client	O
+	O
Server	O
Observe	O
,	O
Blockwise	O
Transfers	O
,	O
CoRE	O
Link	O
Format	O
,	O
Endpoint-ID-Draft	O
BSD	O
https://github.com/okleine/nCoAP	O
node-coap	O
Javascript	O
RFC	O
7252	O
,	O
</s>
<s>
to	O
turn	O
on	O
all	O
the	O
CoAP-enabled	O
lights	O
in	O
a	O
room	O
with	O
a	O
single	O
CoAP	B-Device
request	O
triggered	O
by	O
toggling	O
the	O
light	O
switch	O
)	O
.	O
</s>
<s>
This	O
extension	O
relies	O
on	O
IP	O
multicast	O
to	O
deliver	O
the	O
CoAP	B-Device
request	O
to	O
all	O
group	O
members	O
.	O
</s>
<s>
An	O
alternative	O
method	O
for	O
CoAP	B-Device
group	O
communication	O
that	O
uses	O
unicasts	O
instead	O
of	O
multicasts	O
relies	O
on	O
having	O
an	O
intermediary	O
where	O
the	O
groups	O
are	O
created	O
.	O
</s>
<s>
CoAP	B-Device
defines	O
four	O
security	O
modes	O
:	O
</s>
<s>
PreSharedKey	O
,	O
where	O
DTLS	B-General_Concept
is	O
enabled	O
,	O
there	O
is	O
a	O
list	O
of	O
pre-shared	O
keys	O
,	O
and	O
each	O
key	O
includes	O
a	O
list	O
of	O
which	O
nodes	O
it	O
can	O
be	O
used	O
to	O
communicate	O
with	O
.	O
</s>
<s>
RawPublicKey	O
,	O
where	O
DTLS	B-General_Concept
is	O
enabled	O
and	O
the	O
device	O
uses	O
an	O
asymmetric	O
key	O
pair	O
without	O
a	O
certificate	O
,	O
which	O
is	O
validated	O
out	O
of	O
band	O
.	O
</s>
<s>
Certificate	O
,	O
where	O
DTLS	B-General_Concept
is	O
enabled	O
and	O
the	O
device	O
uses	O
X.509	O
certificates	O
for	O
validation	O
.	O
</s>
<s>
Research	O
has	O
been	O
conducted	O
on	O
optimizing	O
DTLS	B-General_Concept
by	O
implementing	O
security	O
associates	O
as	O
CoAP	B-Device
resources	O
rather	O
than	O
using	O
DTLS	B-General_Concept
as	O
a	O
security	O
wrapper	O
for	O
CoAP	B-Device
traffic	O
.	O
</s>
<s>
In	O
addition	O
to	O
DTLS	B-General_Concept
,	O
RFC8613	O
defines	O
the	O
Object	O
Security	O
for	O
Constrained	O
RESTful	B-Protocol
Environments	O
(	O
OSCORE	O
)	O
protocol	O
which	O
provides	O
security	O
for	O
CoAP	B-Device
at	O
the	O
application	O
layer	O
.	O
</s>
