Usage: coap [COMMAND]
Commands:
send Send CoAP requests
register Register to LwM2M server and simulate some simple resources
coap://
(RFC 7252)coaps://
(RFC 7252)coap+tcp://
(RFC 8323)coaps+tcp://
(RFC 8323)
./coap send GET coap://coap.me/.well-known/core
./coap register 'coap://leshan.eclipseprojects.io:5683/rd?ep=device007<=3600&b=U'
coap register -k device01.jks -s openssl 'coaps://localhost:5684/rd?ep=device001'
Note:
This requires openssl
version that supports dtls. Use environment variable COAPCLI_OPENSSL
to point to specific location of openssl
binary.
For example: export COAPCLI_OPENSSL=/usr/local/opt/[email protected]/bin/openssl
mkfifo fifo
coap register -s stdio "coaps://127.0.0.1:5683/rd?ep=test&aid=dm<=60" < fifo | \
socat -d -d - udp-sendto:localhost:5683 > fifo
or
coap register -s stdio "coaps://127.0.0.1:5683/rd?ep=test&aid=dm<=60" < fifo | \
openssl s_client -connect localhost:5684 -cipher PSK-AES128-CBC-SHA -psk 01010101010101010101010101010101 -psk_identity device-0000000001 -quiet > fifo
./gradlew coap-cli:distZip