CoAP - Constrained Application Protocol
What Is CoAP?
Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained networks in the Internet of Things. CoAP is designed to enable simple, constrained devices to join the IoT even through constrained networks with low bandwidth and low availability. It is generally used for machine-to-machine (M2M) applications such as smart energy and building automation. The protocol was designed by the Internet Engineering Task Force (IETF), CoAP is specified in IETF RFC 7252.
Web Protocol Used in M2M With Constrained Requirements
Asynchronous Message Exchange
Very Simple To Perform Syntactic Analysis
(URI) Uniform Resource Identifier
Proxy and Caching Capabilities
How Does CoAP Function?
CoAP functions as a sort of HTTP for restricted devices, enabling equipment such as sensors or actuators to communicate on the IoT. These sensors and actuators are controlled and contribute by passing along their data as part of a system. The protocol is designed for reliability in low bandwidth and high congestion through its low power consumption and low network overhead. In a network with a lot of congestion or limited connectivity, CoAP can continue to work where TCP-based protocols such as MQTT fail to exchange information and communicate effectively.
Additionally, the effective and conventional CoAP features enable devices operating in poor signal quality to send their data reliably or enable an orbiting satellite to maintain its distant communication successfully. CoAP’s also supports networks with billions of nodes. For security, the DTLS parameters chosen for default are an equivalent to 128 bit RSA keys.
COAP uses UDP as the underlying network protocol. COAP is basically a client-server IoT protocol where the client makes a request and the server sends back a response as it happens in HTTP. The methods used by COAP are the same used by HTTP.
One must take security into account when dealing with IoT protocols. For example, CoAP uses UDP to transport information. CoAP relies on UDP security features to protect information. As HTTP uses TLS over TCP, CoAP uses Datagram TLS over UDP. DTLS supports RSA, AES, and so on.
The smallest CoAP message is 4 bytes in length, if omitting Token, Options and Payload. CoAP makes use of two message types, requests and responses, using a simple, binary, base header format. The base header may be followed by options in an optimized Type-Length-Value format. CoAP is by default bound to UDP and optionally to DTLS, providing a high level of communications security.
Any bytes after the headers in the packet are considered the message body. The length of the message body is implied by the datagram length. The entire message must fit within a single datagram when bound to UDP. When used with 6LoWPAN, as defined in RFC 4944, messages SHOULD also fit into a single IEEE 802.15.4 frame to minimize fragmentation.
Radiocrafts’ RF Modules Supporting CoAP
Radiocrafts’ RC1882CEF-IPM RIIM Module has support for CoAP. RIIM™ (Radiocrafts Industrial IP Mesh) is an embedded RF system designed to be an all-inclusive, easy to use mesh, with direct IP addressing. The RF protocol is the IEEE802.15.4 g/e standard. RIIM™ includes an Intelligent C-programmable I/O (ICI), which makes it possible to directly interface to any sensor or actuator, and, it supports Mist Computing. RIIM™ does not require any license or subscription fee. Read more about RIIM here.