microcoap
FreeA small CoAP implementation for microcontrollers
FreeFree tier
About microcoap
Microcoap is a tiny, open-source CoAP (Constrained Application Protocol) server implementation specifically designed for microcontrollers. It supports GET, PUT, and POST methods, uses piggybacked ACKs, and operates without retries. The project includes example endpoint handlers defined in endpoints.c, and provides demo code for both Arduino (with Ethernet shield) and POSIX (Linux/OS X) environments. Licensed under MIT, it offers a minimal footprint suitable for constrained IoT devices.
Key Features
Tiny CoAP server implementation for microcontrollers
Supports GET, PUT, POST methods
Endpoint handlers defined in endpoints.c
Includes Arduino demo (Mega + Ethernet shield) and POSIX demo
Piggybacked ACK only, no retries
MIT licensed
Written in C (89.8%)
Pros & Cons
Pros
- Extremely small footprint suitable for microcontrollers
- Open source with permissive MIT license
- Provides easy-to-follow demos for Arduino and POSIX
- Supports standard CoAP methods (GET, PUT, POST)
Cons
- Lacks retries and relies solely on piggybacked ACKs
- Arduino's default UDP buffer size (24 bytes) may be insufficient for some endpoints
- No release versions or packages published
Best For
IoT sensor nodes and actuators communicating over CoAPEmbedded systems requiring a lightweight RESTful protocolResource-constrained devices in home automation or environmental monitoring
FAQ
What is the license for microcoap?
Microcoap is licensed under the MIT License.
How can I test the microcoap server?
For POSIX systems, compile with `make` and run `./coap`. Use libcoap client commands like `./coap-client -v 100 -m get coap://127.0.0.1/.well-known/core` or the Copper Firefox plugin to interact with endpoints.
Does microcoap support retransmissions?
No, microcoap does not implement retries; it uses piggybacked ACKs only.