1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/dtls-sock
Gilles DOFFE 631e882844 tests: examples: remove stm32mp157c-dk2 for mem leak
stm32mp157c-dk2 has not enough memory to build this apps.
However as the stm32mp157xx cpu line has no flash, a part of RAM
is considered as ROM. Thus ROM size could be extend to suit this
apps needs.

Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
2020-11-13 10:43:08 +01:00
..
dtls-client.c examples/dtls-sock: use new session init workflow 2020-05-22 14:06:12 +02:00
dtls-server.c examples/*: add explicit include of timex.h 2020-10-21 21:47:31 +02:00
main.c examples: add DTLS sock example application 2019-12-05 14:08:54 +01:00
Makefile examples / tests: pull in sock API not implementation 2020-09-07 08:45:25 +02:00
Makefile.ci tests: examples: remove stm32mp157c-dk2 for mem leak 2020-11-13 10:43:08 +01:00
README.md pkg/tinydtls: Move configurations to 'CONFIG_' namespace 2020-03-05 19:11:38 +01:00
tinydtls_keys.h pkg/tinydtls: Move configurations to 'CONFIG_' namespace 2020-03-05 19:11:38 +01:00

DTLS sock example

This example shows how to use DTLS sock sock_dtls_t.

Testing using RIOT native

For testing, we can use two RIOT native RIOT instances. For that first we need to prepare the network interfaces:

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

For the server instance:

$ PORT=tap0 make all term
[...]
> dtlss start
ifconfig

For the client:

$ PORT=tap1 make all term
[...]
> dtlsc <server ip address> "DATA to send"

Debug logs

To enable debug logs uncomment CFLAGS += -DCONFIG_DTLS_DEBUG in the Makefile. Tinydtls supports setting the log level. See Makefile for more info.

Configs and constraints

DTLS sock acts as a wrapper for the underlying DTLS stack and as such, the constraints that applies specifically to the stack are also applied here. For tinydtls, please refer to dtls-echo README.