I am happy to introduce the new QtCoAP library! It is the client-side implementation of the Constrained Application Protocol (CoAP) for the Internet of Things. The library provides quick and easy way of using the CoAP protocol in your cross-platform Qt applications. Big thanks to our partners at Witekio for development and contribution of the main functionality! As it has been announced earlier, QtCoAP will be available in the new Qt 5.13 release as a part of our Qt for Automation offering, together with other IoT protocol implementations, such as MQTT, KNX and OPC UA.
What is CoAP?
CoAP was designed as a lightweight machine-to-machine (M2M) communication protocol that can run on devices with scarce memory and computing resources. It is based on the concept of RESTful APIs and is very similar to HTTP. CoAP has a client-server architecture and uses GET, POST, PUT and DELETE requests for interaction with the data. But unlike HTTP, it uses the lightweight UDP for the transport instead of TCP. Additionally, it supports some interesting features like multicast requests, resource discovery and observation.
Thanks to the low overhead and simplicity, CoAP has become one of the popular IoT protocols to be used on the embedded devices. It acts as a sort of HTTP for the embedded world.
Overview of Qt CoAP Implementation
QtCoAP supports the following functionality:
Group communication (multicast)
The library is really simple to use. You just need to create an instance of QCoapClient and connect its signals: