Constrained Application Protocol (CoAP) is RESTful, low overhead protocol, specified in RFC 7252 and is designed for Internet of Things. We have listed the protocols in the previously published article – Protocols Related to Internet of Things (IoT); CoAP is really tailored to needs of Internet of Things, keeping the OSI Model as reference. CoAP is an application layer protocol that is intended for use in low power sensors, switches, actuators and similar components that need to be controlled from remote server.
Basics on Constrained Application Protocol (CoAP)
The Internet Engineering Task Force (IETF) Constrained RESTful environments (CoRE) Working Group has done the major standardization work for Constrained Application Protocol (CoAP). In order to make CoAP suitable to Internet of Things and Machine-to-Machine (M2M) devices and applications, various new functionalities have been added. The core of the protocol, as mentioned above is specified in RFC 7252, however the extensions are in stages to be standardized. The interaction model of CoAP is similar to the client-server model of HTTP. However, machine-to-machine interactions typically result in a CoAP implementation acting in both client and server roles. A CoAP request is equivalent to that of HTTP, and is sent by a client to request an action (using a method code) on a resource (identified by a URI) on a server. The server then sends a response with a response code; this response may include a resource representation.Advertisement
Practical Client-Server Software for Using Constrained Application Protocol (CoAP)
CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments. Clients make requests to servers, servers send back responses. Clients may GET, PUT, POST and DELETE resources.Because CoAP is datagram based, it may be used on top of SMS and other packet based communications protocols.Requests and response messages may be marked as
non confirmable. There are several Free software packages available which can use Constrained Application Protocol (CoAP).
Like, Eclipse has Californium Framework :
libcoap is C-Implementation of CoAP :
Python library for CoAP :
Node.js library for CoAP :
Likewise, there is CoAP sample for Arduino :