1COAP-RD(5) coap-rd Manual COAP-RD(5)
2
3
4
6 coap-rd, coap-rd-gnutls, coap-rd-mbedtls, coap-rd-openssl, coap-rd-
7 notls - A CoAP Resource Directory based on libcoap
8
10 coap-rd [-g group] [-G group_if] [-p port] [-v num] [-A address] [[-h
11 hint] [-k key]] [[-c certfile] [-n] [-C cafile] [-R trusted_casfile]]
12
13 For coap-rd versions that use libcoap compiled for different (D)TLS
14 libraries, coap-rd-notls, coap-rd-gnutls, coap-rd-openssl,
15 coap-rd-mbedtls or coap-rd-tinydtls may be available. Otherwise,
16 coap-rd uses the default libcoap (D)TLS support.
17
19 coap-rd is a simple CoAP Resource Directory server that can handle
20 resource registrations using the protocol CoAP (RFC 7252).
21
23 -g group
24 Join specified multicast group on startup. Note: DTLS over
25 multicast is not currently supported.
26
27 -G group_if
28 Use this interface for listening for the multicast group. This can
29 be different from the implied interface if the -A option is used.
30
31 -p port
32 The port on the given address will be listening for incoming
33 connections. If (D)TLS is supported, then port + 1 will also be
34 listened on for (D)TLS connections. The default port is 5683 if not
35 given any other value.
36
37 -v num
38 The verbosity level to use (default: 3, maximum is 9). Above 7,
39 there is increased verbosity in GnuTLS and OpenSSL logging.
40
41 -A address
42 The local address of the interface which the server has to listen
43 on.
44
46 (If supported by underlying (D)TLS library)
47
48 -h hint
49 Identity Hint to send. Default is CoAP. Zero length is no hint.
50
51 -k key
52 Pre-shared key to use for inbound connections. This cannot be empty
53 if defined. Note: if -c cafile is defined, you need to define -k
54 key as well to have the server support both PSK and PKI.
55
57 (If supported by underlying (D)TLS library)
58
59 -c certfile
60 Use the specified PEM file which contains the CERTIFICATE and
61 PRIVATE KEY information. Note: if -k key is defined, you need to
62 define -c certfile as well to have the server support both PSK and
63 PKI.
64
65 -n
66 Disable remote peer certificate checking. This gives clients the
67 ability to use PKI, but without any defined certificates.
68
69 -C cafile
70 PEM file that contains a list of one or more CAs that are to be
71 passed to the client for the client to determine what client
72 certificate to use. Normally, this list of CAs would be the root CA
73 and and any intermediate CAs. Ideally the server certificate should
74 be signed by the same CA so that mutual authentication can take
75 place. The contents of cafile are added to the trusted store of
76 root CAs. Using the -C or -R options will will trigger the
77 validation of the client certificate unless overridden by the -n
78 option.
79
80 -R trust_casfile
81 PEM file containing the set of trusted root CAs that are to be used
82 to validate the client certificate. Alternatively, this can point
83 to a directory containing a set of CA PEM files. The -C cafile CA
84 does not have to be in this list and is trusted for the validation.
85 Using -R trust_casfile disables common CA mutual authentication
86 which can only be done by using -C cafile. Using the -C or -R
87 options will will trigger the validation of the server certificate
88 unless overridden by the -n option.
89
91 • Example
92
93 coap-rd -A ::1
94
95 Let the server listen on localhost (port 5683).
96
97 • Example
98
99 coap-rd -A ::1 -k mysecretKey -h myhint
100
101 Let the server listen on localhost (port 5683 and 5684) with the server
102 set up for PSK authentication.
103
104 • Example
105
106 coap-rd -A ::1 -p 13011
107
108 Quite the same, except listening port is 13011 (and not the default
109 port 5683).
110
111 • Example
112
113 coap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -v 5
114
115 The listening address is set to 2001:db8:81a8:0:6ef0:dead:feed:beef and
116 the verbosity level is set to 5.
117
118 • Example
119
120 coap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -g FF02::FD
121
122 Set listening address to 2001:db8:81a8:0:6ef0:dead:feed:beef and join
123 the All CoAP Nodes multicast group FF02::FD.
124
126 There are no configuration files.
127
129 0
130 Success
131
132 1
133 Failure (syntax or usage error; configuration error; document
134 processing failure; unexpected error)
135
137 Please report bugs on the mailing list for libcoap:
138 libcoap-developers@lists.sourceforge.net or raise an issue on GitHub at
139 https://github.com/obgm/libcoap/issues
140
142 The libcoap project <libcoap-developers@lists.sourceforge.net>
143
144
145
146coap-rd 4.3.1 11/24/2022 COAP-RD(5)