Files
libcoap/examples/contiki/README
T
Jon Shallow 10b1b17aec server (lwip & contiki) run out of sessions
As a server, idle sessions are left around in case the client wants to do
further work using the same 5 tuple IP information.
With constrained systems, the number of sessions is limited, and so it is
easy to run out of sessions.

src/coap_session.c:

If there is an idle session, context->max_idle_sessions is not set and
a new session cannot be created, free off the oldest session and retry
the creation again.

examples/contiki/README:
examples/lwip/README:

Tidy up the documentation
2019-04-05 14:30:12 +01:00

31 lines
961 B
Plaintext

Example of libcoap running on contiki
=====================================
To run the example, do
$ make
$ sudo ./server.minimal-net
(and in a second terminal)
$ sudo ip -6 a a aaaa::1/64 dev tap0
and query `coap://[aaaa::1000]/time?ticks` with any coap tool,
or query `coap://[aaaa::1000]/.well-known/core`
This will
* download contiki from the upstream git sources
* build the server application
* run the server application, creating a virtual network device tap0 (unless
that exists)
* configure your network interface to make the server accessible.
* return the appropriate response from the server to the client.
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. If you seem to run out of memory
creating the resources, tweak the number of pre-allocated resources
in `coap_config.h.contiki`.