A small CoAP implementation for microcontrollers
C Other Makefile
Switch branches/tags
Nothing to show
Clone or download
Latest commit ef27289 Feb 5, 2016



A tiny CoAP server for microcontrollers. See http://tools.ietf.org/html/rfc7252

Endpoint handlers are defined in endpoints.c

  • Arduino demo (Mega + Ethernet shield, LED + 220R on pin 6, PUT "0" or "1" to /light)
  • POSIX (OS X/Linux) demo
  • No retries
  • Piggybacked ACK only

For linux/OSX


For Arduino

open microcoap.ino

To test, use libcoap

./coap-client -v 100 -m get coap://
./coap-client -v 100 -m get coap://
./coap-client -e "1" -m put coap://
./coap-client -e "0" -m put coap://

Or use copper (Firefox plugin)


Arduino problem

Arduino, by default, has a UDP transmit buffer of 24 bytes. This is too small for some endpoints and will result in an error.