• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OpenThread CLI - Commissioner
2
3## Quick Start
4
5See [README_COMMISSIONING.md](README_COMMISSIONING.md).
6
7## Command List
8
9- [help](#help)
10- [announce](#announce)
11- [energy](#energy)
12- [joiner add](#joiner-add)
13- [joiner remove](#joiner-remove)
14- [joiner table](#joiner-table)
15- [mgmtget](#mgmtget)
16- [mgmtset](#mgmtset)
17- [panid](#panid)
18- [provisioningurl](#provisioningurl)
19- [sessionid](#sessionid)
20- [start](#start)
21- [state](#state)
22- [stop](#stop)
23
24## Command Details
25
26### help
27
28Usage: `commissioner help`
29
30Print commissioner help menu.
31
32```bash
33> commissioner help
34help
35announce
36energy
37joiner
38mgmtget
39mgmtset
40panid
41provisioningurl
42sessionid
43start
44stop
45Done
46```
47
48### announce
49
50Usage: `commissioner announce <mask> <count> <period> <destination>`
51
52Send a `MGMT_ANNOUNCE_BEGIN` message.
53
54- mask: Bitmask identifying channels to send MLE Announce messages.
55- count: Number of MLE Announce transmissions per channel.
56- period: Period between successive MLE Announce transmissions (milliseconds).
57- destination: IPv6 destination for the message (may be multicast).
58
59```bash
60> commissioner announce 0x00050000 2 32 fdde:ad00:beef:0:0:ff:fe00:c00
61Done
62```
63
64### energy
65
66Usage: `commissioner energy <mask> <count> <period> <scanDuration> <destination>`
67
68Send a `MGMT_ED_SCAN` message.
69
70- mask: Bitmask identifying channels to perform IEEE 802.15.4 ED Scans.
71- count: Number of IEEE 802.15.4 ED Scans per channel.
72- period: Period between successive IEEE 802.15.4 ED Scans (milliseconds).
73- scanDuration: IEEE 802.15.4 ScanDuration to use when performing an IEEE 802.15.4 ED Scan (milliseconds).
74- destination: IPv6 destination for the message (may be multicast).
75
76The contents of `MGMT_ED_REPORT` messages (i.e. Channel Mask and Energy List) are printed as they are received.
77
78```bash
79> commissioner energy 0x00050000 2 32 1000 fdde:ad00:beef:0:0:ff:fe00:c00
80Done
81Energy: 00050000 0 0 0 0
82```
83
84### joiner add
85
86Usage: `commissioner joiner add <eui64>|<discerner> <pskd> [timeout]`
87
88Add a Joiner entry.
89
90- eui64: The IEEE EUI-64 of the Joiner or '\*' to match any Joiner.
91- discerner: The Joiner discerner in format `number/length`.
92- pskd: Pre-Shared Key for the Joiner.
93- timeout: joiner timeout in seconds.
94
95```bash
96> commissioner joiner add d45e64fa83f81cf7 J01NME
97Done
98```
99
100```bash
101> commissioner joiner add 0xabc/12 J01NME
102Done
103```
104
105### joiner remove
106
107Usage: `commissioner joiner remove <eui64>|<discerner>`
108
109Remove a Joiner entry.
110
111- eui64: The IEEE EUI-64 of the Joiner or '\*' to match any Joiner.
112- discerner: The Joiner discerner in format `number/length`.
113
114```bash
115> commissioner joiner remove d45e64fa83f81cf7
116Done
117```
118
119```bash
120> commissioner joiner remove 0xabc/12
121Done
122```
123
124### joiner table
125
126Usage: `commissioner joiner table`
127
128List all Joiner entries.
129
130```bash
131> commissioner joiner table
132| ID                    | PSKd                             | Expiration |
133+-----------------------+----------------------------------+------------+
134|                     * |                           J01NME |      81015 |
135|      d45e64fa83f81cf7 |                           J01NME |     101204 |
136| 0x0000000000000abc/12 |                           J01NME |     114360 |
137Done
138```
139
140### mgmtget
141
142Usage: `commissioner mgmtget [locator] [sessionid] [steeringdata] [joinerudpport] [-x <TLV Types>]`
143
144Send a `MGMT_GET` message to the Leader.
145
146```bash
147> commissioner mgmtget locator sessionid
148Done
149```
150
151### mgmtset
152
153Usage: `commissioner mgmtset [locator <locator>] [sessionid <sessionid>] [steeringdata <steeringdata>] [joinerudpport <joinerudpport>] [-x <TLVs>]`
154
155Send a `MGMT_SET` message to the Leader.
156
157```bash
158> commissioner mgmtset joinerudpport 9988
159Done
160```
161
162### panid
163
164Usage: `commissioner panid <panid> <mask> <destination>`
165
166Send a `MGMT_PANID_QUERY` message.
167
168- panid: PAN ID to check for conflicts.
169- mask: Bitmask identifying channels to perform IEEE 802.15.4 Active Scans.
170- destination: IPv6 destination for the message (may be multicast).
171
172The contents of `MGMT_PANID_CONFLICT` messages (i.e. PAN ID and Channel Mask) are printed as they are received.
173
174```bash
175> commissioner panid 0xdead 0x7fff800 fdde:ad00:beef:0:0:ff:fe00:c00
176Done
177Conflict: dead, 00000800
178```
179
180### provisioningurl
181
182Usage: `commissioner provisioningurl <provisioningurl>`
183
184Set the Provisioning URL.
185
186```bash
187> commissioner provisioningurl http://github.com/openthread/openthread
188Done
189```
190
191### sessionid
192
193Usage: `commissioner sessionid`
194
195Get current commissioner session id.
196
197```bash
198> commissioner sessionid
1990
200Done
201```
202
203### id
204
205Usage: `commissioner id`
206
207Get the commissioner id.
208
209```bash
210> commissioner id
211OpenThread Commissioner
212Done
213```
214
215### id \<name\>
216
217Set the commissioner id.
218
219```bash
220> commissioner id "Custom Commissioner Id"
221Done
222```
223
224### start
225
226Usage: `commissioner start`
227
228Start the Commissioner role.
229
230This command will cause the device to send `LEAD_PET` and `LEAD_KA` messages.
231
232```bash
233> commissioner start
234Commissioner: petitioning
235Done
236Commissioner: active
237```
238
239### state
240
241Usage: `commissioner state`
242
243Get Commissioner state.
244
245This command will return the current Commissioner state.
246
247```bash
248> commissioner state
249active
250Done
251```
252
253### stop
254
255Usage: `commissioner stop`
256
257Stop the Commissioner role.
258
259This command will cause the device to send `LEAD_KA[Reject]` messages.
260
261```bash
262> commissioner stop
263Done
264```
265