Physics Wallah

FULL FORM OF CoAP, Working, Features, Security, CoAP Group Communication

authorImageGirijesh Singh7 Nov, 2023
CoAP

The full form of CoAP is a Constrained Application Protocol. It basically refers to a special transfer protocol for constrained devices.  According to RFC 7252, it allows constrained devices, also known as “nodes” to communicate with the wider internet. 

Broadly, CoAP is an application layer which translates HTTP and allows a simplified integration with the web. It also meets other specialized tasks like multicast support, simplicity and very low overhead. 

CoAP can run on any device which supports UDP. Nowadays, CoAP is used by other mechanisms as well; SMS for example. 

Working of CoAP

Put simply, CoAP is basically a client-server protocol for the IoT (Internet of Things). Here, the client makes a request, which is then sent to the server. Consequently, the server sends back an appropriate response. It works exactly like HTTP. Thus, CoAP is kind of like HTTP for constrained devices, as it allows devices like sensors and actuators to exchange information over the web or IoT. 

Moreover, information over the CoAP is transmitted while maintaining high security and reliability. It uses the highest grade security, i.e, DTLS security parameters. 

Features of CoAP

  • This protocol works extremely well in lower bandwidth. Successful communication over the IoT demands billions of nodes at a time. With its lower power consumption and low network overhead, it can run smoothly through such high congestion. 
  • CoAP has the ability to continue working even when TCP-based protocols like MQTT fail to communicate. In fact, it allows devices working with a poor signal to send their messages reliably. It can also enable an orbiting satellite to maintain successful distant communication.
  • CoAP works seamlessly with data formats like JSON, XML and more. Moreover, using cross-protocol proxies one can easily pair CoAP with various kinds of applications
  • It has the ability to work with several microcontrollers while using the least possible resources. In fact, RAM space as low as 10 KB and code space as low as 100 KB is more than enough to run CoAP seamlessly. 
  • As the CoAP demands minimum resources, it keeps wastage under control. For instance, the header and encoding used for messaging are efficient and compact. Thus, fragments on the link layer are successfully avoided. 

Security in CoAP

CoAP follows the REST principles and uses UDP to transmit messages. For security, it relies on DTLS parameters While HTTP employs TLS over TCP, CoAP employs Datagram TLS over TCP. 

Layers in CoAP

The CoAP utilizes two kinds of layers, namely,

  • CoAP Message Model
  • CoAP Request/Response Model

Let's dive deeper into these two layers used by this protocol,

  1. Message Model:

This layer consists of 3 key components: binary header, computer option and payload. 

This layer makes use of UDP and transmits messages in CON (Confirmable) and NON (Non Confirmable format). Each message is associated with a unique and distinct ID to avoid the problem of duplicate messages. 

  1. Request/Response Model:

The request/response model handles CON and NON-message requests. These are the following cases you can come across,

  • If the server is idle, your request will be processed immediately. In the case of a CON, the server responds with an acknowledgement code (ACK). 
  • In case there is a delay, ACK is still sent right away, however as an empty text. When its turn arrives, that is when the request is processed. The client receives a brand new CON. 

 CoAP Group Communication

With the rising importance of CoAP in communication and information, it has become crucial to enable group communication with this protocol. This means, multiple CoAP resources will be addressed at once (as a group), and not as individual units. 

For this purpose, an experimental extension for CoAP has been developed. Known as the RFC 7390 (Group Communication for CoAP), it utilizes multicast to transmit messages and requests to every CoAP. While this reduces the time and resources used, multicast is often unreliable. 

There is also an alternative to this, where instead of multicasts, unicasts operate the group communication. This is achieved by involving an intermediary. Clients send in group requests to the intermediaries. Next up, the intermediary utilizes unicast and sends the request to individual resources. Once all replies are collected, they are provided to the client in the form of an aggregate response. When compared to the multicast method(which is cache-unfriendly) the unicast is much more reliable and hassle-free. 

[wp-faq-schema title=" FULL FORM OF CoAP FAQs" accordion=1]

What is the architecture of CoAP?

CoAP follows a client/server architecture, similar to that followed by HTTP.

What devices operate on CoAP?

CoAP has been created for constrained devices. This includes sensors, actuators, microcontrollers, and smart devices. 

Is CoAP based on the REST Model?

Yes, CoAP is based on the REST Model.

What is the smallest length of a CoAP message?

The smallest length of the CoAP message is 4 bytes. 
Join 15 Million students on the app today!
Point IconLive & recorded classes available at ease
Point IconDashboard for progress tracking
Point IconMillions of practice questions at your fingertips
Download ButtonDownload Button
Banner Image
Banner Image
Free Learning Resources
Know about Physics Wallah
Physics Wallah is an Indian edtech platform that provides accessible & comprehensive learning experiences to students from Class 6th to postgraduate level. We also provide extensive NCERT solutions, sample paper, NEET, JEE Mains, BITSAT previous year papers & more such resources to students. Physics Wallah also caters to over 3.5 million registered students and over 78 lakh+ Youtube subscribers with 4.8 rating on its app.
We Stand Out because
We provide students with intensive courses with India’s qualified & experienced faculties & mentors. PW strives to make the learning experience comprehensive and accessible for students of all sections of society. We believe in empowering every single student who couldn't dream of a good career in engineering and medical field earlier.
Our Key Focus Areas
Physics Wallah's main focus is to make the learning experience as economical as possible for all students. With our affordable courses like Lakshya, Udaan and Arjuna and many others, we have been able to provide a platform for lakhs of aspirants. From providing Chemistry, Maths, Physics formula to giving e-books of eminent authors like RD Sharma, RS Aggarwal and Lakhmir Singh, PW focuses on every single student's need for preparation.
What Makes Us Different
Physics Wallah strives to develop a comprehensive pedagogical structure for students, where they get a state-of-the-art learning experience with study material and resources. Apart from catering students preparing for JEE Mains and NEET, PW also provides study material for each state board like Uttar Pradesh, Bihar, and others

Copyright © 2026 Physicswallah Limited All rights reserved.