coap (community library)

Summary

Name Value
Name coap
Version 0.2.4
Installs 639
License MIT
Author hirotakaster
URL https://github.com/hirotakaster/CoAP/
Repository https://github.com/hirotakaster/CoAP.git
Download .tar.gz
All Versions 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.0

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

CoAP client, server library for Spark Photon, Spark Core.

CoAP simple server, client library for Particle Photon, Core.

Source Code

This lightweight library source code are only 2 files. simple-coap.cpp, simple-coap.h.

Example

Some sample sketches for Spark Core and Photon included(firmware/examples/).

  • coaptest.ino : simple request/response sample.
  • coapserver.ino : server endpoint url callback sample.

How to use

In this exmples need CoAP server libcoap or microcoap server for check the example program. There is setting the libcoap on Ubuntu Linux. But if there don't use CoAP server(request/reseponse), following setting don't be needed.

git clone https://github.com/obgm/libcoap cd libcoap/ ./autogen.sh ./configure --disable-examples gcc -o coap-server ./examples/coap-server.c -I./include/coap/ -I. -L.libs -lcoap-1 -DWITH_POSIX export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.libs ./coap-server

next start Photon or Core, check the request/response.

Arduino compatible

This library is Arduino compatible. That's version is here.

Browse Library Files