-
Notifications
You must be signed in to change notification settings - Fork 194
Example : DTLS Echo
6LBR-Demo contains a simple echo server using DTLS transport layer. This example will explain you how to set it up on WisMote platform. It is also possible to run it on Econotag by adapting the target and the upload command accordingly.
In examples/6lbr-demo :
make TARGET=wismote WITH_TINYDTLS=1 WITH_DTLS_ECHO=1
Upload the firmware to the node :
Set the node in bootloader mode
msp430-bsl5-uart -p /dev/ttyUSB0 --parity-none --erase=0x8000-0x3FFFF 6lbr-demo.wismote
Reset the node
Once done, you could for example use TinyDTLS client example to test the echo server. Download the native version of TinyDTLS, in tests/client.c update the pre-shared key if you have modified it. Then build TinyDTLS :
./configure
make
Once build, check in 6LBR webserver that the node is connected (it should appear in the sensors page). You can now use the test client :
./tests/dtls-client <node address> 20220
Each line typed in the terminal will be send to the node and echoed back to the client.
-
DTLS_CONF_IDENTITY_HINT : Identity hint to be used in handshake (default is 'Client_identity')
-
DTLS_CONF_IDENTITY_HINT_LENGTH : Length in bytes of the identity hint
-
DTLS_CONF_PSK_KEY : Pre-shared secret key
-
DTLS_CONF_PSK_KEY_LENGTH : Pre-shared secret key length
-
DTLS_ECHO_PORT : Port of the DTLS Echo server
- Home
- Features
- Supported Hardware
- Download
- Changelog
- FAQ
- Installation:
- Configuration
- Deployment
- Documentation
- Extensions
- Tools
- Examples
- Tutorials
- Publications
- Acknowledgements
- Internal and old