nRF51 IoT SDK
|
Here, we provide a short description of how Californium and Scandium on the PC can be used to evaluate the DTLS CoAP examples that use Nordic's smartCoAP library over DTLS".
Californium (Cf) is an open source implementation of the Constrained Application Protocol (CoAP) that is written in Java and targets unconstrained environments. Please visit the project's website to learn about what licensing applies when using Californium. Californium is divided into multiple sub-projects, the Scandium (Sc) sub-project provides security for Californium.
The Californium project is hosted by the Eclipse Foundation, which is a not-for-profit, member supported corporation that helps cultivate both an open source community and an ecosystem of complementary products and services.
Californium.properties
files, if any, from all local repositories. 54
set retransmissionTimeout
to 20000: DtlsConnectorConfig.java
43
set the default value for ACK_TIMEOUT
to 200000: NetworkConfigDefaults.java
99
set the IPv6 address of the local interface that is to be used: The expected output of the server is as follows:
(...) Secure CoAP server powered by Scandium (Sc) is listening on port 5684
225
set the IPv6 address of the local interface that is to be used as the source of the CoAP requests: Nrf51ConsoleClient.java
with the correct command line arguments. Use coaps as URI scheme for secure requests. If the DTLS handshake is successful, the server will print the following lines to the console (these lines will be interleaved with other messages that pertain to the DTLS handshake):
(...) 16 INFO [MessageTracer]: /2001:0DB8:AC10:FE01:0:0:0:1:5694 ==> req CON-GET MID=14675, Token=0e6e0e5d, OptionSet={"Uri-Path":[".well-known","core"], "Content-Format":"text/plain"}, "" - (org.eclipse.californium.core.network.interceptors.MessageTracer.java:54) receiveRequest() in thread pool-1-thread-2 at (2015-05-26 13:41:23) 16 INFO [MessageTracer]: /2001:0DB8:AC10:FE01:0:0:0:1:5694 <== res ACK-2.05 MID=14675, Token=0e6e0e5d, OptionSet={"Content-Format":"application/link-format"}, "</lights>,</lights/l".. 22 bytes - (org.eclipse.californium.core.network.interceptors.MessageTracer.java:44) sendResponse() in thread pool-1-thread-2 at (2015-05-26 13:41:23) (...)
The expected output of the client is as follows (these lines will be interleaved with other messages that pertain to the DTLS handshake):
(...) ==[ CoAP Response ]============================================ MID : 14675 Token : 0e6e0e5d Type : ACK Status : 2.05 Options: {"Content-Format":"application/link-format"} Payload: 107 Bytes --------------------------------------------------------------- </lights>,</lights/led3>;title="nRF DK Resource",</lights/led4>;title="nRF DK Resource",</.well-known/core> =============================================================== Time elapsed (ms): 1100 Discovered resources: </lights>,</lights/led3>;title="nRF DK Resource",</lights/led4>;title="nRF DK Resource",</.well-known/core>