CoAP Protocol: Definition, Architecture 📌

A Quick Overview

  1. Acknowledgments confirm the completion or failure of an event.
  2. Confirmable are the messages that are resent on time out until the confirmation of successful sending doesn’t arrive.
  3. Reset messages are empty, with confirmable as their nature.
  4. Non-confirmable information is just sent and has no guarantee of successful delivery. There is no acknowledgment of success either.
  • Works for devices in the same network types.
  • Enables data transmission, to and fro, for the general internet-enabled nodes and network-connected devices.
  • Works really fine for SMSs shared over mobile network connectivity.
  • Suitable for internet-operative applications that use connected devices/sensors and have resource limitations.
  • Capable of translating HTTP, supports multicast, and exerts the bare minimum cost burden.
  • Only helps machines to communicate (in the network).

CoAP Architecture

  • Endpoints are the nodes that host have knowledge of;
  • Client sends requests and replies to incoming requests;
  • Server gets and forwards requests. It also gets and forwards the messages received in response to the requests it had processed.
  • Sender creates and sends the original message.
  • Recipient gets the information sent by the client or forwarded by the server.

CoAP Function

CoAP Features

CoAP Layer

  1. CoAP Messages Model
  1. If idle, the server will handle the request right away. If a CON, the client will get an ACK for it. If the ACK is shared as a Token and differs from the ID, it is essential to map it properly by matching request-response pairs.
  2. If there is a delay or wait involved, the ACK is sent but as an empty text. When its turn arrives, the request is processed and the client gets a fresh CON.
  • Request or response codes for CoAP are same as for the HTTP, except for the fact that they are in the binary format (0–8 byte Tokens) in CoAP’s case.
  • Request methods for making calls (GET, PUT, POST, and DELETE) are declared in the process.
  • A CON response could either be stored in an ACK message or forward as CON/NON.


REST Protocol and CoAP




CEO at Wallarm. Application security platform to prevent threats and discover vulnerabilities in a real-time.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

10 Linux Commands that will Increase your Efficiency at Work

Where is Agile Going?

On writing clean code … for combat

The How To Of Port Forwarding With SSH

Design Patterns in Java

Web Appsec — Part 1 — Same Origin Policy

Advanced EOS Series — Part 6 —Contract-to-Contract Communication

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ivan Novikov

Ivan Novikov

CEO at Wallarm. Application security platform to prevent threats and discover vulnerabilities in a real-time.

More from Medium

Bypassing IP Based Blocking with IP Rotate Burp Extension.

Clone and backup with GParted

Android Static analysis- How to pull APK?

Integrating Huawei Mobile Service with Android Studio Arctic Fox 2020.3.1 Patch 4 with HMS Toolkits