obgm/libcoap
FreeA CoAP (RFC 7252) implementation in C
About obgm/libcoap
libcoap is a C implementation of the Constrained Application Protocol (CoAP) as defined in RFC 7252, designed for resource-constrained devices with limited computing power, memory, bandwidth, or network packet sizes. It includes a protocol parser, basic networking functions for platforms with malloc() and BSD-style sockets, and support for Contiki-NG, Espressif/ESP-IDF, LwIP, and RIOT-OS environments. The library implements numerous CoAP extensions including Group Communication (RFC7390), Observe (RFC7641), Block-Wise Transfers (RFC7959), No Server Response (RFC7967), PATCH and FETCH (RFC8132), CoAP over TCP/TLS/WebSockets (RFC8323), OSCORE (RFC8613), Hop-Limit (RFC8768), Extended Tokens (RFC8974), Echo and Request-Tag (RFC9175), and Block-Wise Robust Transmission (RFC9177). It supports (D)TLS security via OpenSSL, GnuTLS, and PKCS11 modules.
Key Features
Pros & Cons
- Open-source under BSD license
- Lightweight and efficient for constrained devices
- Supports a wide range of CoAP extensions and standards
- Provides (D)TLS security for encrypted communication
- Portable across multiple embedded platforms
- Actively maintained with regular updates and community support
- Requires C programming knowledge for integration
- Library-only, not a ready-to-use application
- Setup and configuration may be complex for beginners
- Limited to CoAP protocol; not suitable for RESTful HTTP applications