Files
libcoap/examples/riot/README
T
Jon Shallow 93694e6c24 RIOT: Add in TCP support
Need to make use of LwIP interface for TCP.
2026-09-16 15:03:45 +02:00

49 lines
1.5 KiB
Plaintext

Example of libcoap running on RIOT
==================================
To build the examples, do
$ make
This will
* download RIOT from the upstream git sources.
* update the RIOT environment with pkg/libcoap, examples/libcoap-client
and examples/libcoap-server taken from pkg_libcoap/, examples_client/
and examples_server/ respectively.
(updates RIOT's libcoap code to the latest committed version in your
environment, along with any modified files).
* build the client application.
* build the server application.
To run (and/or rebuild) the server application
* cd RIOT/examples/networking/coap/libcoap_server
* make RIOT_CI_BUILD=1
* make term
* (at the shell prompt) coaps start
* (or at the shell prompt) coaps stop
The server creates a resource for 'time' with a query 'ticks'. This is
reported for `.well-known/core`. The work flow for adding more resources does
not differ from regular libcoap usage.
To run (and/or rebuild) the client application
* cd RIOT/examples/networking/coap/libcoap_client
* make RIOT_CI_BUILD=1
* make term
* (at the shell prompt) coapc coap://[ip-6-address]/some/path
The client will try to connect to the URI defined in app.config named
CONFIG_LIBCOAP_CLIENT_URI (unless overridden by running 'make menuconfig'),
or as specified in the parameter after the coapc.
Note to developers
==================
PKG_VERSION= in pkg_libcoap/Makefile needs updating if you need a different
version of libcoap to get initially installed into RIOT/pkg/libcoap.
Kconfig support is available.