New Kid on the Embedded IoT Protocols Block: CoAP
by Exosite, on April 28, 2016
Selecting the right embedded protocol is an essential part of an organization's strategy when developing an IoT connected device; each protocol has unique benefits and drawbacks. In past blog segments of our Embedded IoT Protocols white paper, we have covered several protocols including: UDP, TCP, HTTP, XMPP, and MQTT. In this week's IoT protocols post, we will be covering key features of one of the new protocols to hit the IoT scene: CoAP.
CoAP is a new protocol that was recently finalized by the Internet Engineering Task Force in memo RFC 7252. CoAP was designed for use with resource-constrained embedded devices, both in terms of computation and connectivity, while remaining very extensible. It was also designed specifically to accommodate problems that are likely to be encountered in a global IoT device fleet deployment.
CoAP's semantics were designed to closely model those of HTTP, so developers that are already experienced with HTTP can get up to speed quickly.
Unlike HTTP, CoAP is a binary protocol, which reduces its data overhead, increases its flexibility in communication models using UDP, and reduces latencies.
Using HTTP semantics on top of CoAP's UDP enables a device to more easily use the same protocol code to talk to the cloud and other devices on the local network.
Embedded Device's Power Consumption
The use of UDP over TCP relinquishes the need for a device to keep a connection established, allowing it to sleep until a report is needed while retaining reliability.
The extensibility of CoAP provides the ability to flexibly update the format of the data a device uses to communicate, which can be critical to businesses that already have an IoT deployment.
UDP over TCP
UDP does not have the same guarantees that TCP supplies and CoAP has to take on features necessary for its specific needs.
Lack of Security Support
Without TCP the standard Transport Layer Security (TLS) cannot be used to secure communication and Datagram Transport Layer Security (DTLS) must be used in its place. Because of its age, DTLS support is limited in the amount of existing support.
Existing Libraries and Solution Support
As is with DTLS, CoAP suffers from a lack of existing libraries and IoT solution support when compared to some of the more traditional protocols.
For complete descriptions of the benefits and drawbacks of CoAP, download the full Embedded IoT Protocols white paper and contact us to kick-start your IoT solution today.