Implementations

CoAP is simple enough to implement from scratch for a simple application.
For applications where that is not desirable, generic implementations are becoming available for a variety of platforms. Many of these implementations stay private, but some are published with liberal open-source licenses such as the Apache 2.0 or the MIT license.


Constrained devices

Implementations for constrained devices are typically written in C.

Erbium

Contiki is a widely used operating system for constrained nodes, being employed for research and product development. Erbium is a full-fledged REST Engine and CoAP Implementation for Contiki.

View details »

libcoap

A C implementation of CoAP that can be used both on constrained devices (running operating systems such as Contiki or LWIP) and on a larger POSIX system. Moreover, the library has been ported to TinyOS and RIOT.

View details »

tinydtls

To enable CoAP's security on a tiny device, a tiny implementation of DTLS for Class 1 devices:

View details »

SMCP

A small-but-capable C-based CoAP stack suitable for embedded environments. It supports observing, asynchronous responses to requests, and more. Features that aren't used can be removed to lower the footprint.

View details »

microcoap

A C implementation that can be compiled for both Arduino and POSIX environments:

View details »

cantcoap

A C implementation that focuses on decoding and encoding, leaving the actual protocol to the application. “The user is expected to deal with retransmissions, timeouts, and message ID matching themselves. This isn’t as arduous as it sounds and makes a lot more sense on a constrained device.”

View details »

Lobaro CoAP

An MIT-licensed C implementation for constrained devices that covers base CoAP, Observe, and Block, with demos for ESP8266 and ZWIR4512 (Cortex M3).

View details »

MR-CoAP

MR CoAP (written in an embedded version of Java) is an implementation of CoAP, including the Observe and Block extensions, for IBM's Mote Runner operating system.

View details »

wakaama

The Wakaama project covers the LWM2M Protocol, CoAP, and DTLS layers of the LWM2M protocol stack for all three logical components: LWM2M Client, LWM2M Server and LWM2M Bootstrap Server. An application using Wakaama can fill any LWM2M roles or all of them at once. The CoAP and DTLS layers may be provided by external components.

View details »

JavaScript nodes

Some less constrained devices can run JavaScript right on the device.

The coap-shepherd (server-side) and coap-node (client-side) use CoAP, LWM2M, and the IPSO Smart Object model as their base stone. This project is aiming to provide a setup for full-stack IoT development with JavaScript and Node.js.

View details » View details »

CoAP is not only used between constrained devices, but also between them and more powerful systems such as cloud servers, home centrals, smartphones:

Server-side

Java

One significant Java-based implementation of CoAP is Californium.

View details »

nCoAP is a Java implementation of the CoAP protocol using the Netty NIO client server framework:

View details »

Leshan is an OMA Lightweight M2M (LWM2M) server-side implementation, on top of Californium.

View details »

C

Several of the constrained-device implementations, such as libcoap, can also be used on the server side.

C#

CoAP.NET is an implementation in C# providing CoAP-based services to .NET applications.

View details »

CoAPSharp is a lightweight library for building CoAP enabled sensors and machines that also works with Microsoft .NET Micro Framework, with a tutorial for its API:

View details »

Waher.Networking.CoAP is a library for server-side C# that also comes as a Universal Windows Platform (UWP) version (Waher.Networking.CoAP.UWP), with tutorials and nuget links:

View details » View details »

Erlang

gen_coap is a pure Erlang implementation of a generic CoAP client and server:

View details »

Go

go-ocf/go-coap CoAP client and server supporting UDP, TCP/TLS, resource observation, Block-wise transfer, multicast and request multiplexer. Written purely in Golang.

View details »

go-dustin/go-coap Basic CoAP client and server:

View details »

JavaScript (node.js)

node-coap is a client and server library for CoAP modelled after the http module. Install with npm install coap.

View details »

CoAP-CLI is a command line interface for CoAP, built on node.js and node-coap. Install with npm install coap-cli -g.

View details »

Python

txThings is a CoAP library based on Python's Twisted framework:

View details »

aiocoap implements CoAP natively on Python 3.4's asyncio mechanisms, and provides command line tools for resource fetching and proxying:

View details »

CoAPthon is a python library for the CoAP protocol, with a branch available that uses the Twisted framework.

View details »

Ruby

Install a client library with: gem install coap

View details »

Based on this, a Rack-based server implementation provides compatibility with Rails, Sinatra, and other popular Web frameworks: gem install david

View details »

Rust

View details »

Browser-based

Copper is an extension for Firefox to enable direct access to CoAP resources from a browser. View details »

Smartphones

Some implementations are specifically targeting mobile devices such as smartphones and tablets. These tend to differ between platforms:

iOS, OSX

A simple iOS client implementation has been written by Wojtek Kordylewski in Objective-C.

View details »

CoAP client and server libraries are also available in Swift:

View details »

Android

Many Java components work out of the box on Android. For instance, Californium and nCoAP can be used on an Android device.

View details » View details »

Aneska is a simple CoAP browser based on txThings, installable from Google Play.

View details »

Commercial implementations

We are just beginning to collect information on closed-source commercial implementations. If yours is missing, please create a github issue (free github account required) or just send mail to us!

ARM mbed

A CoAP-based implementation is available with the mbed OS. The “mbed client” implementation (which contains a CoAP server) implements the OMA LWM2M protocol:

View details »

oneMPOWER (InterDigital)

The InterDigital oneMPOWER platform is a cloud based solution for IoT service providers. It implements the complete oneM2M Service Layer running on the CoAP and HTTP web transfer protocols.

View details »

thethings.io

thethings.iO is an IoT platform that stores data from Things and offers tools to analyze it.

View details »