xref: /aosp_15_r20/external/openthread/src/cli/README_DATASET.md (revision cfb92d1480a9e65faed56933e9c12405f45898b4)
1*cfb92d14SAndroid Build Coastguard Worker# OpenThread CLI - Operational Datasets
2*cfb92d14SAndroid Build Coastguard Worker
3*cfb92d14SAndroid Build Coastguard Worker## Overview
4*cfb92d14SAndroid Build Coastguard Worker
5*cfb92d14SAndroid Build Coastguard WorkerThread network configuration parameters are managed using Active and Pending Operational Dataset objects.
6*cfb92d14SAndroid Build Coastguard Worker
7*cfb92d14SAndroid Build Coastguard Worker### WARNING - Restrictions for production use!
8*cfb92d14SAndroid Build Coastguard Worker
9*cfb92d14SAndroid Build Coastguard WorkerThe CLI commands to write/change the Active and Pending Operational Datasets may allow setting invalid parameters, or invalid combinations of parameters, for testing purposes. These CLI commands can only be used:
10*cfb92d14SAndroid Build Coastguard Worker
11*cfb92d14SAndroid Build Coastguard Worker- To configure network parameters for the first device in a newly created Thread network.
12*cfb92d14SAndroid Build Coastguard Worker- For testing (not applicable to production devices).
13*cfb92d14SAndroid Build Coastguard Worker
14*cfb92d14SAndroid Build Coastguard WorkerIn production Thread networks, the correct method to write/change Operational Datasets is via a [Commissioner](README_COMMISSIONER.md) that performs [commissioning](README_COMMISSIONING.md). Production devices that are not an active Commissioner and are part of a Thread network MUST NOT modify the Operational Datasets in any way.
15*cfb92d14SAndroid Build Coastguard Worker
16*cfb92d14SAndroid Build Coastguard Worker### Active Operational Dataset
17*cfb92d14SAndroid Build Coastguard Worker
18*cfb92d14SAndroid Build Coastguard WorkerThe Active Operational Dataset includes parameters that are currently in use across an entire Thread network. The Active Operational Dataset contains:
19*cfb92d14SAndroid Build Coastguard Worker
20*cfb92d14SAndroid Build Coastguard Worker- Active Timestamp
21*cfb92d14SAndroid Build Coastguard Worker- Channel
22*cfb92d14SAndroid Build Coastguard Worker- Channel Mask
23*cfb92d14SAndroid Build Coastguard Worker- Extended PAN ID
24*cfb92d14SAndroid Build Coastguard Worker- Mesh-Local Prefix
25*cfb92d14SAndroid Build Coastguard Worker- Network Name
26*cfb92d14SAndroid Build Coastguard Worker- PAN ID
27*cfb92d14SAndroid Build Coastguard Worker- PSKc
28*cfb92d14SAndroid Build Coastguard Worker- Security Policy
29*cfb92d14SAndroid Build Coastguard Worker
30*cfb92d14SAndroid Build Coastguard Worker### Pending Operational Dataset
31*cfb92d14SAndroid Build Coastguard Worker
32*cfb92d14SAndroid Build Coastguard WorkerThe Pending Operational Dataset is used to communicate changes to the Active Operational Dataset before they take effect. The Pending Operational Dataset contains all the parameters from the Active Operational Dataset, with the addition of:
33*cfb92d14SAndroid Build Coastguard Worker
34*cfb92d14SAndroid Build Coastguard Worker- Delay Timer
35*cfb92d14SAndroid Build Coastguard Worker- Pending Timestamp
36*cfb92d14SAndroid Build Coastguard Worker
37*cfb92d14SAndroid Build Coastguard Worker## Quick Start
38*cfb92d14SAndroid Build Coastguard Worker
39*cfb92d14SAndroid Build Coastguard Worker### Form Network
40*cfb92d14SAndroid Build Coastguard Worker
41*cfb92d14SAndroid Build Coastguard Worker1. Generate and view new network configuration.
42*cfb92d14SAndroid Build Coastguard Worker
43*cfb92d14SAndroid Build Coastguard Worker   ```bash
44*cfb92d14SAndroid Build Coastguard Worker   > dataset init new
45*cfb92d14SAndroid Build Coastguard Worker   Done
46*cfb92d14SAndroid Build Coastguard Worker   > dataset
47*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 1
48*cfb92d14SAndroid Build Coastguard Worker   Channel: 15
49*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
50*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 39758ec8144b07fb
51*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fdf1:f1ad:d079:7dc0::/64
52*cfb92d14SAndroid Build Coastguard Worker   Network Key: f366cec7a446bab978d90d27abe38f23
53*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-5938
54*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0x5938
55*cfb92d14SAndroid Build Coastguard Worker   PSKc: 3ca67c969efb0d0c74a4d8ee923b576c
56*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
57*cfb92d14SAndroid Build Coastguard Worker   Done
58*cfb92d14SAndroid Build Coastguard Worker   ```
59*cfb92d14SAndroid Build Coastguard Worker
60*cfb92d14SAndroid Build Coastguard Worker2. Commit new dataset to the Active Operational Dataset in non-volatile storage.
61*cfb92d14SAndroid Build Coastguard Worker
62*cfb92d14SAndroid Build Coastguard Worker   ```bash
63*cfb92d14SAndroid Build Coastguard Worker   dataset commit active
64*cfb92d14SAndroid Build Coastguard Worker   Done
65*cfb92d14SAndroid Build Coastguard Worker   ```
66*cfb92d14SAndroid Build Coastguard Worker
67*cfb92d14SAndroid Build Coastguard Worker3. Enable Thread interface
68*cfb92d14SAndroid Build Coastguard Worker
69*cfb92d14SAndroid Build Coastguard Worker   ```bash
70*cfb92d14SAndroid Build Coastguard Worker   > ifconfig up
71*cfb92d14SAndroid Build Coastguard Worker   Done
72*cfb92d14SAndroid Build Coastguard Worker   > thread start
73*cfb92d14SAndroid Build Coastguard Worker   Done
74*cfb92d14SAndroid Build Coastguard Worker   ```
75*cfb92d14SAndroid Build Coastguard Worker
76*cfb92d14SAndroid Build Coastguard Worker### Attach to Existing Network
77*cfb92d14SAndroid Build Coastguard Worker
78*cfb92d14SAndroid Build Coastguard WorkerOnly the Network Key is required for a device to attach to a Thread network.
79*cfb92d14SAndroid Build Coastguard Worker
80*cfb92d14SAndroid Build Coastguard WorkerWhile not required, specifying the channel avoids the need to search across multiple channels, improving both latency and efficiency of the attach process.
81*cfb92d14SAndroid Build Coastguard Worker
82*cfb92d14SAndroid Build Coastguard WorkerAfter the device successfully attaches to a Thread network, the device will retrieve the complete Active Operational Dataset.
83*cfb92d14SAndroid Build Coastguard Worker
84*cfb92d14SAndroid Build Coastguard Worker1. Create a partial Active Operational Dataset.
85*cfb92d14SAndroid Build Coastguard Worker
86*cfb92d14SAndroid Build Coastguard Worker   ```bash
87*cfb92d14SAndroid Build Coastguard Worker   > dataset networkkey dfd34f0f05cad978ec4e32b0413038ff
88*cfb92d14SAndroid Build Coastguard Worker   Done
89*cfb92d14SAndroid Build Coastguard Worker   > dataset commit active
90*cfb92d14SAndroid Build Coastguard Worker   Done
91*cfb92d14SAndroid Build Coastguard Worker   ```
92*cfb92d14SAndroid Build Coastguard Worker
93*cfb92d14SAndroid Build Coastguard Worker2. Enable Thread interface.
94*cfb92d14SAndroid Build Coastguard Worker
95*cfb92d14SAndroid Build Coastguard Worker   ```bash
96*cfb92d14SAndroid Build Coastguard Worker   > ifconfig up
97*cfb92d14SAndroid Build Coastguard Worker   Done
98*cfb92d14SAndroid Build Coastguard Worker   > thread start
99*cfb92d14SAndroid Build Coastguard Worker   Done
100*cfb92d14SAndroid Build Coastguard Worker   ```
101*cfb92d14SAndroid Build Coastguard Worker
102*cfb92d14SAndroid Build Coastguard Worker3. After attaching, validate that the device received the complete Active Operational Dataset.
103*cfb92d14SAndroid Build Coastguard Worker
104*cfb92d14SAndroid Build Coastguard Worker   ```bash
105*cfb92d14SAndroid Build Coastguard Worker   > dataset active
106*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 1
107*cfb92d14SAndroid Build Coastguard Worker   Channel: 15
108*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
109*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 39758ec8144b07fb
110*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fdf1:f1ad:d079:7dc0::/64
111*cfb92d14SAndroid Build Coastguard Worker   Network Key: f366cec7a446bab978d90d27abe38f23
112*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-5938
113*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0x5938
114*cfb92d14SAndroid Build Coastguard Worker   PSKc: 3ca67c969efb0d0c74a4d8ee923b576c
115*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
116*cfb92d14SAndroid Build Coastguard Worker   Done
117*cfb92d14SAndroid Build Coastguard Worker   ```
118*cfb92d14SAndroid Build Coastguard Worker
119*cfb92d14SAndroid Build Coastguard Worker### Using the Dataset Updater to update Operational Dataset
120*cfb92d14SAndroid Build Coastguard Worker
121*cfb92d14SAndroid Build Coastguard WorkerDataset Updater can be used for a delayed update of network parameters on all devices of a Thread Network.
122*cfb92d14SAndroid Build Coastguard Worker
123*cfb92d14SAndroid Build Coastguard Worker1. Clear the dataset buffer and add the Dataset fields to update.
124*cfb92d14SAndroid Build Coastguard Worker
125*cfb92d14SAndroid Build Coastguard Worker   ```bash
126*cfb92d14SAndroid Build Coastguard Worker   > dataset clear
127*cfb92d14SAndroid Build Coastguard Worker   Done
128*cfb92d14SAndroid Build Coastguard Worker
129*cfb92d14SAndroid Build Coastguard Worker   > dataset channel 12
130*cfb92d14SAndroid Build Coastguard Worker   Done
131*cfb92d14SAndroid Build Coastguard Worker   ```
132*cfb92d14SAndroid Build Coastguard Worker
133*cfb92d14SAndroid Build Coastguard Worker2. Set the delay timer parameter (example uses 5 minutes or 300000 ms). Check the resulting dataset. There is no need to specify active or pending timestamps because the Dataset Updater will handle this. If specified the `dataset updater start` will issue an error.
134*cfb92d14SAndroid Build Coastguard Worker
135*cfb92d14SAndroid Build Coastguard Worker   ```bash
136*cfb92d14SAndroid Build Coastguard Worker   > dataset delay 300000
137*cfb92d14SAndroid Build Coastguard Worker
138*cfb92d14SAndroid Build Coastguard Worker   > dataset
139*cfb92d14SAndroid Build Coastguard Worker   Channel: 12
140*cfb92d14SAndroid Build Coastguard Worker   Delay: 30000
141*cfb92d14SAndroid Build Coastguard Worker   Done
142*cfb92d14SAndroid Build Coastguard Worker   ```
143*cfb92d14SAndroid Build Coastguard Worker
144*cfb92d14SAndroid Build Coastguard Worker3. Start the Dataset Updater, which will prepare a Pending Operation Dataset and inform the Leader to distribute it to other devices.
145*cfb92d14SAndroid Build Coastguard Worker
146*cfb92d14SAndroid Build Coastguard Worker   ```bash
147*cfb92d14SAndroid Build Coastguard Worker   > dataset updater start
148*cfb92d14SAndroid Build Coastguard Worker   Done
149*cfb92d14SAndroid Build Coastguard Worker
150*cfb92d14SAndroid Build Coastguard Worker   > dataset updater
151*cfb92d14SAndroid Build Coastguard Worker   Enabled
152*cfb92d14SAndroid Build Coastguard Worker   ```
153*cfb92d14SAndroid Build Coastguard Worker
154*cfb92d14SAndroid Build Coastguard Worker4. After about 5 minutes, the changes are applied to the Active Operational Dataset on the Leader. This can also be checked at other devices on the network: these should have applied the new Dataset too, at approximately the same time as the Leader has done this.
155*cfb92d14SAndroid Build Coastguard Worker
156*cfb92d14SAndroid Build Coastguard Worker   ```bash
157*cfb92d14SAndroid Build Coastguard Worker   > dataset active
158*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 10
159*cfb92d14SAndroid Build Coastguard Worker   Channel: 12
160*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
161*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 324a71d90cdc8345
162*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fd7d:da74:df5e:80c::/64
163*cfb92d14SAndroid Build Coastguard Worker   Network Key: be768535bac1b8d228960038311d6ca2
164*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-bcaf
165*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0xbcaf
166*cfb92d14SAndroid Build Coastguard Worker   PSKc: e79b274ab22414a814ed5cce6a30be67
167*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
168*cfb92d14SAndroid Build Coastguard Worker   Done
169*cfb92d14SAndroid Build Coastguard Worker   ```
170*cfb92d14SAndroid Build Coastguard Worker
171*cfb92d14SAndroid Build Coastguard Worker### Using the Pending Operational Dataset for Delayed Dataset Updates
172*cfb92d14SAndroid Build Coastguard Worker
173*cfb92d14SAndroid Build Coastguard WorkerThe Pending Operational Dataset can be used for a delayed update of network parameters on all devices of a Thread Network. If certain Active Operational Dataset parameters need to be changed, but the change would impact the connectivity of the network, delaying the update helps to let all devices receive the new parameters before the update is applied. Examples of such parameters are the channel, PAN ID, certain Security Policy bits, or Network Key.
174*cfb92d14SAndroid Build Coastguard Worker
175*cfb92d14SAndroid Build Coastguard WorkerThe delay timer determines the time period after which the Pending Operational Dataset takes effect and becomes the Active Operational Dataset. The following example shows how a Pending Operational Dataset with delay timer can be set at a Leader device. The Leader will initiate the distribution of the Pending Operational Dataset to the rest of the devices in the network.
176*cfb92d14SAndroid Build Coastguard Worker
177*cfb92d14SAndroid Build Coastguard WorkerNormally, an active Commissioner will set a new Pending Operational Dataset. For testing purposes, we will do this in the example directly on the Leader using the CLI - so without using a Commissioner.
178*cfb92d14SAndroid Build Coastguard Worker
179*cfb92d14SAndroid Build Coastguard Worker1. The main parameter to change is the channel. We can display the current Active Operational Dataset to see that the current channel is 16.
180*cfb92d14SAndroid Build Coastguard Worker
181*cfb92d14SAndroid Build Coastguard Worker   ```bash
182*cfb92d14SAndroid Build Coastguard Worker   > dataset active
183*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 1691070443
184*cfb92d14SAndroid Build Coastguard Worker   Channel: 16
185*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
186*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 324a71d90cdc8345
187*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fd7d:da74:df5e:80c::/64
188*cfb92d14SAndroid Build Coastguard Worker   Network Key: be768535bac1b8d228960038311d6ca2
189*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-bcaf
190*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0xbcaf
191*cfb92d14SAndroid Build Coastguard Worker   PSKc: e79b274ab22414a814ed5cce6a30be67
192*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
193*cfb92d14SAndroid Build Coastguard Worker   Done
194*cfb92d14SAndroid Build Coastguard Worker   ```
195*cfb92d14SAndroid Build Coastguard Worker
196*cfb92d14SAndroid Build Coastguard Worker2. Create a new Dataset in the dataset buffer, by copying the Active Operational Dataset. Then change the channel number to 12 and increase the timestamp.
197*cfb92d14SAndroid Build Coastguard Worker
198*cfb92d14SAndroid Build Coastguard Worker   ```bash
199*cfb92d14SAndroid Build Coastguard Worker   > dataset init active
200*cfb92d14SAndroid Build Coastguard Worker   Done
201*cfb92d14SAndroid Build Coastguard Worker   > dataset activetimestamp 1696177379
202*cfb92d14SAndroid Build Coastguard Worker   Done
203*cfb92d14SAndroid Build Coastguard Worker   > dataset pendingtimestamp 1696177379
204*cfb92d14SAndroid Build Coastguard Worker   Done
205*cfb92d14SAndroid Build Coastguard Worker   > dataset channel 12
206*cfb92d14SAndroid Build Coastguard Worker   Done
207*cfb92d14SAndroid Build Coastguard Worker   ```
208*cfb92d14SAndroid Build Coastguard Worker
209*cfb92d14SAndroid Build Coastguard Worker3. Set the delay timer parameter to 5 minutes (300000 ms). Show the resulting Dataset that's ready to be used.
210*cfb92d14SAndroid Build Coastguard Worker
211*cfb92d14SAndroid Build Coastguard Worker   ```bash
212*cfb92d14SAndroid Build Coastguard Worker   > dataset delay 300000
213*cfb92d14SAndroid Build Coastguard Worker   Done
214*cfb92d14SAndroid Build Coastguard Worker   > dataset
215*cfb92d14SAndroid Build Coastguard Worker   Pending Timestamp: 1696177379
216*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 1696177379
217*cfb92d14SAndroid Build Coastguard Worker   Channel: 12
218*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
219*cfb92d14SAndroid Build Coastguard Worker   Delay: 300000
220*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 324a71d90cdc8345
221*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fd7d:da74:df5e:80c::/64
222*cfb92d14SAndroid Build Coastguard Worker   Network Key: be768535bac1b8d228960038311d6ca2
223*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-bcaf
224*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0xbcaf
225*cfb92d14SAndroid Build Coastguard Worker   PSKc: e79b274ab22414a814ed5cce6a30be67
226*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
227*cfb92d14SAndroid Build Coastguard Worker   Done
228*cfb92d14SAndroid Build Coastguard Worker   ```
229*cfb92d14SAndroid Build Coastguard Worker
230*cfb92d14SAndroid Build Coastguard Worker4. Commit the new Dataset as the Pending Operational Dataset. This also starts the delay timer countdown. The Leader then starts the distribution of the Pending Operational Dataset to other devices in the network.
231*cfb92d14SAndroid Build Coastguard Worker
232*cfb92d14SAndroid Build Coastguard Worker   ```bash
233*cfb92d14SAndroid Build Coastguard Worker   > dataset commit pending
234*cfb92d14SAndroid Build Coastguard Worker   Done
235*cfb92d14SAndroid Build Coastguard Worker   ```
236*cfb92d14SAndroid Build Coastguard Worker
237*cfb92d14SAndroid Build Coastguard Worker5. To verify that the delay timer is counting down, display the Pending Operational Dataset after a few seconds.
238*cfb92d14SAndroid Build Coastguard Worker
239*cfb92d14SAndroid Build Coastguard Worker   ```bash
240*cfb92d14SAndroid Build Coastguard Worker   > dataset pending
241*cfb92d14SAndroid Build Coastguard Worker   Pending Timestamp: 1696177379
242*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 1696177379
243*cfb92d14SAndroid Build Coastguard Worker   Channel: 12
244*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
245*cfb92d14SAndroid Build Coastguard Worker   Delay: 293051
246*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 324a71d90cdc8345
247*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fd7d:da74:df5e:80c::/64
248*cfb92d14SAndroid Build Coastguard Worker   Network Key: be768535bac1b8d228960038311d6ca2
249*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-bcaf
250*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0xbcaf
251*cfb92d14SAndroid Build Coastguard Worker   PSKc: e79b274ab22414a814ed5cce6a30be67
252*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
253*cfb92d14SAndroid Build Coastguard Worker   Done
254*cfb92d14SAndroid Build Coastguard Worker   ```
255*cfb92d14SAndroid Build Coastguard Worker
256*cfb92d14SAndroid Build Coastguard Worker   This shows that indeed the delay timer has started counting down from its initial value `300000`. The same can be optionally checked on other devices in the network.
257*cfb92d14SAndroid Build Coastguard Worker
258*cfb92d14SAndroid Build Coastguard Worker6) After about 5 minutes, check that the Pending Operational Dataset has been applied at the Leader. This can also be checked at other devices on the network: these should have applied the new Dataset too, at approximately the same time as the Leader has done this.
259*cfb92d14SAndroid Build Coastguard Worker
260*cfb92d14SAndroid Build Coastguard Worker   ```bash
261*cfb92d14SAndroid Build Coastguard Worker   > dataset active
262*cfb92d14SAndroid Build Coastguard Worker   Active Timestamp: 1696177379
263*cfb92d14SAndroid Build Coastguard Worker   Channel: 12
264*cfb92d14SAndroid Build Coastguard Worker   Channel Mask: 0x07fff800
265*cfb92d14SAndroid Build Coastguard Worker   Ext PAN ID: 324a71d90cdc8345
266*cfb92d14SAndroid Build Coastguard Worker   Mesh Local Prefix: fd7d:da74:df5e:80c::/64
267*cfb92d14SAndroid Build Coastguard Worker   Network Key: be768535bac1b8d228960038311d6ca2
268*cfb92d14SAndroid Build Coastguard Worker   Network Name: OpenThread-bcaf
269*cfb92d14SAndroid Build Coastguard Worker   PAN ID: 0xbcaf
270*cfb92d14SAndroid Build Coastguard Worker   PSKc: e79b274ab22414a814ed5cce6a30be67
271*cfb92d14SAndroid Build Coastguard Worker   Security Policy: 672 onrc 0
272*cfb92d14SAndroid Build Coastguard Worker   Done
273*cfb92d14SAndroid Build Coastguard Worker   ```
274*cfb92d14SAndroid Build Coastguard Worker
275*cfb92d14SAndroid Build Coastguard Worker   This shows that the Active Operational Dataset has now been updated to use channel 12. And the Pending Operational Dataset is no longer present, as can be seen by this command:
276*cfb92d14SAndroid Build Coastguard Worker
277*cfb92d14SAndroid Build Coastguard Worker   ```bash
278*cfb92d14SAndroid Build Coastguard Worker   > dataset pending
279*cfb92d14SAndroid Build Coastguard Worker   Error 23: NotFound
280*cfb92d14SAndroid Build Coastguard Worker   ```
281*cfb92d14SAndroid Build Coastguard Worker
282*cfb92d14SAndroid Build Coastguard Worker## Command List
283*cfb92d14SAndroid Build Coastguard Worker
284*cfb92d14SAndroid Build Coastguard Worker- [help](#help)
285*cfb92d14SAndroid Build Coastguard Worker- [active](#active)
286*cfb92d14SAndroid Build Coastguard Worker- [activetimestamp](#activetimestamp)
287*cfb92d14SAndroid Build Coastguard Worker- [channel](#channel)
288*cfb92d14SAndroid Build Coastguard Worker- [channelmask](#channelmask)
289*cfb92d14SAndroid Build Coastguard Worker- [clear](#clear)
290*cfb92d14SAndroid Build Coastguard Worker- [commit](#commit)
291*cfb92d14SAndroid Build Coastguard Worker- [delay](#delay)
292*cfb92d14SAndroid Build Coastguard Worker- [extpanid](#extpanid)
293*cfb92d14SAndroid Build Coastguard Worker- [init](#init)
294*cfb92d14SAndroid Build Coastguard Worker- [meshlocalprefix](#meshlocalprefix)
295*cfb92d14SAndroid Build Coastguard Worker- [mgmtgetcommand](#mgmtgetcommand)
296*cfb92d14SAndroid Build Coastguard Worker- [mgmtsetcommand](#mgmtsetcommand)
297*cfb92d14SAndroid Build Coastguard Worker- [networkkey](#networkkey)
298*cfb92d14SAndroid Build Coastguard Worker- [networkname](#networkname)
299*cfb92d14SAndroid Build Coastguard Worker- [panid](#panid)
300*cfb92d14SAndroid Build Coastguard Worker- [pending](#pending)
301*cfb92d14SAndroid Build Coastguard Worker- [pendingtimestamp](#pendingtimestamp)
302*cfb92d14SAndroid Build Coastguard Worker- [pskc](#pskc)
303*cfb92d14SAndroid Build Coastguard Worker- [securitypolicy](#securitypolicy)
304*cfb92d14SAndroid Build Coastguard Worker- [tlvs](#tlvs)
305*cfb92d14SAndroid Build Coastguard Worker- [updater](#updater)
306*cfb92d14SAndroid Build Coastguard Worker
307*cfb92d14SAndroid Build Coastguard Worker## Command Details
308*cfb92d14SAndroid Build Coastguard Worker
309*cfb92d14SAndroid Build Coastguard Worker### help
310*cfb92d14SAndroid Build Coastguard Worker
311*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset help`
312*cfb92d14SAndroid Build Coastguard Worker
313*cfb92d14SAndroid Build Coastguard WorkerPrint dataset help menu.
314*cfb92d14SAndroid Build Coastguard Worker
315*cfb92d14SAndroid Build Coastguard Worker```bash
316*cfb92d14SAndroid Build Coastguard Worker> dataset help
317*cfb92d14SAndroid Build Coastguard Workerhelp
318*cfb92d14SAndroid Build Coastguard Workeractive
319*cfb92d14SAndroid Build Coastguard Workeractivetimestamp
320*cfb92d14SAndroid Build Coastguard Workerchannel
321*cfb92d14SAndroid Build Coastguard Workerchannelmask
322*cfb92d14SAndroid Build Coastguard Workerclear
323*cfb92d14SAndroid Build Coastguard Workercommit
324*cfb92d14SAndroid Build Coastguard Workerdelay
325*cfb92d14SAndroid Build Coastguard Workerextpanid
326*cfb92d14SAndroid Build Coastguard Workerinit
327*cfb92d14SAndroid Build Coastguard Workermeshlocalprefix
328*cfb92d14SAndroid Build Coastguard Workermgmtgetcommand
329*cfb92d14SAndroid Build Coastguard Workermgmtsetcommand
330*cfb92d14SAndroid Build Coastguard Workernetworkkey
331*cfb92d14SAndroid Build Coastguard Workernetworkname
332*cfb92d14SAndroid Build Coastguard Workerpanid
333*cfb92d14SAndroid Build Coastguard Workerpending
334*cfb92d14SAndroid Build Coastguard Workerpendingtimestamp
335*cfb92d14SAndroid Build Coastguard Workerpskc
336*cfb92d14SAndroid Build Coastguard Workersecuritypolicy
337*cfb92d14SAndroid Build Coastguard Workerset
338*cfb92d14SAndroid Build Coastguard Workertlvs
339*cfb92d14SAndroid Build Coastguard WorkerDone
340*cfb92d14SAndroid Build Coastguard Worker```
341*cfb92d14SAndroid Build Coastguard Worker
342*cfb92d14SAndroid Build Coastguard Worker### active
343*cfb92d14SAndroid Build Coastguard Worker
344*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset active [-x]`
345*cfb92d14SAndroid Build Coastguard Worker
346*cfb92d14SAndroid Build Coastguard WorkerPrint Active Operational Dataset in human-readable form.
347*cfb92d14SAndroid Build Coastguard Worker
348*cfb92d14SAndroid Build Coastguard Worker```bash
349*cfb92d14SAndroid Build Coastguard Worker> dataset active
350*cfb92d14SAndroid Build Coastguard WorkerActive Timestamp: 1
351*cfb92d14SAndroid Build Coastguard WorkerChannel: 15
352*cfb92d14SAndroid Build Coastguard WorkerChannel Mask: 0x07fff800
353*cfb92d14SAndroid Build Coastguard WorkerExt PAN ID: 39758ec8144b07fb
354*cfb92d14SAndroid Build Coastguard WorkerMesh Local Prefix: fdf1:f1ad:d079:7dc0::/64
355*cfb92d14SAndroid Build Coastguard WorkerNetwork Key: f366cec7a446bab978d90d27abe38f23
356*cfb92d14SAndroid Build Coastguard WorkerNetwork Name: OpenThread-5938
357*cfb92d14SAndroid Build Coastguard WorkerPAN ID: 0x5938
358*cfb92d14SAndroid Build Coastguard WorkerPSKc: 3ca67c969efb0d0c74a4d8ee923b576c
359*cfb92d14SAndroid Build Coastguard WorkerSecurity Policy: 672 onrc 0
360*cfb92d14SAndroid Build Coastguard WorkerDone
361*cfb92d14SAndroid Build Coastguard Worker```
362*cfb92d14SAndroid Build Coastguard Worker
363*cfb92d14SAndroid Build Coastguard WorkerPrint Active Operational Dataset as hex-encoded TLVs.
364*cfb92d14SAndroid Build Coastguard Worker
365*cfb92d14SAndroid Build Coastguard Worker```bash
366*cfb92d14SAndroid Build Coastguard Worker> dataset active -x
367*cfb92d14SAndroid Build Coastguard Worker0e080000000000010000000300000f35060004001fffe0020839758ec8144b07fb0708fdf1f1add0797dc00510f366cec7a446bab978d90d27abe38f23030f4f70656e5468726561642d353933380102593804103ca67c969efb0d0c74a4d8ee923b576c0c0402a0f7f8
368*cfb92d14SAndroid Build Coastguard WorkerDone
369*cfb92d14SAndroid Build Coastguard Worker```
370*cfb92d14SAndroid Build Coastguard Worker
371*cfb92d14SAndroid Build Coastguard Worker### activetimestamp
372*cfb92d14SAndroid Build Coastguard Worker
373*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset activetimestamp [timestamp]`
374*cfb92d14SAndroid Build Coastguard Worker
375*cfb92d14SAndroid Build Coastguard WorkerGet active timestamp seconds. It represents a "Unix time", in number of seconds since Jan 1st, 1970.
376*cfb92d14SAndroid Build Coastguard Worker
377*cfb92d14SAndroid Build Coastguard Worker```bash
378*cfb92d14SAndroid Build Coastguard Worker> dataset activetimestamp
379*cfb92d14SAndroid Build Coastguard Worker123456789
380*cfb92d14SAndroid Build Coastguard WorkerDone
381*cfb92d14SAndroid Build Coastguard Worker```
382*cfb92d14SAndroid Build Coastguard Worker
383*cfb92d14SAndroid Build Coastguard WorkerSet active timestamp seconds.
384*cfb92d14SAndroid Build Coastguard Worker
385*cfb92d14SAndroid Build Coastguard Worker```bash
386*cfb92d14SAndroid Build Coastguard Worker> dataset activetimestamp 123456789
387*cfb92d14SAndroid Build Coastguard WorkerDone
388*cfb92d14SAndroid Build Coastguard Worker```
389*cfb92d14SAndroid Build Coastguard Worker
390*cfb92d14SAndroid Build Coastguard Worker### channel
391*cfb92d14SAndroid Build Coastguard Worker
392*cfb92d14SAndroid Build Coastguard WorkerUsage: `channel [channel]`
393*cfb92d14SAndroid Build Coastguard Worker
394*cfb92d14SAndroid Build Coastguard WorkerGet channel.
395*cfb92d14SAndroid Build Coastguard Worker
396*cfb92d14SAndroid Build Coastguard Worker```bash
397*cfb92d14SAndroid Build Coastguard Worker> dataset channel
398*cfb92d14SAndroid Build Coastguard Worker12
399*cfb92d14SAndroid Build Coastguard WorkerDone
400*cfb92d14SAndroid Build Coastguard Worker```
401*cfb92d14SAndroid Build Coastguard Worker
402*cfb92d14SAndroid Build Coastguard WorkerSet channel.
403*cfb92d14SAndroid Build Coastguard Worker
404*cfb92d14SAndroid Build Coastguard Worker```bash
405*cfb92d14SAndroid Build Coastguard Worker> dataset channel 12
406*cfb92d14SAndroid Build Coastguard WorkerDone
407*cfb92d14SAndroid Build Coastguard Worker```
408*cfb92d14SAndroid Build Coastguard Worker
409*cfb92d14SAndroid Build Coastguard Worker### channelmask
410*cfb92d14SAndroid Build Coastguard Worker
411*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset channelmask [channelmask]`
412*cfb92d14SAndroid Build Coastguard Worker
413*cfb92d14SAndroid Build Coastguard WorkerGet channel mask.
414*cfb92d14SAndroid Build Coastguard Worker
415*cfb92d14SAndroid Build Coastguard Worker```bash
416*cfb92d14SAndroid Build Coastguard Worker> dataset channelmask
417*cfb92d14SAndroid Build Coastguard Worker0x07fff800
418*cfb92d14SAndroid Build Coastguard WorkerDone
419*cfb92d14SAndroid Build Coastguard Worker```
420*cfb92d14SAndroid Build Coastguard Worker
421*cfb92d14SAndroid Build Coastguard WorkerSet channel mask.
422*cfb92d14SAndroid Build Coastguard Worker
423*cfb92d14SAndroid Build Coastguard Worker```bash
424*cfb92d14SAndroid Build Coastguard Worker> dataset channelmask 0x07fff800
425*cfb92d14SAndroid Build Coastguard WorkerDone
426*cfb92d14SAndroid Build Coastguard Worker```
427*cfb92d14SAndroid Build Coastguard Worker
428*cfb92d14SAndroid Build Coastguard Worker### clear
429*cfb92d14SAndroid Build Coastguard Worker
430*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset clear`
431*cfb92d14SAndroid Build Coastguard Worker
432*cfb92d14SAndroid Build Coastguard WorkerReset operational dataset buffer.
433*cfb92d14SAndroid Build Coastguard Worker
434*cfb92d14SAndroid Build Coastguard Worker```bash
435*cfb92d14SAndroid Build Coastguard Worker> dataset clear
436*cfb92d14SAndroid Build Coastguard WorkerDone
437*cfb92d14SAndroid Build Coastguard Worker```
438*cfb92d14SAndroid Build Coastguard Worker
439*cfb92d14SAndroid Build Coastguard Worker### commit
440*cfb92d14SAndroid Build Coastguard Worker
441*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset commit <active|pending>`
442*cfb92d14SAndroid Build Coastguard Worker
443*cfb92d14SAndroid Build Coastguard WorkerCommit operational dataset buffer to active/pending operational dataset.
444*cfb92d14SAndroid Build Coastguard Worker
445*cfb92d14SAndroid Build Coastguard Worker```bash
446*cfb92d14SAndroid Build Coastguard Worker> dataset commit active
447*cfb92d14SAndroid Build Coastguard WorkerDone
448*cfb92d14SAndroid Build Coastguard Worker```
449*cfb92d14SAndroid Build Coastguard Worker
450*cfb92d14SAndroid Build Coastguard Worker### delay
451*cfb92d14SAndroid Build Coastguard Worker
452*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset delay [delay]`
453*cfb92d14SAndroid Build Coastguard Worker
454*cfb92d14SAndroid Build Coastguard WorkerGet delay timer value. The timer value is in milliseconds.
455*cfb92d14SAndroid Build Coastguard Worker
456*cfb92d14SAndroid Build Coastguard Worker```bash
457*cfb92d14SAndroid Build Coastguard Worker> dataset delay
458*cfb92d14SAndroid Build Coastguard Worker1000
459*cfb92d14SAndroid Build Coastguard WorkerDone
460*cfb92d14SAndroid Build Coastguard Worker```
461*cfb92d14SAndroid Build Coastguard Worker
462*cfb92d14SAndroid Build Coastguard WorkerSet delay timer value.
463*cfb92d14SAndroid Build Coastguard Worker
464*cfb92d14SAndroid Build Coastguard Worker```bash
465*cfb92d14SAndroid Build Coastguard Worker> dataset delay 100000
466*cfb92d14SAndroid Build Coastguard WorkerDone
467*cfb92d14SAndroid Build Coastguard Worker```
468*cfb92d14SAndroid Build Coastguard Worker
469*cfb92d14SAndroid Build Coastguard Worker### extpanid
470*cfb92d14SAndroid Build Coastguard Worker
471*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset extpanid [extpanid]`
472*cfb92d14SAndroid Build Coastguard Worker
473*cfb92d14SAndroid Build Coastguard WorkerGet extended panid.
474*cfb92d14SAndroid Build Coastguard Worker
475*cfb92d14SAndroid Build Coastguard Worker```bash
476*cfb92d14SAndroid Build Coastguard Worker> dataset extpanid
477*cfb92d14SAndroid Build Coastguard Worker000db80123456789
478*cfb92d14SAndroid Build Coastguard WorkerDone
479*cfb92d14SAndroid Build Coastguard Worker```
480*cfb92d14SAndroid Build Coastguard Worker
481*cfb92d14SAndroid Build Coastguard WorkerSet extended panid.
482*cfb92d14SAndroid Build Coastguard Worker
483*cfb92d14SAndroid Build Coastguard Worker**NOTE** The commissioning credential in the dataset buffer becomes stale after changing this value. Use [pskc](#pskc) to reset.
484*cfb92d14SAndroid Build Coastguard Worker
485*cfb92d14SAndroid Build Coastguard Worker```bash
486*cfb92d14SAndroid Build Coastguard Worker> dataset extpanid 000db80123456789
487*cfb92d14SAndroid Build Coastguard WorkerDone
488*cfb92d14SAndroid Build Coastguard Worker```
489*cfb92d14SAndroid Build Coastguard Worker
490*cfb92d14SAndroid Build Coastguard Worker### init
491*cfb92d14SAndroid Build Coastguard Worker
492*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset init <active|new|pending|tlvs <hex-encoded TLVs>>`
493*cfb92d14SAndroid Build Coastguard Worker
494*cfb92d14SAndroid Build Coastguard WorkerInitialize operational dataset buffer. Use `new` to initialize with randomly selected values:
495*cfb92d14SAndroid Build Coastguard Worker
496*cfb92d14SAndroid Build Coastguard Worker```bash
497*cfb92d14SAndroid Build Coastguard Worker> dataset init new
498*cfb92d14SAndroid Build Coastguard WorkerDone
499*cfb92d14SAndroid Build Coastguard Worker```
500*cfb92d14SAndroid Build Coastguard Worker
501*cfb92d14SAndroid Build Coastguard WorkerUse `active` or `pending` to initialize the dataset buffer with a copy of the current Active Operational Dataset or Pending Operational Dataset, respectively:
502*cfb92d14SAndroid Build Coastguard Worker
503*cfb92d14SAndroid Build Coastguard Worker```bash
504*cfb92d14SAndroid Build Coastguard Worker> dataset init active
505*cfb92d14SAndroid Build Coastguard WorkerDone
506*cfb92d14SAndroid Build Coastguard Worker```
507*cfb92d14SAndroid Build Coastguard Worker
508*cfb92d14SAndroid Build Coastguard WorkerUse the `tlvs` option to initialize the dataset buffer from a string of hex-encoded TLVs:
509*cfb92d14SAndroid Build Coastguard Worker
510*cfb92d14SAndroid Build Coastguard Worker```bash
511*cfb92d14SAndroid Build Coastguard Worker> dataset init tlvs 0e080000000000010000000300001235060004001fffe002088665f03e6e42e7750708fda576e5f9a5bd8c0510506071d8391be671569e080d52870fd5030f4f70656e5468726561642d633538640102c58d04108a926cf8b13275a012ceedeeae40910d0c0402a0f7f8
512*cfb92d14SAndroid Build Coastguard WorkerDone
513*cfb92d14SAndroid Build Coastguard Worker```
514*cfb92d14SAndroid Build Coastguard Worker
515*cfb92d14SAndroid Build Coastguard Worker### meshlocalprefix
516*cfb92d14SAndroid Build Coastguard Worker
517*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset meshlocalprefix [prefix]`
518*cfb92d14SAndroid Build Coastguard Worker
519*cfb92d14SAndroid Build Coastguard WorkerGet mesh local prefix.
520*cfb92d14SAndroid Build Coastguard Worker
521*cfb92d14SAndroid Build Coastguard Worker```bash
522*cfb92d14SAndroid Build Coastguard Worker> dataset meshlocalprefix
523*cfb92d14SAndroid Build Coastguard Workerfd00:db8:0:0::/64
524*cfb92d14SAndroid Build Coastguard WorkerDone
525*cfb92d14SAndroid Build Coastguard Worker```
526*cfb92d14SAndroid Build Coastguard Worker
527*cfb92d14SAndroid Build Coastguard WorkerSet mesh local prefix.
528*cfb92d14SAndroid Build Coastguard Worker
529*cfb92d14SAndroid Build Coastguard Worker```bash
530*cfb92d14SAndroid Build Coastguard Worker> dataset meshlocalprefix fd00:db8::
531*cfb92d14SAndroid Build Coastguard WorkerDone
532*cfb92d14SAndroid Build Coastguard Worker```
533*cfb92d14SAndroid Build Coastguard Worker
534*cfb92d14SAndroid Build Coastguard Worker### mgmtgetcommand
535*cfb92d14SAndroid Build Coastguard Worker
536*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset mgmtgetcommand <active|pending> [address <destination>] [TLV list] [-x]`
537*cfb92d14SAndroid Build Coastguard Worker
538*cfb92d14SAndroid Build Coastguard WorkerSend MGMT_ACTIVE_GET or MGMT_PENDING_GET.
539*cfb92d14SAndroid Build Coastguard Worker
540*cfb92d14SAndroid Build Coastguard Worker```bash
541*cfb92d14SAndroid Build Coastguard Worker> dataset mgmtgetcommand active address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp securitypolicy
542*cfb92d14SAndroid Build Coastguard WorkerDone
543*cfb92d14SAndroid Build Coastguard Worker```
544*cfb92d14SAndroid Build Coastguard Worker
545*cfb92d14SAndroid Build Coastguard Worker### mgmtsetcommand
546*cfb92d14SAndroid Build Coastguard Worker
547*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset mgmtsetcommand <active|pending> [TLV Type list] [-x]`
548*cfb92d14SAndroid Build Coastguard Worker
549*cfb92d14SAndroid Build Coastguard WorkerSend MGMT_ACTIVE_SET or MGMT_PENDING_SET.
550*cfb92d14SAndroid Build Coastguard Worker
551*cfb92d14SAndroid Build Coastguard Worker```bash
552*cfb92d14SAndroid Build Coastguard Worker> dataset mgmtsetcommand active activetimestamp 123 securitypolicy 1 onrc 0
553*cfb92d14SAndroid Build Coastguard WorkerDone
554*cfb92d14SAndroid Build Coastguard Worker```
555*cfb92d14SAndroid Build Coastguard Worker
556*cfb92d14SAndroid Build Coastguard Worker### networkkey
557*cfb92d14SAndroid Build Coastguard Worker
558*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset networkkey [key]`
559*cfb92d14SAndroid Build Coastguard Worker
560*cfb92d14SAndroid Build Coastguard WorkerGet network key
561*cfb92d14SAndroid Build Coastguard Worker
562*cfb92d14SAndroid Build Coastguard Worker```bash
563*cfb92d14SAndroid Build Coastguard Worker> dataset networkkey
564*cfb92d14SAndroid Build Coastguard Worker00112233445566778899aabbccddeeff
565*cfb92d14SAndroid Build Coastguard WorkerDone
566*cfb92d14SAndroid Build Coastguard Worker```
567*cfb92d14SAndroid Build Coastguard Worker
568*cfb92d14SAndroid Build Coastguard WorkerSet network key.
569*cfb92d14SAndroid Build Coastguard Worker
570*cfb92d14SAndroid Build Coastguard Worker```bash
571*cfb92d14SAndroid Build Coastguard Worker> dataset networkkey 00112233445566778899aabbccddeeff
572*cfb92d14SAndroid Build Coastguard WorkerDone
573*cfb92d14SAndroid Build Coastguard Worker```
574*cfb92d14SAndroid Build Coastguard Worker
575*cfb92d14SAndroid Build Coastguard Worker### networkname
576*cfb92d14SAndroid Build Coastguard Worker
577*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset networkname [name]`
578*cfb92d14SAndroid Build Coastguard Worker
579*cfb92d14SAndroid Build Coastguard WorkerGet network name.
580*cfb92d14SAndroid Build Coastguard Worker
581*cfb92d14SAndroid Build Coastguard Worker```bash
582*cfb92d14SAndroid Build Coastguard Worker> dataset networkname
583*cfb92d14SAndroid Build Coastguard WorkerOpenThread
584*cfb92d14SAndroid Build Coastguard WorkerDone
585*cfb92d14SAndroid Build Coastguard Worker```
586*cfb92d14SAndroid Build Coastguard Worker
587*cfb92d14SAndroid Build Coastguard WorkerSet network name.
588*cfb92d14SAndroid Build Coastguard Worker
589*cfb92d14SAndroid Build Coastguard Worker**NOTE** The commissioning credential in the dataset buffer becomes stale after changing this value. Use [pskc](#pskc) to reset.
590*cfb92d14SAndroid Build Coastguard Worker
591*cfb92d14SAndroid Build Coastguard Worker```bash
592*cfb92d14SAndroid Build Coastguard Worker> dataset networkname OpenThread
593*cfb92d14SAndroid Build Coastguard WorkerDone
594*cfb92d14SAndroid Build Coastguard Worker```
595*cfb92d14SAndroid Build Coastguard Worker
596*cfb92d14SAndroid Build Coastguard Worker### panid
597*cfb92d14SAndroid Build Coastguard Worker
598*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset panid [panid]`
599*cfb92d14SAndroid Build Coastguard Worker
600*cfb92d14SAndroid Build Coastguard WorkerGet panid.
601*cfb92d14SAndroid Build Coastguard Worker
602*cfb92d14SAndroid Build Coastguard Worker```bash
603*cfb92d14SAndroid Build Coastguard Worker> dataset panid
604*cfb92d14SAndroid Build Coastguard Worker0x1234
605*cfb92d14SAndroid Build Coastguard WorkerDone
606*cfb92d14SAndroid Build Coastguard Worker```
607*cfb92d14SAndroid Build Coastguard Worker
608*cfb92d14SAndroid Build Coastguard WorkerSet panid.
609*cfb92d14SAndroid Build Coastguard Worker
610*cfb92d14SAndroid Build Coastguard Worker```bash
611*cfb92d14SAndroid Build Coastguard Worker> dataset panid 0x1234
612*cfb92d14SAndroid Build Coastguard WorkerDone
613*cfb92d14SAndroid Build Coastguard Worker```
614*cfb92d14SAndroid Build Coastguard Worker
615*cfb92d14SAndroid Build Coastguard Worker### pending
616*cfb92d14SAndroid Build Coastguard Worker
617*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset pending [-x]`
618*cfb92d14SAndroid Build Coastguard Worker
619*cfb92d14SAndroid Build Coastguard WorkerPrint Pending Operational Dataset in human-readable form.
620*cfb92d14SAndroid Build Coastguard Worker
621*cfb92d14SAndroid Build Coastguard Worker```bash
622*cfb92d14SAndroid Build Coastguard Worker> dataset pending
623*cfb92d14SAndroid Build Coastguard WorkerPending Timestamp: 2
624*cfb92d14SAndroid Build Coastguard WorkerActive Timestamp: 1
625*cfb92d14SAndroid Build Coastguard WorkerChannel: 26
626*cfb92d14SAndroid Build Coastguard WorkerChannel Mask: 0x07fff800
627*cfb92d14SAndroid Build Coastguard WorkerDelay: 58706
628*cfb92d14SAndroid Build Coastguard WorkerExt PAN ID: a74182f4d3f4de41
629*cfb92d14SAndroid Build Coastguard WorkerMesh Local Prefix: fd46:c1b9:e159:5574::/64
630*cfb92d14SAndroid Build Coastguard WorkerNetwork Key: ed916e454d96fd00184f10a6f5c9e1d3
631*cfb92d14SAndroid Build Coastguard WorkerNetwork Name: OpenThread-bff8
632*cfb92d14SAndroid Build Coastguard WorkerPAN ID: 0xbff8
633*cfb92d14SAndroid Build Coastguard WorkerPSKc: 264f78414adc683191863d968f72d1b7
634*cfb92d14SAndroid Build Coastguard WorkerSecurity Policy: 672 onrc 0
635*cfb92d14SAndroid Build Coastguard WorkerDone
636*cfb92d14SAndroid Build Coastguard Worker```
637*cfb92d14SAndroid Build Coastguard Worker
638*cfb92d14SAndroid Build Coastguard WorkerPrint Pending Operational Dataset as hex-encoded TLVs.
639*cfb92d14SAndroid Build Coastguard Worker
640*cfb92d14SAndroid Build Coastguard Worker```bash
641*cfb92d14SAndroid Build Coastguard Worker> dataset pending -x
642*cfb92d14SAndroid Build Coastguard Worker0e0800000000000100003308000000000002000034040000b512000300001a35060004001fffe00208a74182f4d3f4de410708fd46c1b9e15955740510ed916e454d96fd00184f10a6f5c9e1d3030f4f70656e5468726561642d626666380102bff80410264f78414adc683191863d968f72d1b70c0402a0f7f8
643*cfb92d14SAndroid Build Coastguard WorkerDone
644*cfb92d14SAndroid Build Coastguard Worker```
645*cfb92d14SAndroid Build Coastguard Worker
646*cfb92d14SAndroid Build Coastguard Worker### pendingtimestamp
647*cfb92d14SAndroid Build Coastguard Worker
648*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset pendingtimestamp [timestamp]`
649*cfb92d14SAndroid Build Coastguard Worker
650*cfb92d14SAndroid Build Coastguard WorkerGet pending timestamp seconds. It represents a "Unix time", in number of seconds since Jan 1st, 1970.
651*cfb92d14SAndroid Build Coastguard Worker
652*cfb92d14SAndroid Build Coastguard Worker```bash
653*cfb92d14SAndroid Build Coastguard Worker> dataset pendingtimestamp
654*cfb92d14SAndroid Build Coastguard Worker123456789
655*cfb92d14SAndroid Build Coastguard WorkerDone
656*cfb92d14SAndroid Build Coastguard Worker```
657*cfb92d14SAndroid Build Coastguard Worker
658*cfb92d14SAndroid Build Coastguard WorkerSet pending timestamp seconds.
659*cfb92d14SAndroid Build Coastguard Worker
660*cfb92d14SAndroid Build Coastguard Worker```bash
661*cfb92d14SAndroid Build Coastguard Worker> dataset pendingtimestamp 123456789
662*cfb92d14SAndroid Build Coastguard WorkerDone
663*cfb92d14SAndroid Build Coastguard Worker```
664*cfb92d14SAndroid Build Coastguard Worker
665*cfb92d14SAndroid Build Coastguard Worker### pskc
666*cfb92d14SAndroid Build Coastguard Worker
667*cfb92d14SAndroid Build Coastguard WorkerUsage: `pskc [-p] [<key>|<passphrase>]`
668*cfb92d14SAndroid Build Coastguard Worker
669*cfb92d14SAndroid Build Coastguard WorkerGet PSKc.
670*cfb92d14SAndroid Build Coastguard Worker
671*cfb92d14SAndroid Build Coastguard Worker```bash
672*cfb92d14SAndroid Build Coastguard Worker> dataset pskc
673*cfb92d14SAndroid Build Coastguard Worker67c0c203aa0b042bfb5381c47aef4d9e
674*cfb92d14SAndroid Build Coastguard WorkerDone
675*cfb92d14SAndroid Build Coastguard Worker```
676*cfb92d14SAndroid Build Coastguard Worker
677*cfb92d14SAndroid Build Coastguard WorkerSet PSKc.
678*cfb92d14SAndroid Build Coastguard Worker
679*cfb92d14SAndroid Build Coastguard WorkerWith `-p`(**only for FTD**) generate PSKc from \<passphrase\> (UTF-8 encoded) together with network name and extended PAN ID in the dataset buffer if set or values in the current stack if not, otherwise set PSKc as \<key\> (hex format).
680*cfb92d14SAndroid Build Coastguard Worker
681*cfb92d14SAndroid Build Coastguard Worker```bash
682*cfb92d14SAndroid Build Coastguard Worker> dataset pskc 67c0c203aa0b042bfb5381c47aef4d9e
683*cfb92d14SAndroid Build Coastguard WorkerDone
684*cfb92d14SAndroid Build Coastguard Worker> dataset pskc -p 123456
685*cfb92d14SAndroid Build Coastguard WorkerDone
686*cfb92d14SAndroid Build Coastguard Worker```
687*cfb92d14SAndroid Build Coastguard Worker
688*cfb92d14SAndroid Build Coastguard Worker### securitypolicy
689*cfb92d14SAndroid Build Coastguard Worker
690*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset securitypolicy [<rotationtime> [onrcCepR] [versionthreshold]]`
691*cfb92d14SAndroid Build Coastguard Worker
692*cfb92d14SAndroid Build Coastguard WorkerGet security policy.
693*cfb92d14SAndroid Build Coastguard Worker
694*cfb92d14SAndroid Build Coastguard Worker```bash
695*cfb92d14SAndroid Build Coastguard Worker> dataset securitypolicy
696*cfb92d14SAndroid Build Coastguard Worker672 onrc 0
697*cfb92d14SAndroid Build Coastguard WorkerDone
698*cfb92d14SAndroid Build Coastguard Worker```
699*cfb92d14SAndroid Build Coastguard Worker
700*cfb92d14SAndroid Build Coastguard WorkerSet security policy.
701*cfb92d14SAndroid Build Coastguard Worker
702*cfb92d14SAndroid Build Coastguard Worker- o: Obtaining the Network Key for out-of-band commissioning is enabled.
703*cfb92d14SAndroid Build Coastguard Worker- n: Native Commissioning using PSKc is allowed.
704*cfb92d14SAndroid Build Coastguard Worker- r: Thread 1.x Routers are enabled.
705*cfb92d14SAndroid Build Coastguard Worker- c: External Commissioner authentication is allowed using PSKc.
706*cfb92d14SAndroid Build Coastguard Worker- C: Thread 1.2 Commercial Commissioning is enabled.
707*cfb92d14SAndroid Build Coastguard Worker- e: Thread 1.2 Autonomous Enrollment is enabled.
708*cfb92d14SAndroid Build Coastguard Worker- p: Thread 1.2 Network Key Provisioning is enabled.
709*cfb92d14SAndroid Build Coastguard Worker- R: Non-CCM routers are allowed in Thread 1.2 CCM networks.
710*cfb92d14SAndroid Build Coastguard Worker
711*cfb92d14SAndroid Build Coastguard WorkerIf the `versionthreshold` parameter is not provided, a default value of zero is assumed.
712*cfb92d14SAndroid Build Coastguard Worker
713*cfb92d14SAndroid Build Coastguard Worker```bash
714*cfb92d14SAndroid Build Coastguard Worker> dataset securitypolicy 672 onrc 0
715*cfb92d14SAndroid Build Coastguard WorkerDone
716*cfb92d14SAndroid Build Coastguard Worker```
717*cfb92d14SAndroid Build Coastguard Worker
718*cfb92d14SAndroid Build Coastguard Worker### set
719*cfb92d14SAndroid Build Coastguard Worker
720*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset set <active|pending> <dataset>`
721*cfb92d14SAndroid Build Coastguard Worker
722*cfb92d14SAndroid Build Coastguard WorkerSet the Active Operational Dataset using hex-encoded TLVs.
723*cfb92d14SAndroid Build Coastguard Worker
724*cfb92d14SAndroid Build Coastguard Worker```bash
725*cfb92d14SAndroid Build Coastguard Worker> dataset set active 0e080000000000010000000300000f35060004001fffe0020839758ec8144b07fb0708fdf1f1add0797dc00510f366cec7a446bab978d90d27abe38f23030f4f70656e5468726561642d353933380102593804103ca67c969efb0d0c74a4d8ee923b576c0c0402a0f7f8
726*cfb92d14SAndroid Build Coastguard WorkerDone
727*cfb92d14SAndroid Build Coastguard Worker```
728*cfb92d14SAndroid Build Coastguard Worker
729*cfb92d14SAndroid Build Coastguard WorkerSet the Pending Operational Dataset using hex-encoded TLVs.
730*cfb92d14SAndroid Build Coastguard Worker
731*cfb92d14SAndroid Build Coastguard Worker```bash
732*cfb92d14SAndroid Build Coastguard Worker> dataset set pending 0e0800000000000100003308000000000002000034040000b512000300001a35060004001fffe00208a74182f4d3f4de410708fd46c1b9e15955740510ed916e454d96fd00184f10a6f5c9e1d3030f4f70656e5468726561642d626666380102bff80410264f78414adc683191863d968f72d1b70c0402a0f7f8
733*cfb92d14SAndroid Build Coastguard WorkerDone
734*cfb92d14SAndroid Build Coastguard Worker```
735*cfb92d14SAndroid Build Coastguard Worker
736*cfb92d14SAndroid Build Coastguard Worker### tlvs
737*cfb92d14SAndroid Build Coastguard Worker
738*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset tlvs`
739*cfb92d14SAndroid Build Coastguard Worker
740*cfb92d14SAndroid Build Coastguard WorkerConvert the Operational Dataset to hex-encoded TLVs.
741*cfb92d14SAndroid Build Coastguard Worker
742*cfb92d14SAndroid Build Coastguard Worker```bash
743*cfb92d14SAndroid Build Coastguard Worker> dataset
744*cfb92d14SAndroid Build Coastguard WorkerActive Timestamp: 1
745*cfb92d14SAndroid Build Coastguard WorkerChannel: 22
746*cfb92d14SAndroid Build Coastguard WorkerChannel Mask: 0x07fff800
747*cfb92d14SAndroid Build Coastguard WorkerExt PAN ID: d196fa2040e973b6
748*cfb92d14SAndroid Build Coastguard WorkerMesh Local Prefix: fdbb:c310:c48f:3a39::/64
749*cfb92d14SAndroid Build Coastguard WorkerNetwork Key: 9929154dbc363218bcd22f907caf5c15
750*cfb92d14SAndroid Build Coastguard WorkerNetwork Name: OpenThread-de2b
751*cfb92d14SAndroid Build Coastguard WorkerPAN ID: 0xde2b
752*cfb92d14SAndroid Build Coastguard WorkerPSKc: 15b2c16f7ba92ed4bc7b1ee054f1553f
753*cfb92d14SAndroid Build Coastguard WorkerSecurity Policy: 672 onrc 0
754*cfb92d14SAndroid Build Coastguard WorkerDone
755*cfb92d14SAndroid Build Coastguard Worker
756*cfb92d14SAndroid Build Coastguard Worker> dataset tlvs
757*cfb92d14SAndroid Build Coastguard Worker0e080000000000010000000300001635060004001fffe00208d196fa2040e973b60708fdbbc310c48f3a3905109929154dbc363218bcd22f907caf5c15030f4f70656e5468726561642d646532620102de2b041015b2c16f7ba92ed4bc7b1ee054f1553f0c0402a0f7f8
758*cfb92d14SAndroid Build Coastguard WorkerDone
759*cfb92d14SAndroid Build Coastguard Worker```
760*cfb92d14SAndroid Build Coastguard Worker
761*cfb92d14SAndroid Build Coastguard Worker### updater
762*cfb92d14SAndroid Build Coastguard Worker
763*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset updater`
764*cfb92d14SAndroid Build Coastguard Worker
765*cfb92d14SAndroid Build Coastguard WorkerRequires `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE`.
766*cfb92d14SAndroid Build Coastguard Worker
767*cfb92d14SAndroid Build Coastguard WorkerIndicate whether there is an ongoing Operation Dataset update request.
768*cfb92d14SAndroid Build Coastguard Worker
769*cfb92d14SAndroid Build Coastguard Worker```bash
770*cfb92d14SAndroid Build Coastguard Worker> dataset updater
771*cfb92d14SAndroid Build Coastguard WorkerEnabled
772*cfb92d14SAndroid Build Coastguard Worker```
773*cfb92d14SAndroid Build Coastguard Worker
774*cfb92d14SAndroid Build Coastguard Worker### updater start
775*cfb92d14SAndroid Build Coastguard Worker
776*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset updater start`
777*cfb92d14SAndroid Build Coastguard Worker
778*cfb92d14SAndroid Build Coastguard WorkerRequires `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE`.
779*cfb92d14SAndroid Build Coastguard Worker
780*cfb92d14SAndroid Build Coastguard WorkerRequest network to update its Operation Dataset to the current operational dataset buffer.
781*cfb92d14SAndroid Build Coastguard Worker
782*cfb92d14SAndroid Build Coastguard WorkerThe current operational dataset buffer should contain the fields to be updated with their new values. It must not contain Active or Pending Timestamp fields. The Delay field is optional. If not provided, a default value (1000 ms) is used.
783*cfb92d14SAndroid Build Coastguard Worker
784*cfb92d14SAndroid Build Coastguard Worker```bash
785*cfb92d14SAndroid Build Coastguard Worker> channel
786*cfb92d14SAndroid Build Coastguard Worker19
787*cfb92d14SAndroid Build Coastguard WorkerDone
788*cfb92d14SAndroid Build Coastguard Worker
789*cfb92d14SAndroid Build Coastguard Worker> dataset clear
790*cfb92d14SAndroid Build Coastguard WorkerDone
791*cfb92d14SAndroid Build Coastguard Worker> dataset channel 15
792*cfb92d14SAndroid Build Coastguard WorkerDone
793*cfb92d14SAndroid Build Coastguard Worker> dataset
794*cfb92d14SAndroid Build Coastguard WorkerChannel: 15
795*cfb92d14SAndroid Build Coastguard WorkerDone
796*cfb92d14SAndroid Build Coastguard Worker
797*cfb92d14SAndroid Build Coastguard Worker> dataset updater start
798*cfb92d14SAndroid Build Coastguard WorkerDone
799*cfb92d14SAndroid Build Coastguard Worker> dataset updater
800*cfb92d14SAndroid Build Coastguard WorkerEnabled
801*cfb92d14SAndroid Build Coastguard WorkerDone
802*cfb92d14SAndroid Build Coastguard Worker
803*cfb92d14SAndroid Build Coastguard WorkerDataset update complete: OK
804*cfb92d14SAndroid Build Coastguard Worker
805*cfb92d14SAndroid Build Coastguard Worker> channel
806*cfb92d14SAndroid Build Coastguard Worker15
807*cfb92d14SAndroid Build Coastguard WorkerDone
808*cfb92d14SAndroid Build Coastguard Worker```
809*cfb92d14SAndroid Build Coastguard Worker
810*cfb92d14SAndroid Build Coastguard Worker### updater cancel
811*cfb92d14SAndroid Build Coastguard Worker
812*cfb92d14SAndroid Build Coastguard WorkerUsage: `dataset updater cancel`
813*cfb92d14SAndroid Build Coastguard Worker
814*cfb92d14SAndroid Build Coastguard WorkerRequires `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE`.
815*cfb92d14SAndroid Build Coastguard Worker
816*cfb92d14SAndroid Build Coastguard WorkerCancels an ongoing (if any) Operational Dataset update request.
817*cfb92d14SAndroid Build Coastguard Worker
818*cfb92d14SAndroid Build Coastguard Worker```bash
819*cfb92d14SAndroid Build Coastguard Worker> dataset updater start
820*cfb92d14SAndroid Build Coastguard WorkerDone
821*cfb92d14SAndroid Build Coastguard Worker> dataset updater
822*cfb92d14SAndroid Build Coastguard WorkerEnabled
823*cfb92d14SAndroid Build Coastguard WorkerDone
824*cfb92d14SAndroid Build Coastguard Worker>
825*cfb92d14SAndroid Build Coastguard Worker> dataset updater cancel
826*cfb92d14SAndroid Build Coastguard WorkerDone
827*cfb92d14SAndroid Build Coastguard Worker> dataset updater
828*cfb92d14SAndroid Build Coastguard WorkerDisabled
829*cfb92d14SAndroid Build Coastguard WorkerDone
830*cfb92d14SAndroid Build Coastguard Worker```
831