Welcome to the new edition of IoTFriday at thethings.iO. Some customers and personal friends have asked us here at thethings.iO what is the best Internet of Things communication protocol? The answer is complex, because in reality it truly depends on the uses and needs of the developer. Today I would like to take five minutes and explain how to learn CoAP to everyone out there.
In the video I will explain to the listeners what CoAP is and why someone should use CoAP in their particular hardware.
What is CoAP
CoAP is defined as Contrained Application Protocol, and is a protocol intended to be used in very simple hardware. CoAp enables devices to communicate over the Internet. The protocol is especially targeted for constrained hardware such as 8-bits microcontrollers, low power sensors and similar devices that can’t run on HTTP or TLS. CoAP is a simplification of the HTTP protocol running on UDP, that helps save bandwidth.
The Internet Engineering Task Force Constrained RESTful environments (IETF CoRE) Working Group has done the major standardization work for CoAP. The core of the protocol is specified in RFC 7252, which means that CoAP is still not a standard protocol.
Two new features designed specifically for Internet of Things and M2M are:
Observe at new events happened on sensors or actuators.
Device management and discoverability from external devices.
When to use CoAP
Some of the specific cases in which CoAP are useful are:
Your hardware cannot run HTTP or TLS: If this is the case then running CoAP and DTLS can practically do the same as HTTP. If one is an expert on HTTP APIs, then the migration will be simple. You receive GET for reading and POST, PUT and DELETE for mutations and the security runs on DTLS.
Your hardware uses battery: If this is ones problem then running CoAP will improve the battery performance when compared with HTTP over TCP/IP. UDP saves some bandwidth and makes the protocol more efficient.
A subscription is necessary: If one cannot run MQTT and HTTP polling is impossible then CoAP is a solution
At thethings.iO we provide a CoAP library to connect your hardware at our IoT cloud solution. Make sure to contact us to try thethings.iO CoAP protocol.
Don’t forget to follow us on Twitter and be sure to check out our #IoTFriday blog!