You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make install # or INSTALL_DIR=~/go/bin make install
44
+
```
45
+
5
46
## Usage
6
47
7
48
```bash
49
+
CLI for CoAP
50
+
8
51
Usage:
9
52
coap-cli [command]
10
53
@@ -26,13 +69,11 @@ Flags:
26
69
-k, --keep-alive uint Send a ping after interval seconds of inactivity. If not specified (or 0), keep-alive is disabled (default).
27
70
-K, --key-file string Client key file
28
71
-m, --max-retries uint32 Max retries for keep alive (default 10)
29
-
-O, --options num,text 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.
72
+
-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.
30
73
-p, --port string Port (default "5683")
31
74
-v, --verbose Verbose output
32
-
-d, --data string Data(default "") - only available for put, post and delete commands
33
-
-o, --observe bool Observe - only available for get command
34
75
35
-
Use "coap-cli [command] --help"for more information about a command
76
+
Use "coap-cli [command] --help"for more information about a command.
36
77
```
37
78
38
79
The options flag accepts a comma separated string comprising of the optionID defined by [RFC-7252](https://datatracker.ietf.org/doc/html/rfc7252) and a string or hex value. Hex values are used to set options that require numerical values e.g observe, maxAge
@@ -55,7 +96,6 @@ coap-cli get m/aa844fac-2f74-4ec3-8318-849b95d03bcc/c/0bb5ba61-a66e-4972-bab6-26
55
96
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"
0 commit comments