Chapters

 CoAP Module Guide

networking
application-protocols
coap

Start Here: Check One Sleeping Sensor

Picture a battery sensor that wakes, reports one value, accepts one safe change, and sleeps again. This guide helps you trace that small exchange before you add more features.

CoAP means a compact way for devices to ask for or change named resources. A protocol means the shared rules for that exchange. UDP means a small message service that does not create a lasting connection. HTTP means the request-and-reply rules used on the web. An API means the named actions one system offers another. A payload means the useful data inside a message. A broker means a service that routes messages between senders and receivers.

Begin with the device’s need, then check the packet, reply, retry, and security evidence. This page gives you the route; the chapters keep the full technical limits.

Follow Broker Bex through one short exchange with a battery sensor.

  1. Broker Bex watches a small battery sensor transition from sleeping to an active state on the workbench.

    A battery sensor wakes.

  2. Exactly one value token travels outward from the awake battery sensor toward Broker Bex.

    It reports one value.

  3. One change request travels back toward the sensor through a visible permission and security gate.

    It accepts one safe change.

  4. After the short exchange closes, the battery sensor returns to a peaceful low-power sleep while Bex observes.

    Then it goes back to sleep.

A sleeping sensor wakes for one report and one permitted change, then returns to low power.
Broker Bex, your messaging guide

Your guide: Broker Bex

“A message with no subscriber is a tree falling in an empty forest — design the topic before the payload.”

CoAP is the application protocol many constrained IoT systems use when small devices expose resources, exchange compact UDP messages, and need REST-like behavior without HTTP overhead. This module groups the CoAP chapters into a focused book so the protocol can be built, searched, and reviewed as its own route.

Use this book when you need to reason about CoAP as a system design choice for constrained networks. The chapters move from fundamentals and message exchanges through methods, resource API design, Observe, advanced features, security, and implementation labs.

Start With the Device Story

Picture a battery sensor that needs to expose one temperature value, accept one configuration change, and stay asleep as much as possible. CoAP is the route through that design problem: name the resources, choose the message type, decide what must be reliable, then prove the packets, security, cache behavior, and implementation traces.

Use the module as a build sequence, not a glossary. Each chapter answers one question that the tiny device forces on you before the next question makes sense.

Design Questions

  • Which resources should devices expose, and which methods should each resource support?
  • Which exchanges need confirmable delivery, and which can tolerate loss or delay?
  • Does the design need Observe notifications, multicast discovery, block-wise transfer, caching, or proxies?
  • Where is security enforced: DTLS, OSCORE, credentials, gateway policy, or application authorization?
  • What implementation evidence proves the CoAP server, client, and constrained link behave as expected?