Skip to content

Commit bbf170c

Browse files
authored
NOISSUE - Update docs on DTLS dialing (#19)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
1 parent b650518 commit bbf170c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Flags:
7171
-m, --max-retries uint32 Max retries for keep alive (default 10)
7272
-O, --options stringArray Add option num with contents of text to the request. If the text begins with 0x, then the hex text (two [0-9a-f] per byte) is converted to binary data.
7373
-p, --port string Port (default "5683")
74+
-s, --use DTLS Use DTLS
7475
-v, --verbose Verbose output
7576

7677
Use "coap-cli [command] --help" for more information about a command.
@@ -81,29 +82,28 @@ The options flag accepts a comma separated string comprising of the optionID def
8182
## Examples
8283

8384
```bash
85+
# GET request with custom auth and observe
8486
coap-cli get m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --auth 1e1017e6-dee7-45b4-8a13-00e6afeb66eb -o
85-
```
8687

87-
```bash
88+
# GET request with custom options
89+
# Options flags accept option codes and values according to RFC7252
8890
coap-cli get m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --options 6,0x00 --options 15,auth=1e1017e6-dee7-45b4-8a13-00e6afeb66eb
89-
```
9091

91-
```bash
92-
coap-cli get m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --options 6,0x00 --options 15,auth=1e1017e6-dee7-45b4-8a13-00e6afeb66eb --ca-file ssl/certs/ca.crt --cert-file ssl/certs/client.crt --key-file ssl/certs/client.key
93-
```
92+
# GET request using DTLS for DTLS server with no requirement for client certificates
93+
coap-cli get m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --options 6,0x00 --options 15,auth=1e1017e6-dee7-45b4-8a13-00e6afeb66eb --ca-file /etc/ssl/certs/ca-certificates.crt -s
9494

95-
```bash
95+
# GET request using DTLS for DTLS server requiring client certificates
96+
coap-cli get m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --options 6,0x00 --options 15,auth=1e1017e6-dee7-45b4-8a13-00e6afeb66eb --ca-file ssl/certs/ca.crt --cert-file ssl/certs/client.crt --key-file ssl/certs/client.key -s
97+
98+
# POST request with custom auth and payload
9699
coap-cli post m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --auth 1e1017e6-dee7-45b4-8a13-00e6afeb66eb -d "hello world"
97-
```
98100

99-
```bash
101+
# POST request with custom auth, payload, host and port
100102
coap-cli post m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --auth 1e1017e6-dee7-45b4-8a13-00e6afeb66eb -d "hello world" -H 0.0.0.0 -p 1234
101-
```
102103

103-
```bash
104-
coap-cli post m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --options 15,auth=1e1017e6-dee7-45b4-8a13-00e6afeb66eb -d "hello world" -H 0.0.0.0 -p 5683
105-
```
104+
# POST request using DTLS for DTLS server with no requirement for client certificates
105+
coap-cli post m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --auth 1e1017e6-dee7-45b4-8a13-00e6afeb66eb -d "hello world" --ca-file /etc/ssl/certs/ca-certificates.crt -s
106106

107-
```bash
108-
coap-cli post channels/0bb5ba61-a66e-4972-bab6-26f19962678f/messages/subtopic --auth 1e1017e6-dee7-45b4-8a13-00e6afeb66eb -d "hello world" --ca-file ssl/certs/ca.crt --cert-file ssl/certs/client.crt --key-file ssl/certs/client.key
107+
# POST request using DTLS for DTLS server requiring client certificates
108+
coap-cli post m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26f19962678f/subtopic --options 15,auth=1e1017e6-dee7-45b4-8a13-00e6afeb66eb -d "hello world" --ca-file ssl/certs/ca.crt --cert-file ssl/certs/client.crt --key-file ssl/certs/client.key -s
109109
```

0 commit comments

Comments
 (0)