<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ograsl</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ograsl"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/Ograsl"/>
	<updated>2026-09-10T19:42:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1349</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1349"/>
		<updated>2019-04-04T16:36:16Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Security Considerations ==&lt;br /&gt;
&lt;br /&gt;
This section list some possible threats to the protocol. As CoAP realizes a subset of the features of HTTP/1.1, the security considerations in section 15 of RFC2616 are also pertinent to CoAP.&lt;br /&gt;
&lt;br /&gt;
;Parsing the Protocol and Processing URI&#039;s&lt;br /&gt;
&lt;br /&gt;
The URI processing code in CoAP is likely to be a large source of vulnerabilities and should be implemented very carefully. Vulnerabilities include remotely crashing a node and remotely executing arbitrary code. CoAP aims to reduce the risk of these vulnerabilities by reducing parser complexity and moving much of the URI processing to the clients.&lt;br /&gt;
&lt;br /&gt;
;Proxying and Caching&lt;br /&gt;
&lt;br /&gt;
Proxies are man-in-the-middle by their nature. They can break any IPsec or DTLS protection that would otherwise happen between direct CoAP message exchange. Risks include the loss of confidentiality and availability. If the proxies also cache the threat to confidentiality and integrity of request/response data is amplified as CoAP does not implement cache-suppressing Cache-control as in HTTP/1.1.&lt;br /&gt;
For caching implementations any access control considerations also need to be applied to the value in the cache. A caching proxy must not make cache values available to requests that have lesser transport-security properties.&lt;br /&gt;
&lt;br /&gt;
;Risk of Amplification&lt;br /&gt;
&lt;br /&gt;
As CoAP server reply to request packets with response packets that may be significantly larger an attacker can use CoAP nodes to generate more traffic and use them in a denial-of-service(DoS) attack.  Turning a small attack packet into a larger one is called amplification. The attacker wants to overload a victim but is limited in the amount of traffic can use amplification to generate larger amounts. If a node that enables NoSec access becomes available to an attacker it can access victims on the general internet. UDP provides no way to verify the source address given in the request packet and an attacker can place the IP of the victim in the source address of a request packet to generate a larger packet directed at the victim. The risk is reduced however as constrained networks are only able to generate small amounts of traffic. In contrast the network itself with its limited capacity is a viable victim of an amplification attack. Large amplification factors should not be provided if the request is not authenticated. Also the slicing/blocking modes of CoAP [BLOCK] should be used for large resources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;IP Address Spoofing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Cross-Protocol Attacks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Constrained Node Considerations&lt;br /&gt;
&lt;br /&gt;
Keys should be generated externally and added to the device during manufacturing or commissioning. Due to low processing power constrained nodes are susceptible to timing attacks. Cryptographic principles should be implemented with special care as many nodes are installed in exposed environments and have little resistance to tampering. The scope of credentials assigned to them should be considered carefully. A shared key assigned to a group of nodes may make any single node a target for subverting the entire group.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming available for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
* [[CoAP Chat Application for RIOT OS]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* RFC 2616: https://www.ietf.org/rfc/rfc2616.txt&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1348</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1348"/>
		<updated>2019-04-04T16:35:17Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Security Considerations ==&lt;br /&gt;
&lt;br /&gt;
This section list some possible threats to the protocol. As CoAP realizes a subset of the features of HTTP/1.1, the security considerations in section 15 of RFC2616 are also pertinent to CoAP.&lt;br /&gt;
&lt;br /&gt;
;Parsing the Protocol and Processing URI&#039;s&lt;br /&gt;
&lt;br /&gt;
The URI processing code in CoAP is likely to be a large source of vulnerabilities and should be implemented very carefully. Vulnerabilities include remotely crashing a node and remotely executing arbitrary code. CoAP aims to reduce the risk of these vulnerabilities by reducing parser complexity and moving much of the URI processing to the clients.&lt;br /&gt;
&lt;br /&gt;
;Proxying and Caching&lt;br /&gt;
&lt;br /&gt;
Proxies are man-in-the-middle by their nature. They can break any IPsec or DTLS protection that would otherwise happen between direct CoAP message exchange. Risks include the loss of confidentiality and availability. If the proxies also cache the threat to confidentiality and integrity of request/response data is amplified as CoAP does not implement cache-suppressing Cache-control as in HTTP/1.1.&lt;br /&gt;
For caching implementations any access control considerations also need to be applied to the value in the cache. A caching proxy must not make cache values available to requests that have lesser transport-security properties.&lt;br /&gt;
&lt;br /&gt;
;Risk of Amplification&lt;br /&gt;
&lt;br /&gt;
As CoAP server reply to request packets with response packets that may be significantly larger an attacker can use CoAP nodes to generate more traffic and use them in a denial-of-service(DoS) attack.  Turning a small attack packet into a larger one is called amplification. The attacker wants to overload a victim but is limited in the amount of traffic can use amplification to generate larger amounts. If a node that enables NoSec access becomes available to an attacker it can access victims on the general internet. UDP provides no way to verify the source address given in the request packet and an attacker can place the IP of the victim in the source address of a request packet to generate a larger packet directed at the victim. The risk is reduced however as constrained networks are only able to generate small amounts of traffic. In contrast the network itself with its limited capacity is a viable victim of an amplification attack. Large amplification factors should not be provided if the request is not authenticated. Also the slicing/blocking modes of CoAP [BLOCK] should be used for large resources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;IP Address Spoofing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Cross-Protocol Attacks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Constrained Node Considerations&lt;br /&gt;
&lt;br /&gt;
Keys should be generated externally and added to the device during manufacturing or commissioning. Due to low processing power constrained nodes are susceptible to timing attacks. Cryptographic principles should be implemented with special care as many nodes are installed in exposed environments and have little resistance to tampering. The scope of credentials assigned to them should be considered carefully. A shared key assigned to a group of nodes may make any single node a target for subverting the entire group.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming available for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
* [[CoAP Chat Application for RIOT OS]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* RFC 2616: https://www.ietf.org/rfc/rfc2616.txt&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1319</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1319"/>
		<updated>2019-03-18T13:37:57Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming available for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1318</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1318"/>
		<updated>2019-03-15T06:50:15Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1306</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1306"/>
		<updated>2019-03-11T22:59:41Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1305</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1305"/>
		<updated>2019-03-11T22:59:02Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1304</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1304"/>
		<updated>2019-03-11T22:54:30Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* The Protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |      Application     |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 +----------------------+  \&lt;br /&gt;
 |  Requests/Responses  |  |&lt;br /&gt;
 |----------------------|  | CoAP&lt;br /&gt;
 |       Messages       |  |&lt;br /&gt;
 +----------------------+  /&lt;br /&gt;
 +----------------------+&lt;br /&gt;
 |          UDP         |&lt;br /&gt;
 +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1303</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1303"/>
		<updated>2019-03-11T22:54:01Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* The Protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1302</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1302"/>
		<updated>2019-03-11T22:53:46Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms. Implementations for constrained devices are typically written in C. CoAP is also used between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1301</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1301"/>
		<updated>2019-03-11T22:52:48Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1300</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1300"/>
		<updated>2019-03-11T22:52:17Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Constrained Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1299</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1299"/>
		<updated>2019-03-11T22:51:01Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Constrained Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift | Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1298</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1298"/>
		<updated>2019-03-11T22:48:52Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || Client || BSD || https://github.com/mkovatsc/Copper&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || Client ||  MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift | Client + Server || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server ||  MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1297</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1297"/>
		<updated>2019-03-11T22:39:29Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Server-side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
&lt;br /&gt;
CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1296</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1296"/>
		<updated>2019-03-11T22:39:01Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Server-side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
&lt;br /&gt;
CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1295</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1295"/>
		<updated>2019-03-11T22:38:41Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Server-side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
&lt;br /&gt;
CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || RFC 7252 || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || Client + Server || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || Client + Server || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| Waher.Networking.CoAP || C# || Server || || https://github.com/PeterWaher/IoTGateway/tree/master/Networking/Waher.Networking.CoAP&lt;br /&gt;
|-&lt;br /&gt;
| gen_coap || Erlang || Client + Server || MPL v1.1 || https://github.com/gotthardp/gen_coap&lt;br /&gt;
|-&lt;br /&gt;
| go-coap || Go || Client + Server || MIT || https://github.com/go-ocf/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || Client + Server || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| coap-cli || Javascript  || || MIT || https://github.com/mcollina/coap-cli&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || Client + Server || MIT || https://github.com/mwasilak/txThings&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || Client + Server ||  MIT || https://github.com/chrysn/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || Client + Server || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || Client || MIT || https://github.com/nning/coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby david || Ruby || Server || MIT || https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || Client + Server || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1294</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1294"/>
		<updated>2019-03-11T22:18:02Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Constrained Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
&lt;br /&gt;
CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || RFC 7252 || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || RFC 7252 || Client + Server (david) || Core, Observe, Block, RD || MIT, GPL || https://github.com/nning/coap&amp;lt;br/&amp;gt;https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1293</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1293"/>
		<updated>2019-03-11T22:17:19Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Constrained Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || RFC 7252 || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || RFC 7252 || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || RFC 7252 || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || RFC 7252 || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || RFC 7252 || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java || RFC 7252 ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || RFC 7252 || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || RFC 7252 || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
&lt;br /&gt;
CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || RFC 7252 || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || RFC 7252 || Client + Server (david) || Core, Observe, Block, RD || MIT, GPL || https://github.com/nning/coap&amp;lt;br/&amp;gt;https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1292</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1292"/>
		<updated>2019-03-11T22:16:23Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Constrained Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || RFC 7252 || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || RFC 7252 || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || RFC 7252 || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || RFC 7252 || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || RFC 7252 || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java || RFC 7252 ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| Wakaama || C || || Client + Server || EPL+EDL || https://www.eclipse.org/wakaama/index.html&lt;br /&gt;
|-&lt;br /&gt;
| coap-node || Javascript || RFC 7252 || Client || MIT || https://github.com/PeterEB/coap-node&lt;br /&gt;
|-&lt;br /&gt;
| coap-shepherd || Javascript || RFC 7252 || Server || MIT || https://github.com/PeterEB/coap-shepherd&lt;br /&gt;
&lt;br /&gt;
=== Server-side ===&lt;br /&gt;
&lt;br /&gt;
CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| leshan || Java || RFC 7252 || Client + Server || EPL+EDL || https://github.com/eclipse/leshan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || RFC 7252 || Client + Server (david) || Core, Observe, Block, RD || MIT, GPL || https://github.com/nning/coap&amp;lt;br/&amp;gt;https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1291</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1291"/>
		<updated>2019-03-11T20:50:29Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
Generic implementations are becoming availible for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || 3-clause BSD || http://www.contiki-os.org/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || RFC 7252 || Client + Server || BSD/GPL || https://libcoap.net/&lt;br /&gt;
|-&lt;br /&gt;
| Eclipse tinydtls || C || Client + Server || EPL+EDL || https://projects.eclipse.org/projects/iot.tinydtls&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci || C || RFC 7252 || Client + Server || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| microcoap || C || RFC 7252 || Client + Server || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Lobaro CoAP || C || RFC 7252 || Client + Server || MIT || https://www.lobaro.com/portfolio/lobaro-coap/&lt;br /&gt;
|-&lt;br /&gt;
| MR-CoAP || Java || RFC 7252 ||     || BSD || https://github.com/MR-CoAP/CoAP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server ||  MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || RFC 7252 || Client + Server (david) || Core, Observe, Block, RD || MIT, GPL || https://github.com/nning/coap&amp;lt;br/&amp;gt;https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1290</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1290"/>
		<updated>2019-03-11T19:07:08Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Implementations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
=== Constrained Devices ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! Implemented CoAP features !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers, DTLS || BSD/GPL || https://github.com/obgm/libcoap&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci ||  C || RFC 7252 || Client + Server ||   Core, Observe, Block, DTLS || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
| microcoap ||  C || RFC 7252 || Client + Server ||  || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || RFC 7252 || Client + Server (david) || Core, Observe, Block, RD || MIT, GPL || https://github.com/nning/coap&amp;lt;br/&amp;gt;https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1289</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1289"/>
		<updated>2019-03-11T18:38:58Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Programming Language !! Implemented CoAP version !! Client/Server !! Implemented CoAP features !! License !! Link&lt;br /&gt;
|-&lt;br /&gt;
| aiocoap || Python 3 || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://pypi.python.org/pypi/aiocoap&lt;br /&gt;
|-&lt;br /&gt;
| Californium || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, DTLS || EPL+EDL || https://www.eclipse.org/californium&lt;br /&gt;
|-&lt;br /&gt;
| cantcoap ||  C++/C || RFC 7252 || Client + Server ||  || BSD || https://github.com/staropram/cantcoap&lt;br /&gt;
|-&lt;br /&gt;
| Canopus ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core || Apache License 2.0 || https://github.com/zubairhamed/canopus&lt;br /&gt;
|-&lt;br /&gt;
| CoAP implementation for Go ||  [[Go (programming language)|Go]] || RFC 7252 || Client + Server || Core + Draft Subscribe || MIT || https://github.com/dustin/go-coap&lt;br /&gt;
|-&lt;br /&gt;
| CoAP.NET || C# || RFC 7252, coap-13, coap-08, coap-03 || Client + Server || Core, Observe, Blockwise Transfers || 3-clause BSD || https://github.com/smeshlink/CoAP.NET&lt;br /&gt;
|-&lt;br /&gt;
| CoAPSharp ||  C#, .NET || RFC 7252 || Client + Server || Core, Observe, Block, RD || LGPL || http://www.coapsharp.com&lt;br /&gt;
|-&lt;br /&gt;
| CoAPthon || Python || RFC 7252 || Client + Server + Forward Proxy + Reverse Proxy || Observe, Multicast server discovery, CoRE Link Format parsing, Block-wise || MIT || https://github.com/Tanganelli/CoAPthon&lt;br /&gt;
|-&lt;br /&gt;
| CoAP Shell || Java || RFC 7252 || Client || Observe, Blockwise Transfers, DTLS || Apache License 2.0 || https://github.com/tzolov/coap-shell &lt;br /&gt;
|-&lt;br /&gt;
| Copper || JavaScript (Browser Plugin) || RFC 7252 || Client || Observe, Blockwise Transfers || 3-clause BSD || https://github.com/mkovatsc/Copper https://addons.mozilla.org/firefox/addon/copper-270430/&lt;br /&gt;
|-&lt;br /&gt;
| eCoAP || C || RFC 7252 || Client + Server || Core || MIT || https://gitlab.com/jobol/ecoap&lt;br /&gt;
|-&lt;br /&gt;
| Erbium for Contiki || C || RFC 7252 || Client + Server || Observe, Blockwise Transfers || 3-clause BSD || http://www.contiki-os.org/ (er-rest-example)&lt;br /&gt;
|-&lt;br /&gt;
| iCoAP || Objective-C || RFC 7252 || Client || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/iCoAP&lt;br /&gt;
|-&lt;br /&gt;
| jCoAP || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers || Apache License 2.0 || https://code.google.com/p/jcoap/&lt;br /&gt;
|-&lt;br /&gt;
| libcoap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers, DTLS || BSD/GPL || https://github.com/obgm/libcoap&lt;br /&gt;
|-&lt;br /&gt;
| LibNyoci ||  C || RFC 7252 || Client + Server ||   Core, Observe, Block, DTLS || MIT || https://github.com/darconeous/libnyoci&lt;br /&gt;
|-&lt;br /&gt;
| lobaro-coap || C || RFC 7252 || Client + Server ||Observe, Blockwise Transfers || MIT || http://www.lobaro.com/lobaro-coap&lt;br /&gt;
|-&lt;br /&gt;
| microcoap ||  C || RFC 7252 || Client + Server ||  || MIT || https://github.com/1248/microcoap&lt;br /&gt;
|-&lt;br /&gt;
| nCoap || Java || RFC 7252 || Client + Server || Observe, Blockwise Transfers, CoRE Link Format, [https://tools.ietf.org/html/draft-kleine-core-coap-endpoint-id-01 Endpoint-ID-Draft] || BSD || https://github.com/okleine/nCoAP&lt;br /&gt;
|-&lt;br /&gt;
| node-coap || Javascript || RFC 7252 || Client + Server || Core, Observe, Block || MIT || https://github.com/mcollina/node-coap&lt;br /&gt;
|-&lt;br /&gt;
| Ruby coap || Ruby || RFC 7252 || Client + Server (david) || Core, Observe, Block, RD || MIT, GPL || https://github.com/nning/coap&amp;lt;br/&amp;gt;https://github.com/nning/david&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode C Device Library ||  C || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode Java Device Library ||  Java SE || RFC 7252 || Client + Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| Sensinode NanoService Platform ||  Java SE || RFC 7252 || Cloud Server || Core, Observe, Block, RD || Commercial || https://silver.arm.com/browse/SEN00&lt;br /&gt;
|-&lt;br /&gt;
| SwiftCoAP || Swift || RFC 7252 || Client + Server || Core, Observe, Blockwise Transfers || MIT || https://github.com/stuffrabbit/SwiftCoAP&lt;br /&gt;
|-&lt;br /&gt;
| TinyOS CoapBlip || nesC/C || coap-13 || Client + Server || Observe, Blockwise Transfers || BSD || http://docs.tinyos.net/tinywiki/index.php/CoAP&lt;br /&gt;
|-&lt;br /&gt;
| txThings || Python (Twisted) || RFC 7252 || Client + Server || Blockwise Transfers, Observe (partial) || MIT || https://github.com/mwasilak/txThings/&lt;br /&gt;
|-&lt;br /&gt;
| FreeCoAP || C || RFC 7252 || Client + Server + HTTP/CoAP Proxy ||Core, DTLS, Blockwise Transfers || BSD || https://github.com/keith-cullen/FreeCoAP&lt;br /&gt;
|-&lt;br /&gt;
| coap-rs || Rust || RFC 7252 || Client + Server || || MIT || https://github.com/Covertness/coap-rs&lt;br /&gt;
|-&lt;br /&gt;
|YaCoAP&lt;br /&gt;
|C&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|MIT&lt;br /&gt;
|https://github.com/RIOT-Makers/YaCoAP&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1288</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1288"/>
		<updated>2019-03-11T18:35:43Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Message Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
;Version (Ver) (2 bits)&lt;br /&gt;
:Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
;Type (T) (2 bits)&lt;br /&gt;
:Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
;Token Length (TKL) (4 bits)&lt;br /&gt;
:Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
;CoAP Request/Response Code (8 bits)&lt;br /&gt;
:Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
;Message ID (16 bits)&lt;br /&gt;
:Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1280</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1280"/>
		<updated>2019-03-11T14:28:46Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* The Protocol */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |      Application     |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              +----------------------+  \&lt;br /&gt;
              |  Requests/Responses  |  |&lt;br /&gt;
              |----------------------|  | CoAP&lt;br /&gt;
              |       Messages       |  |&lt;br /&gt;
              +----------------------+  /&lt;br /&gt;
              +----------------------+&lt;br /&gt;
              |          UDP         |&lt;br /&gt;
              +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version (Ver) (2 bits)&#039;&#039;&#039; Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Type (T) (2 bits)&#039;&#039;&#039; Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Token Length (TKL) (4 bits)&#039;&#039;&#039; Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CoAP Request/Response Code (8 bits)&#039;&#039;&#039; Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Message ID (16 bits)&#039;&#039;&#039; Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1279</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1279"/>
		<updated>2019-03-11T14:27:53Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Message Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |      Application     |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        +----------------------+  \&lt;br /&gt;
                        |  Requests/Responses  |  |&lt;br /&gt;
                        |----------------------|  | CoAP&lt;br /&gt;
                        |       Messages       |  |&lt;br /&gt;
                        +----------------------+  /&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |          UDP         |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sequence of zero or more CoAP Options in Type-Length-Value (TLV) format, optionally followed by a payload that takes up the rest of the datagram.&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version (Ver) (2 bits)&#039;&#039;&#039; Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Type (T) (2 bits)&#039;&#039;&#039; Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Token Length (TKL) (4 bits)&#039;&#039;&#039; Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CoAP Request/Response Code (8 bits)&#039;&#039;&#039; Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Message ID (16 bits)&#039;&#039;&#039; Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1278</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1278"/>
		<updated>2019-03-11T14:13:10Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Message Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |      Application     |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        +----------------------+  \&lt;br /&gt;
                        |  Requests/Responses  |  |&lt;br /&gt;
                        |----------------------|  | CoAP&lt;br /&gt;
                        |       Messages       |  |&lt;br /&gt;
                        +----------------------+  /&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |          UDP         |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sqeu&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version (Ver) (2 bits)&#039;&#039;&#039; Indicates the CoAP Version number. This must set this field to 1 (binary 01). Other values are reserved for future versions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Type (T) (2 bits)&#039;&#039;&#039; Indicates if this message is of type Confirmable (0), Non-confirmable (1), Acknowledgement (2), or Reset (3).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Token Length (TKL) (4 bits)&#039;&#039;&#039; Indicates the length of the variable-length Token field, which may be 0-8 bytes in length.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CoAP Request/Response Code (8 bits)&#039;&#039;&#039; Splits into a 3-bit class and 5-bit detail.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Message ID (16 bits)&#039;&#039;&#039; Used to detect message duplication and to match messages of type Acknowledgement/Reset to messages of type Confirmable/Non-confirmable.&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1277</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1277"/>
		<updated>2019-03-11T13:41:48Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: /* Message Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |      Application     |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        +----------------------+  \&lt;br /&gt;
                        |  Requests/Responses  |  |&lt;br /&gt;
                        |----------------------|  | CoAP&lt;br /&gt;
                        |       Messages       |  |&lt;br /&gt;
                        +----------------------+  /&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |          UDP         |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The message format starts with a fixed-size 4-byte header, followed by a variable-length Token value, which can be between 0 and 8 bytes long. Following the Token value comes a sqeu&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Version (Ver) (2 bits)&#039;&#039;&#039;&lt;br /&gt;
   Indicates the CoAP Version number&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1276</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1276"/>
		<updated>2019-03-11T13:38:21Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
CoAP is similar to the client/server model of HTTP. M2M interactions typically result in a CoAP implementation acting in both client and server roles. A request is sent by a client to request an action on a resource (identified by a URI) on a server. The server then sends a response with a response code (equivalent to that of HTTP). Therefore, efficiency is very important, so CoAP uses UDP, a datagram-oriented transport.&lt;br /&gt;
&lt;br /&gt;
CoAP is however a single protocol, with messaging and request/response as just features of the CoAP header&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |      Application     |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        +----------------------+  \&lt;br /&gt;
                        |  Requests/Responses  |  |&lt;br /&gt;
                        |----------------------|  | CoAP&lt;br /&gt;
                        |       Messages       |  |&lt;br /&gt;
                        +----------------------+  /&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
                        |          UDP         |&lt;br /&gt;
                        +----------------------+&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Message Format ==&lt;br /&gt;
&lt;br /&gt;
By default, the messages are encoded in a simple binary format and transported over UDP. The messages are encoded in a simple binary format&lt;br /&gt;
&lt;br /&gt;
    0                   1                   2                   3&lt;br /&gt;
    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&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |Ver| T |  TKL  |      Code     |          Message ID           |&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Token (if any, TKL bytes) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |   Options (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
   |1 1 1 1 1 1 1 1|    Payload (if any) ...&lt;br /&gt;
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1275</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1275"/>
		<updated>2019-03-11T13:10:34Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== The Protocol ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Abstract_Layering_of_CoAP.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Abstract_Layering_of_CoAP.JPG&amp;diff=1274</id>
		<title>File:Abstract Layering of CoAP.JPG</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Abstract_Layering_of_CoAP.JPG&amp;diff=1274"/>
		<updated>2019-03-11T13:09:29Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1273</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1273"/>
		<updated>2019-03-11T13:00:39Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol, as defined in RFC 7252, for use with constrained nodes and constrained networks in the Internet of Things.&lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
The work on Constrained Environments aims at realizing the REST architecture in a suitable form for the most constrained nodes and networks. The nodes usually consist of 8-bit microcontrollers with limited amounts of RAM and ROM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CoAP has the following main features:&lt;br /&gt;
&lt;br /&gt;
* Web protocol fulfilling M2M requirements in constrained environments&lt;br /&gt;
* UDP [RFC0768] binding with optional reliability supporting unicast and multicast requests&lt;br /&gt;
* Asynchronous message exchanges&lt;br /&gt;
* Low header overhead and parsing complexity&lt;br /&gt;
* URI and Content-type support&lt;br /&gt;
* Simple proxy and caching capabilities&lt;br /&gt;
* Stateless HTTP mapping&lt;br /&gt;
* Security binding to Datagram Transport Layer Security (DTLS)&lt;br /&gt;
&lt;br /&gt;
== Message Formats ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1272</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1272"/>
		<updated>2019-03-11T12:20:11Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) is a specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things. &lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Das &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) ist ein spezielles Übertragungsprotokoll zur Verwendung auf Constrained-Nodes und Constrained-Devices im Internet der Dinge (engl. Internet of Things, IoT) . Das Protokoll ist für Maschine-to-Maschine- (M2M) Anwendungen wie intelligente Energie- und Gebäudeautomation ausgelegt und im RFC 7252 dolumentiert. Wie auch HTTP, basiert CoAP auf Representational State Transfer (REST), dem Architekturmodell für Webservices, bei dem Ressourcen von Servern durch einen Anwendungsprozess kontrolliert und über die Uniform Resource Identifiers (URI) identifiziert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1271</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1271"/>
		<updated>2019-03-11T12:19:35Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things. &lt;br /&gt;
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Das &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) ist ein spezielles Übertragungsprotokoll zur Verwendung auf Constrained-Nodes und Constrained-Devices im Internet der Dinge (engl. Internet of Things, IoT) . Das Protokoll ist für Maschine-to-Maschine- (M2M) Anwendungen wie intelligente Energie- und Gebäudeautomation ausgelegt und im RFC 7252 dolumentiert. Wie auch HTTP, basiert CoAP auf Representational State Transfer (REST), dem Architekturmodell für Webservices, bei dem Ressourcen von Servern durch einen Anwendungsprozess kontrolliert und über die Uniform Resource Identifiers (URI) identifiziert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Courses ==&lt;br /&gt;
&lt;br /&gt;
* [[Vertiefendes Wahlfach-Projekt]] (2018)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* RFC 7252: https://tools.ietf.org/html/rfc7252&lt;br /&gt;
* CoAP: RFC 7252 Constrained Application Protocol https://coap.technology/&lt;br /&gt;
* Learning Internet of Things: https://www.oreilly.com/library/view/learning-internet-of/9781783553532/&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1270</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1270"/>
		<updated>2019-03-11T10:01:33Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Das &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) ist ein spezielles Übertragungsprotokoll zur Verwendung auf Constrained-Nodes und Constrained-Devices im Internet der Dinge (engl. Internet of Things, IoT) . Das Protokoll ist für Maschine-to-Maschine- (M2M) Anwendungen wie intelligente Energie- und Gebäudeautomation ausgelegt und im RFC 7252 dolumentiert. Wie auch HTTP, basiert CoAP auf Representational State Transfer (REST), dem Architekturmodell für Webservices, bei dem Ressourcen von Servern durch einen Anwendungsprozess kontrolliert und über die Uniform Resource Identifiers (URI) identifiziert werden.&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1269</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1269"/>
		<updated>2019-03-11T10:01:21Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Das &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) ist ein spezielles Übertragungsprotokoll zur Verwendung auf Constrained-Nodes und Constrained-Devices im Internet der Dinge (engl. Internet of Things, IoT) . Das Protokoll ist für Maschine-to-Maschine- (M2M) Anwendungen wie intelligente Energie- und Gebäudeautomation ausgelegt und im RFD 7252 dolumentiert. Wie auch HTTP, basiert CoAP auf Representational State Transfer (REST), dem Architekturmodell für Webservices, bei dem Ressourcen von Servern durch einen Anwendungsprozess kontrolliert und über die Uniform Resource Identifiers (URI) identifiziert werden.&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1268</id>
		<title>Constrained Application Protocol</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Constrained_Application_Protocol&amp;diff=1268"/>
		<updated>2019-03-11T09:54:09Z</updated>

		<summary type="html">&lt;p&gt;Ograsl: Created page with &amp;quot;Das &amp;#039;&amp;#039;&amp;#039;Constrained Application Protocol&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;CoAP&amp;#039;&amp;#039;&amp;#039;) ist ein spezielles Übertrangungsprotokoll zur Verwendung auf constrained (engl. &amp;quot;eingeschränkt&amp;quot;)&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Das &#039;&#039;&#039;Constrained Application Protocol&#039;&#039;&#039; (&#039;&#039;&#039;CoAP&#039;&#039;&#039;) ist ein spezielles Übertrangungsprotokoll zur Verwendung auf constrained (engl. &amp;quot;eingeschränkt&amp;quot;)&lt;/div&gt;</summary>
		<author><name>Ograsl</name></author>
	</entry>
</feed>