Using libcoap with Contiki

libcoap was developed as CoAP extension for Contiki 2.5 but as Contiki has evolved, libcoap also did. The master branch currently works with Contiki 2.7, support for Contiki 3 will be added soon.

libcoap is a Contiki App

To use libcoap as Contiki app, just add it to the apps folder in your Contiki source tree. You can include libcoap then using APPS += libcoap in your application's Makefile.

  1. Unpack (or clone) libcoap to the apps folder in your Contiki source tree and name it "libcoap".
  2. Include libcoap using APPS += libcoap in your application's Makefile. You can find an example in libcoap/examples/contiki/Makefile.contiki.
  3. Create your CoAP-enabled Contiki application. An example is shown in libcoap/examples/contiki/server.c.