Files
libcoap/examples/riot/examples_libcoap_client
Jon Shallow eff1f38f9f path_query parsing: Remove need to define scratch buffer
Create new options coap_uri_into_optlist(), coap_path_into_optlist() and
coap_query_into_optlist() to be used instead of coap_uri_into_options(),
coap_split_path() and coap_split_query() functions so the requirement
for a scratch buffer is not needed.

Getting the minimum size for a scratch buffer is not straight forward and
potential for unexpected boundary condition errors to occurif too small.

Correct parsing and stripping out of "%2E%2E" ("..") and "%2E" (".")
path segments.  ".." now removes the previous segment (if it exists).

Update documentation and unit testcases.

Update examples to use new options.
2024-06-25 08:23:33 +01:00
..

libcoap client example

This example shows how to configure a client to use libcoap

Fast configuration (Between RIOT instances):

Preparing the logical interfaces:

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

Client invocation

For the client:

PORT=tap0 make term
coapc coap://[ip6-address]/some/path

The IP address to connect to needs to be that as returned by libcoap_server, or that of the tap0 interface, etc.

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.