Initial commit

This commit is contained in:
Jonathan Hui
2016-05-10 22:49:53 -07:00
commit 4f9945c533
1335 changed files with 616850 additions and 0 deletions
+460
View File
@@ -0,0 +1,460 @@
# OpenThread CLI Reference
The OpenThread CLI exposes configuration and management APIs via a
command line interface. This CLI may be used to play with OpenThread
and may be used along side additional application code. The
OpenThread test scripts use this CLI to execute test cases.
## OpenThread Command List
* [channel](#channel)
* [childtimeout](#childtimeout)
* [contextreusedelay](#contextreusedelay)
* [extaddr](#extaddr)
* [extpanid](#extpanid)
* [ipaddr](#ipaddr)
* [keysequence](#keysequence)
* [leaderweight](#leaderweight)
* [masterkey](#masterkey)
* [mode](#mode)
* [netdataregister](#netdataregister)
* [networkidtimeout](#networkidtimeout)
* [networkname](#networkname)
* [panid](#panid)
* [ping](#ping)
* [prefix](#prefix)
* [releaserouterid](#releaserouterid)
* [rloc16](#rloc16)
* [route](#route)
* [routerupgradethreshold](#routerupgradethreshold)
* [start](#start)
* [state](#state)
* [stop](#stop)
* [whitelist](#whitelist)
## OpenThread Command Details
### channel
Get the IEEE 802.15.4 Channel value.
```bash
$ channel
11
Done
```
### channel \<channel\>
Set the IEEE 802.15.4 Channel value.
```bash
$ channel 11
Done
```
### childtimeout
Get the Thread Child Timeout value.
```bash
$ childtimeout
300
Done
```
### childtimeout \<timeout\>
Set the Thread Child Timeout value.
```bash
$ childtimeout 300
Done
```
### contextreusedelay
Get the CONTEXT_ID_REUSE_DELAY value.
```bash
$ contextreusedelay
11
Done
```
### contextreusedelay \<delay\>
Set the CONTEXT_ID_REUSE_DELAY value.
```bash
$ contextreusedelay 11
Done
```
### extaddr
Get the IEEE 802.15.4 Extended Address.
```bash
$ extaddr
0xdead00beef00cafe
Done
```
### extpanid
Get the Thread Extended PAN ID value.
```bash
$ extpanid
0xdead00beef00cafe
Done
```
### extpanid \<extpanid\>
Set the Thread Extended PAN ID value.
```bash
$ extpanid dead00beef00cafe
Done
```
### ipaddr
List all IPv6 addresses assigned to the Thread interface.
```bash
$ ipaddr
fdde:ad00:beef:0:0:ff:fe00:0
fe80:0:0:0:0:ff:fe00:0
fdde:ad00:beef:0:558:f56b:d688:799
fe80:0:0:0:f3d9:2a82:c8d8:fe43
Done
```
### ipaddr add \<ipaddr\>
Add an IPv6 address to the Thread interface.
```bash
$ ipaddr add 2001::dead:beef:cafe
Done
```
### ipaddr del \<ipaddr\>
Add an IPv6 address to the Thread interface.
```bash
$ ipaddr del 2001::dead:beef:cafe
Done
```
### keysequence
Get the Thread Key Sequence.
```bash
$ keysequence
10
Done
```
### keysequence \<keysequence\>
Set the Thread Key Sequence.
```bash
$ keysequence 10
Done
```
### leaderweight
Get the Thread Leader Weight.
```bash
$ leaderweight
128
Done
```
### leaderweight \<weight\>
Set the Thread Leader Weight.
```bash
$ leaderweight 128
Done
```
### masterkey
Get the Thread Master Key value.
```bash
$ masterkey
00112233445566778899aabbccddeeff
Done
```
### masterkey \<key\>
Set the Thread Master Key value.
```bash
$ masterkey 00112233445566778899aabbccddeeff
Done
```
### mode
Get the Thread Device Mode value.
* r: rx-on-when-idle
* s: Secure IEEE 802.15.4 Data Requests
* d: Full Function Device
* n: Full Network Data
```bash
$ mode
rsdn
Done
```
### mode [rsdn]
Set the Thread Device Mode value.
* r: rx-on-when-idle
* s: Secure IEEE 802.15.4 Data Requests
* d: Full Function Device
* n: Full Network Data
```bash
$ mode rsdn
Done
```
### netdataregister
Register local network data with Thread Leader.
```bash
$ netdataregister
Done
```
### networkidtimeout
Get the NETWORK_ID_TIMEOUT parameter used in the Router role.
```bash
$ networkidtimeout
120
Done
```
### networkidtimeout \<timeout\>
Set the NETWORK_ID_TIMEOUT parameter used in the Router role.
```bash
$ networkidtimeout 120
Done
```
### networkname
Get the Thread Network Name.
```bash
$ networkname
OpenThread
Done
```
### networkname \<name\>
Set the Thread Network Name.
```bash
$ networkname OpenThread
Done
```
### panid
Get the IEEE 802.15.4 PAN ID value.
```bash
$ panid
0xdead
Done
```
### panid \<panid\>
Set the IEEE 802.15.4 PAN ID value.
```bash
$ panid 0xdead
Done
```
### ping \<ipaddr\> [size]
Send an ICMPv6 Echo Request.
```bash
$ ping fdde:ad00:beef:0:558:f56b:d688:799
16 bytes from fdde:ad00:beef:0:558:f56b:d688:799: icmp_seq=1 hlim=64
```
### prefix add \<prefix\> [pvdcsr] [prf]
Add a valid prefix to the Network Data.
* p: Stateless IPv6 Address Autoconfiguration Preferred flag
* v: Stateless IPv6 Address Autoconfiguration Valid flag
* d: DHCPv6 IPv6 Address Configuration flag
* c: DHCPv6 Other Configuration flag
* s: Stable flag
* r: Default Route flag
* prf: Default router preference. An integer in the range [-1, 1]
```bash
$ prefix add 2001:dead:beef:cafe::/64 pvsr 0
Done
```
### prefix remove \<prefix\>
Invalidate a prefix in the network data.
```bash
$ prefix remove 2001:dead:beef:cafe::/64
Done
```
### releaserouterid \<routerid\>
Release a Router ID that has been allocated by the device in the Leader role.
```bash
$ releaserouterid 16
Done
```
### rloc16
Get the Thread RLOC16 value.
```bash
$ rloc16
0xdead
Done
```
### route add \<prefix\> [s] [prf]
Add a valid prefix to the Network Data.
* s: Stable flag
* r: Default Route flag
* prf: Default router preference. An integer in the range [-1, 1]
```bash
$ route add 2001:dead:beef:cafe::/64 pvsr 0
Done
```
### route remove \<prefix\>
Invalidate a prefix in the network data.
```bash
$ route remove 2001:dead:beef:cafe::/64
Done
```
### routerupgradethreshold
Get the ROUTER_UPGRADE_THRESHOLD value.
```bash
$ routerupgradethreshold
16
Done
```
### routerupgradethreshold \<threshold\>
Set the ROUTER_UPGRADE_THRESHOLD value.
```bash
$ routerupgradethreshold 16
Done
```
### start
Enable OpenThread.
```bash
$ start
Done
```
### stop
Disable OpenThread.
```bash
$ stop
Done
```
### whitelist add \<extaddr\>
Add an IEEE 802.15.4 Extended Address to the whitelist.
```bash
$ whitelist add dead00beef00cafe
Done
```
### whitelist clear
Clear all entries from the whitelist.
```bash
$ whitelist clear
Done
```
### whitelist disable
Disable MAC whitelist filtering.
```bash
$ whitelist disable
Done
```
### whitelist enable
Enable MAC whitelist filtering.
```bash
$ whitelist enable
Done
```
### whitelist remove \<extaddr\>
Add an IEEE 802.15.4 Extended Address to the whitelist.
```bash
$ whitelist add dead00beef00cafe
Done
```