unicoap: Unified CoAP Suite

Send requests and create server resources using the Constrained Application Protocol across different transports. More...

Detailed Description

Send requests and create server resources using the Constrained Application Protocol across different transports.

Module. Specify USEMODULE += unicoap in your application's Makefile.

Warning
unicoap is work in progress. Not all functionality is implemented in RIOT yet, however the documentation already exists. Do not expect everything to work yet.

unicoap is RIOT's unified and modular framework for communication via the Constrained Application Protocol. unicoap supports different transports and several CoAP features, enabled by a layered and modular design. Support for each CoAP transport, such as UDP, is available through drivers.

unicoap aims to eventually replace GCoAP, nanoCoAP small CoAP library, and nanoCoAP Sock, in favor of a more beginner-friendly and easily extensible design.

CoAP

The Constrained Application Protocol (CoAP) is a lightweight alternative to HTTP. HTTP as a general-purpose application protocol carries a significant overhead and is thus problematic for IoT networks with limited bandwidth and nodes with little memory. CoAP covers a range of features needed in the IoT, such as resource discovery, message fragmentation, and end-to-end message protection.

Quick start

In your application Makefile, add

USEMODULE += unicoap
USEMODULE += unicoap_driver_udp

unicoap enables support for CoAP over various transport protocols. Currently, unicoap supports a CoAP over UDP Driver and CoAP over DTLS Driver. You must specify at least one driver to use networking functionality. If you just want to use message APIs, you can use the framing implementation of each driver, such as the RFC 7252 Framing submodule for the RFC 7252 PDU format. unicoap implements both a client and a server.

To configure unicoap, go to the unicoap Compile-Time Configuration. For extending unicoap, refer to Behind The Scenes of unicoap.

Modules

 Behind The Scenes of unicoap
 
 Drivers
 Collection of transport drivers.
 
 Message APIs
 Create and serialize CoAP messages.
 
 unicoap Compile-Time Configuration
 Customize limits and capabilities of unicoap.
 

Files

file  util_macros.h
 Utility macros for unicoap
 
file  unicoap.h
 Main header for unicoap