Files
libcoap/examples/riot/examples_libcoap_server
Jon Shallow 203d228638 RIOT: library fixes for different build types
coap_debug.h: Support logging level set to _COAP_LOG_EMERG
coap_pdu.h: handle small ints
coap_pdu_internal.h: handle small ints
coap_session_internal.h: handle small ints
coap_uthash_internal.h: handle small ints
coap_block.c: Handle small ints
coap_debug.c: Fix use of vsnprintf() and vfprintf()
coap_pdu.c: Handle small ints
coap_tinydtls.c: Handle small ints
coap_uri.c: Fix alignment issue in coap_new_uri()

uncrustify run on RIOT examples to conform to RIOT's coding standards/
2023-10-23 14:38:57 +01:00
..

libcoap server example

This example shows how to configure a server to use libcoap

Fast configuration (Between RIOT instances):

Preparing the logical interfaces:

sudo ./../../dist/tools/tapsetup/tapsetup --create 2

Server invocation

For the server:

PORT=tap0 make term
coaps {stop|start}

The server supports requests for coap://[ip]/time?ticks coap://[ip]/.well-known/core

Handling the static memory allocation

libcoap for RIOT is using the sys/memarray module and therefore there are certain limits. Said resources are defined in libcoap/src/coap_mem.c, but can be overwritten at compile time.