Files
libcoap/examples/riot
Jon Shallow 1d81256fc1 ipv[46]: Add in configurable support for IPv4, IPv6 and AF_UNIX
Move some existing header inline code into source files.

Update coap_resolve_address_info() to remove need for client based app
code to have to understand IPv4/IPv6 code.

Remove IPv4/IPv6 specific code from examples code.
2023-06-12 14:55:09 +01:00
..

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/.
* build the client application
* build the server application

To run the server application

* cd RIOT/examples-libcoap-server
* make term
* (at the shell prompt) coaps start

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 the client application

* cd RIOT/examples-libcoap-client
* make term
* (at the shell prompt) coapc

The client will try to connect to the URI defined in app.config named
CONFIG_LIBCOAP_CLIENT_URI (unless overridden by running 'make menuconfig').

Note to developers
==================

PKG_VERSION= in pkg_libcoap/Makefile needs updating if you need a different
version of libcoap to get installed into RIOT/pkg/libcoap.

Kconfig support is available. Running make in the libcoap distribution
examples/riot directory will try to add in a 'rsource "libcoap/Kconfig"'
entry into RIOT/pkg/Kconfig