1c87c5fbaSopenharmony_ci// -*- mode:doc; -*- 2c87c5fbaSopenharmony_ci// vim: set syntax=asciidoc tw=0 3c87c5fbaSopenharmony_ci 4c87c5fbaSopenharmony_cicoap-rd(5) 5c87c5fbaSopenharmony_ci========== 6c87c5fbaSopenharmony_ci:doctype: manpage 7c87c5fbaSopenharmony_ci:man source: coap-rd 8c87c5fbaSopenharmony_ci:man version: @PACKAGE_VERSION@ 9c87c5fbaSopenharmony_ci:man manual: coap-rd Manual 10c87c5fbaSopenharmony_ci 11c87c5fbaSopenharmony_ciNAME 12c87c5fbaSopenharmony_ci----- 13c87c5fbaSopenharmony_cicoap-rd, 14c87c5fbaSopenharmony_cicoap-rd-gnutls , 15c87c5fbaSopenharmony_cicoap-rd-mbedtls, 16c87c5fbaSopenharmony_cicoap-rd-openssl, 17c87c5fbaSopenharmony_cicoap-rd-notls 18c87c5fbaSopenharmony_ci- CoAP Resource Directory based on libcoap 19c87c5fbaSopenharmony_ci 20c87c5fbaSopenharmony_ciSYNOPSIS 21c87c5fbaSopenharmony_ci-------- 22c87c5fbaSopenharmony_ci*coap-rd* [*-g* group] [*-p* port] [*-v* num] [*-w* [port][,secure_port]] 23c87c5fbaSopenharmony_ci [*-A* address] [*-G* group_if] [*-T* max_token_size] [*-V* num] 24c87c5fbaSopenharmony_ci [[*-h* hint] [*-k* key]] 25c87c5fbaSopenharmony_ci [[*-c* certfile] [*-n*] [*-C* cafile] [*-R* trusted_casfile]] 26c87c5fbaSopenharmony_ci 27c87c5fbaSopenharmony_ciFor *coap-rd* versions that use libcoap compiled for different 28c87c5fbaSopenharmony_ci(D)TLS libraries, *coap-rd-notls*, *coap-rd-gnutls*, 29c87c5fbaSopenharmony_ci*coap-rd-openssl*, *coap-rd-mbedtls* or *coap-rd-tinydtls* may be 30c87c5fbaSopenharmony_ciavailable. Otherwise, *coap-rd* uses the default libcoap (D)TLS support. 31c87c5fbaSopenharmony_ci 32c87c5fbaSopenharmony_ciDESCRIPTION 33c87c5fbaSopenharmony_ci----------- 34c87c5fbaSopenharmony_ci*coap-rd* is a simple CoAP Resource Directory server that can handle resource 35c87c5fbaSopenharmony_ciregistrations using the protocol CoAP (RFC 7252). 36c87c5fbaSopenharmony_ci 37c87c5fbaSopenharmony_ciOPTIONS 38c87c5fbaSopenharmony_ci------- 39c87c5fbaSopenharmony_ci*-g* group:: 40c87c5fbaSopenharmony_ci Join specified multicast 'group' on startup. 41c87c5fbaSopenharmony_ci *Note:* DTLS over multicast is not currently supported. 42c87c5fbaSopenharmony_ci 43c87c5fbaSopenharmony_ci*-p* port:: 44c87c5fbaSopenharmony_ci The 'port' on the given address will be listening for incoming connections. 45c87c5fbaSopenharmony_ci If (D)TLS is supported, then 'port' + 1 will also be listened on for 46c87c5fbaSopenharmony_ci (D)TLS connections. 47c87c5fbaSopenharmony_ci The default port is 5683 if not given any other value. 48c87c5fbaSopenharmony_ci 49c87c5fbaSopenharmony_ci*-v* num:: 50c87c5fbaSopenharmony_ci The verbosity level to use (default 4, maximum is 8) for general 51c87c5fbaSopenharmony_ci CoAP logging. 52c87c5fbaSopenharmony_ci 53c87c5fbaSopenharmony_ci*-w* [port][,secure_port]:: 54c87c5fbaSopenharmony_ci Enable WebSockets support support on port (WS) and/or secure_port (WSS), 55c87c5fbaSopenharmony_ci comma separated. 56c87c5fbaSopenharmony_ci 57c87c5fbaSopenharmony_ci*-A* address:: 58c87c5fbaSopenharmony_ci The local address of the interface which the server has to listen on. 59c87c5fbaSopenharmony_ci 60c87c5fbaSopenharmony_ci*-G* group_if:: 61c87c5fbaSopenharmony_ci Use this interface for listening for the multicast group. This can be 62c87c5fbaSopenharmony_ci different from the implied interface if the *-A* option is used. 63c87c5fbaSopenharmony_ci 64c87c5fbaSopenharmony_ci*-T* max_token_size:: 65c87c5fbaSopenharmony_ci Set the maximum token length (8-65804). 66c87c5fbaSopenharmony_ci 67c87c5fbaSopenharmony_ci*-V* num:: 68c87c5fbaSopenharmony_ci The verbosity level to use (default 3, maximum is 7) for (D)TLS 69c87c5fbaSopenharmony_ci library logging. 70c87c5fbaSopenharmony_ci 71c87c5fbaSopenharmony_ciOPTIONS - PSK 72c87c5fbaSopenharmony_ci------------- 73c87c5fbaSopenharmony_ci(If supported by underlying (D)TLS library) 74c87c5fbaSopenharmony_ci 75c87c5fbaSopenharmony_ci*-h* hint:: 76c87c5fbaSopenharmony_ci Identity Hint to send. Default is *CoAP*. Zero length is no hint. 77c87c5fbaSopenharmony_ci 78c87c5fbaSopenharmony_ci*-k* key:: 79c87c5fbaSopenharmony_ci Pre-shared key to use for inbound connections. This cannot be empty if 80c87c5fbaSopenharmony_ci defined. 81c87c5fbaSopenharmony_ci *Note:* if *-c cafile* is defined, you need to define *-k key* as well to 82c87c5fbaSopenharmony_ci have the server support both PSK and PKI. 83c87c5fbaSopenharmony_ci 84c87c5fbaSopenharmony_ciOPTIONS - PKI 85c87c5fbaSopenharmony_ci------------- 86c87c5fbaSopenharmony_ci(If supported by underlying (D)TLS library) 87c87c5fbaSopenharmony_ci 88c87c5fbaSopenharmony_ci*-c* certfile:: 89c87c5fbaSopenharmony_ci Use the specified PEM file which contains the CERTIFICATE and PRIVATE 90c87c5fbaSopenharmony_ci KEY information. 91c87c5fbaSopenharmony_ci Note: if *-k key* is defined, you need to define *-c certfile* as well to 92c87c5fbaSopenharmony_ci have the server support both PSK and PKI. 93c87c5fbaSopenharmony_ci 94c87c5fbaSopenharmony_ci*-n* :: 95c87c5fbaSopenharmony_ci Disable remote peer certificate checking. This gives clients the ability to 96c87c5fbaSopenharmony_ci use PKI, but without any defined certificates. 97c87c5fbaSopenharmony_ci 98c87c5fbaSopenharmony_ci*-C* cafile:: 99c87c5fbaSopenharmony_ci PEM file that contains a list of one or more CAs that are to 100c87c5fbaSopenharmony_ci be passed to the client for the client to determine what client certificate 101c87c5fbaSopenharmony_ci to use. Normally, this list of CAs would be the root CA and and any 102c87c5fbaSopenharmony_ci intermediate CAs. Ideally the server certificate should be signed by the 103c87c5fbaSopenharmony_ci same CA so that mutual authentication can take place. The contents of 104c87c5fbaSopenharmony_ci *cafile* are added to the trusted store of root CAs. Using the *-C* or *-R* 105c87c5fbaSopenharmony_ci options will will trigger the validation of the client certificate unless 106c87c5fbaSopenharmony_ci overridden by the *-n* option. 107c87c5fbaSopenharmony_ci 108c87c5fbaSopenharmony_ci*-R* trust_casfile:: 109c87c5fbaSopenharmony_ci PEM file containing the set of trusted root CAs that are to be used to 110c87c5fbaSopenharmony_ci validate the client certificate. Alternatively, this can point to a 111c87c5fbaSopenharmony_ci directory containing a set of CA PEM files. The *-C cafile* CA does not have 112c87c5fbaSopenharmony_ci to be in this list and is trusted for the validation. Using 113c87c5fbaSopenharmony_ci *-R trust_casfile* disables common CA mutual authentication which can only 114c87c5fbaSopenharmony_ci be done by using *-C cafile*. Using the *-C* or *-R* options will will 115c87c5fbaSopenharmony_ci trigger the validation of the server certificate unless overridden by the 116c87c5fbaSopenharmony_ci *-n* option. 117c87c5fbaSopenharmony_ci 118c87c5fbaSopenharmony_ciEXAMPLES 119c87c5fbaSopenharmony_ci-------- 120c87c5fbaSopenharmony_ci* Example 121c87c5fbaSopenharmony_ci---- 122c87c5fbaSopenharmony_cicoap-rd -A ::1 123c87c5fbaSopenharmony_ci---- 124c87c5fbaSopenharmony_ciLet the server listen on localhost (port 5683). 125c87c5fbaSopenharmony_ci 126c87c5fbaSopenharmony_ci* Example 127c87c5fbaSopenharmony_ci---- 128c87c5fbaSopenharmony_cicoap-rd -A ::1 -k mysecretKey -h myhint 129c87c5fbaSopenharmony_ci---- 130c87c5fbaSopenharmony_ciLet the server listen on localhost (port '5683' and '5684') with the server 131c87c5fbaSopenharmony_ciset up for PSK authentication. 132c87c5fbaSopenharmony_ci 133c87c5fbaSopenharmony_ci* Example 134c87c5fbaSopenharmony_ci---- 135c87c5fbaSopenharmony_cicoap-rd -A ::1 -p 13011 136c87c5fbaSopenharmony_ci---- 137c87c5fbaSopenharmony_ciQuite the same, except listening port is '13011' (and not the default port 138c87c5fbaSopenharmony_ci5683). 139c87c5fbaSopenharmony_ci 140c87c5fbaSopenharmony_ci* Example 141c87c5fbaSopenharmony_ci---- 142c87c5fbaSopenharmony_cicoap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -v 5 143c87c5fbaSopenharmony_ci---- 144c87c5fbaSopenharmony_ciThe listening address is set to '2001:db8:81a8:0:6ef0:dead:feed:beef' and the 145c87c5fbaSopenharmony_civerbosity level is set to '5'. 146c87c5fbaSopenharmony_ci 147c87c5fbaSopenharmony_ci* Example 148c87c5fbaSopenharmony_ci---- 149c87c5fbaSopenharmony_cicoap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -g FF02::FD 150c87c5fbaSopenharmony_ci---- 151c87c5fbaSopenharmony_ciSet listening address to '2001:db8:81a8:0:6ef0:dead:feed:beef' and join the 152c87c5fbaSopenharmony_ciAll CoAP Nodes multicast group 'FF02::FD'. 153c87c5fbaSopenharmony_ci 154c87c5fbaSopenharmony_ciFILES 155c87c5fbaSopenharmony_ci------ 156c87c5fbaSopenharmony_ciThere are no configuration files. 157c87c5fbaSopenharmony_ci 158c87c5fbaSopenharmony_ciEXIT STATUS 159c87c5fbaSopenharmony_ci----------- 160c87c5fbaSopenharmony_ci*0*:: 161c87c5fbaSopenharmony_ci Success 162c87c5fbaSopenharmony_ci 163c87c5fbaSopenharmony_ci*1*:: 164c87c5fbaSopenharmony_ci Failure (syntax or usage error; configuration error; document 165c87c5fbaSopenharmony_ci processing failure; unexpected error) 166c87c5fbaSopenharmony_ci 167c87c5fbaSopenharmony_ciBUGS 168c87c5fbaSopenharmony_ci----- 169c87c5fbaSopenharmony_ciPlease report bugs on the mailing list for libcoap: 170c87c5fbaSopenharmony_cilibcoap-developers@lists.sourceforge.net or raise an issue on GitHub at 171c87c5fbaSopenharmony_cihttps://github.com/obgm/libcoap/issues 172c87c5fbaSopenharmony_ci 173c87c5fbaSopenharmony_ciAUTHORS 174c87c5fbaSopenharmony_ci------- 175c87c5fbaSopenharmony_ciThe libcoap project <libcoap-developers@lists.sourceforge.net> 176