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.
- channel
- childtimeout
- contextreusedelay
- extaddr
- extpanid
- ipaddr
- keysequence
- leaderweight
- masterkey
- mode
- netdataregister
- networkidtimeout
- networkname
- panid
- ping
- prefix
- releaserouterid
- rloc16
- route
- routerupgradethreshold
- start
- state
- stop
- whitelist
Get the IEEE 802.15.4 Channel value.
$ channel
11
DoneSet the IEEE 802.15.4 Channel value.
$ channel 11
DoneGet the Thread Child Timeout value.
$ childtimeout
300
DoneSet the Thread Child Timeout value.
$ childtimeout 300
DoneGet the CONTEXT_ID_REUSE_DELAY value.
$ contextreusedelay
11
DoneSet the CONTEXT_ID_REUSE_DELAY value.
$ contextreusedelay 11
DoneGet the IEEE 802.15.4 Extended Address.
$ extaddr
0xdead00beef00cafe
DoneGet the Thread Extended PAN ID value.
$ extpanid
0xdead00beef00cafe
DoneSet the Thread Extended PAN ID value.
$ extpanid dead00beef00cafe
DoneList all IPv6 addresses assigned to the Thread interface.
$ 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
DoneAdd an IPv6 address to the Thread interface.
$ ipaddr add 2001::dead:beef:cafe
DoneAdd an IPv6 address to the Thread interface.
$ ipaddr del 2001::dead:beef:cafe
DoneGet the Thread Key Sequence.
$ keysequence
10
DoneSet the Thread Key Sequence.
$ keysequence 10
DoneGet the Thread Leader Weight.
$ leaderweight
128
DoneSet the Thread Leader Weight.
$ leaderweight 128
DoneGet the Thread Master Key value.
$ masterkey
00112233445566778899aabbccddeeff
DoneSet the Thread Master Key value.
$ masterkey 00112233445566778899aabbccddeeff
DoneGet 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
$ mode
rsdn
DoneSet 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
$ mode rsdn
DoneRegister local network data with Thread Leader.
$ netdataregister
DoneGet the NETWORK_ID_TIMEOUT parameter used in the Router role.
$ networkidtimeout
120
DoneSet the NETWORK_ID_TIMEOUT parameter used in the Router role.
$ networkidtimeout 120
DoneGet the Thread Network Name.
$ networkname
OpenThread
DoneSet the Thread Network Name.
$ networkname OpenThread
DoneGet the IEEE 802.15.4 PAN ID value.
$ panid
0xdead
DoneSet the IEEE 802.15.4 PAN ID value.
$ panid 0xdead
DoneSend an ICMPv6 Echo Request.
$ ping fdde:ad00:beef:0:558:f56b:d688:799
16 bytes from fdde:ad00:beef:0:558:f56b:d688:799: icmp_seq=1 hlim=64Add 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]
$ prefix add 2001:dead:beef:cafe::/64 pvsr 0
DoneInvalidate a prefix in the network data.
$ prefix remove 2001:dead:beef:cafe::/64
DoneRelease a Router ID that has been allocated by the device in the Leader role.
$ releaserouterid 16
DoneGet the Thread RLOC16 value.
$ rloc16
0xdead
DoneAdd 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]
$ route add 2001:dead:beef:cafe::/64 pvsr 0
DoneInvalidate a prefix in the network data.
$ route remove 2001:dead:beef:cafe::/64
DoneGet the ROUTER_UPGRADE_THRESHOLD value.
$ routerupgradethreshold
16
DoneSet the ROUTER_UPGRADE_THRESHOLD value.
$ routerupgradethreshold 16
DoneEnable OpenThread.
$ start
DoneDisable OpenThread.
$ stop
DoneAdd an IEEE 802.15.4 Extended Address to the whitelist.
$ whitelist add dead00beef00cafe
DoneClear all entries from the whitelist.
$ whitelist clear
DoneDisable MAC whitelist filtering.
$ whitelist disable
DoneEnable MAC whitelist filtering.
$ whitelist enable
DoneAdd an IEEE 802.15.4 Extended Address to the whitelist.
$ whitelist add dead00beef00cafe
Done