Version 4.3.5 is available. Try it out!

C-Implementation of CoAP

libcoap implements a lightweight application-protocol for devices that are constrained their resources such as computing power, RF range, memory, bandwith, or network packet sizes.


The Constrained Application Protocol (CoAP) was standardized in the Internet Engineering Task Force (IETF) as RFC 7252.

Learn more


Operating System

Multi-platform

libcoap is designed to run on embedded devices as well as high-end computer systems with POSIX OS. Thus, you can develop and test your CoAP applications on your laptop and then move it to your target platform easily.

Testing

Interoperability

libcoap has successfully participated in several ETSI IoT CoAP plugtests and is in daily use by various IOT projects in industry and academia. Tools to test against can also be found at coap.space.

Features

CoAP-Extensions

The library provides the core functionality for development of resource-efficient CoAP servers and clients, including resource observation, block-wise transfer, FETCH/PATCH, No-Response, TCP, OSCORE, Hop-Limit, group communication, Too Many Requests Response, Echo- and Request-Tags, Block-Wise Transfer Options Supporting Robust Transmission. Example implementations show how these features can be used in applications.

Tools

Code Examples

coap-client is a wget-like tool to generate simple requests for retrieval and modification of resources on a remote server. coap-server is a basic server application that illustrates various server-side features of libcoap, while coap-rd implements a simple CoAP Resource Directory.

Security

TLS-Support

The library is designed to support transport layer security utilizing frameworks such as GnuTLS, OpenSSL, Mbed TLS, tinydtls, or wolfSSL.

libcoap

  • Olaf Bergmann •  bergmann@tzi.org  •  2015—2024
  • PGP key fingerprint: 5E5B E022 04CA 0B0E A2A0 0CBA A845 261A 9F38 A9A0

    (former PGP key fingerprint: 5111 C4C4 4DB3 7FFB 1EA3 E264 606A 6D46 C40B F79B)