Connectivity
CoAP
CoAP (Constrained Application Protocol) is a REST-like web protocol over UDP for highly constrained devices, defined in IETF RFC 7252.
CoAPProtocolCoAPCoAP (RFC 7252) brings GET/POST/PUT/DELETE to devices with 8 KB of RAM over UDP. How Observe and DTLS work, and when to pick it over MQTT.View profile (Constrained Application Protocol) is an IETF web protocol for devices with little memory and power that work on lossy networks. Defined in RFC 7252, it follows the REST model of HTTP (resources, URIs and the methods GET, POST, PUT and DELETE), but it runs over UDP and keeps messages small with a 4-byte fixed header.
How CoAP works
A CoAP client sends a request to a resource on a server, identified by a URI such as coap://sensor.local/temperature, and gets back a response code such as 2.05 (Content) or 4.04 (Not Found). The default port is UDP 5683; the secure variant, coaps, uses DTLS on port 5684. Other concepts worth knowing:
- Message types: a Confirmable (CON) message is retransmitted with exponential back-off until the receiver returns an Acknowledgement (ACK); a Non-confirmable (NON) message is sent once.
- Observe (RFC 7641): the client registers with a resource and the server sends a notification each time it changes, so the client doesn't have to poll.
- Block-wise transfer (RFC 7959): large payloads travel in blocks across several request/response pairs.
- Discovery: a GET to /.well-known/core returns the list of resources a device offers.
- Proxies can translate between CoAP and HTTP, and CoAP supports multicast requests.
RFC 8323 (2018) defines CoAP over TCP, TLS and WebSockets for environments that need a reliable transport. The LwM2M device management standard from OMA SpecWorks is also built on CoAP.
CoAP vs MQTT
- Model: CoAP is request/response between a client and a server, with Observe for updates; MQTT
ProtocolMQTTThe standard pub/sub protocol of IoTView profile is publish/subscribe through a broker.
- Transport: CoAP runs over UDP (and over TCP with RFC 8323); MQTT needs an ordered, lossless connection, normally TCP.
- Reliability: CoAP retransmits confirmable messages; MQTT uses QoSMTermMQTT QoSMQTT QoS (Quality of Service) defines a message's delivery guarantee at three levels: 0 (at most once), 1 (at least once) and 2 (exactly once).View profile levels 0, 1 and 2 on each hop.
- Security: CoAP uses DTLS (coaps, port 5684); MQTT uses TLS, usually on port 8883.
CoAP fits constrained nodes on low-power, lossy networks, and RFC 7252 names smart energy and building automation as example applications. MQTT fits cases where many devices feed many applications through a central broker. Our comparison of MQTT, CoAP and HTTP goes into more detail.
Frequently asked questions
What is CoAP used for?+
For communication with constrained devices on low-power networks. RFC 7252 cites smart energy and building automation, and the LwM2M standard from OMA SpecWorks uses CoAP for device management.
What is the difference between CoAP and MQTT?+
CoAP follows the request/response model of HTTP over UDP, with no broker in between. MQTT is publish/subscribe over TCP, with a broker that distributes the messages. CoAP suits very constrained nodes; MQTT suits many producers and consumers sharing data.
Does CoAP use UDP or TCP?+
UDP by default, on port 5683 (5684 for coaps, secured with DTLS). RFC 8323 adds CoAP over TCP, TLS and WebSockets.
Related terms
Related articles

IoT Device Management: Provisioning, OTA, and Lifecycle
IoT device management starts to hurt the day a project stops being a pilot, and it always arrives as the same question: who holds the list of installed units, a
Oct 6, 2026

What Is NB-IoT? How Narrowband IoT Works and When to Use It
NB-IoT (narrowband IoT) explained: how it works, PSM and eDRX, NB-IoT vs LTE-M vs LoRaWAN vs Sigfox, operators in the US, Mexico and Spain, and when to use it.
Sep 22, 2026

AI and IoT: Why Artificial Intelligence Needs the Internet of Things to Have Real Impact
Artificial intelligence without AI and IoT combined is like a brain without a nervous system: intelligent, but blind. It can imagine. It can assume. It can... hallucinate. But it cannot feel what is happening in the real world. This is not a casual metaphor. It is the reality fac
Sep 20, 2026

IoT Sensors: Types, Protocols and Applications in 2026
IoT sensors convert physical-world measurements — temperature, gases, vibration, light, position — into continuous, actionable, scalable digital data. This guid
Jul 9, 2026

MQTT Broker: What It Is, How It Works, Best Options 2026
An MQTT broker is the central messaging server of an IoT network: it receives the data that devices publish and distributes it to every subscribed application.
Jul 8, 2026

Industrial IoT Solutions: Use Cases by Sector in 2026
Industrial IoT solutions turn legacy plants into data-driven operations. A regional food processor runs three shifts on a packaging line that was commissioned i
May 28, 2026