The OpenThread CLI exposes configuration and management APIs via a command line interface. Use the CLI to play with OpenThread, which can also be used with additional application code. The OpenThread test scripts use the CLI to execute test cases.
The whitespace character (' ') is used to delimit the command name and the different arguments, together with tab ('\t') and new line characters ('\r', '\n').
Some arguments might require to accept whitespaces on them. For those cases the backslash character ('\') can be used to escape separators or the backslash itself.
Example:
> networkname Test\ Network
Done
> networkname
Test Network
Done
>- attachtime
- ba
- batracker
- bbr
- br
- bufferinfo
- ccathreshold
- channel
- child
- childip
- childmax
- childsupervision
- childtimeout
- coap
- coaps
- coex
- commissioner
- contextreusedelay
- counters
- csl
- dataset
- debug
- delaytimermin
- detach
- deviceprops
- diag
- discover
- dns
- domainname
- dua
- eidcache
- eui64
- extaddr
- extpanid
- factoryreset
- fake
- fem
- history
- ifconfig
- instanceid
- ipaddr
- ipmaddr
- joiner
- joinerport
- keysequence
- leaderdata
- leaderweight
- linkmetrics
- linkmetricsmgr
- locate
- log
- mac
- macfilter
- mdns
- meshdiag
- mliid
- mlr
- mode
- multiradio
- nat64
- neighbor
- netdata
- netstat
- networkdiagnostic
- networkidtimeout
- networkkey
- networkname
- networktime
- nexthop
- p2p
- panid
- parent
- parentpriority
- partitionid
- ping
- platform
- pollperiod
- preferrouterid
- prefix
- promiscuous
- pskc
- pskcref
- radio
- radiofilter
- rcp
- region
- releaserouterid
- reset
- rloc16
- route
- router
- routerdowngradethreshold
- routereligible
- routerselectionjitter
- routerupgradethreshold
- childrouterlinks
- scan
- service
- singleton
- sntp
- state
- srp
- targetpower
- tcat
- tcp
- test
- thread
- timeinqueue
- trel
- tvcheck
- txpower
- udp
- unsecureport
- uptime
- vendor
- verhoeff
- version
- wakeup
Prints the attach time (duration since device was last attached).
Duration is formatted as {hh}:{mm}:{ss} for hours, minutes, and seconds if it is less than one day. If the duration is longer than one day, the format is {dd}d.{hh}:{mm}:{ss}.
> attachtime
01:38:25
DoneShow current Primary Backbone Router information for Thread 1.2 device.
> bbr
BBR Primary:
server16: 0xE400
seqno: 10
delay: 120 secs
timeout: 300 secs
Done> bbr
BBR Primary: None
DoneConfigure the response status for DUA.req with meshLocalIid in payload. Without meshLocalIid, simply respond any coming DUA.req next with the specified status or COAP code.
Only for testing/reference device.
known status value:
- 0: ST_DUA_SUCCESS
- 1: ST_DUA_REREGISTER
- 2: ST_DUA_INVALID
- 3: ST_DUA_DUPLICATE
- 4: ST_DUA_NO_RESOURCES
- 5: ST_DUA_BBR_NOT_PRIMARY
- 6: ST_DUA_GENERAL_FAILURE
- 160: COAP code 5.00
> bbr mgmt dua 1 2f7c235e5025a2fd
Done
> bbr mgmt dua 160
DoneShow the Multicast Listeners.
Only for testing/reference Backbone Router device.
> bbr mgmt mlr listener
ff04:0:0:0:0:0:0:abcd 3534000
ff04:0:0:0:0:0:0:eeee 3537610
DoneAdd a Multicast Listener with a given IPv6 multicast address and timeout (in seconds).
Only for testing/reference Backbone Router device.
> bbr mgmt mlr listener add ff04::1
Done
> bbr mgmt mlr listener add ff04::2 300
Done
> bbr mgmt mlr listener
ff04:0:0:0:0:0:0:2 261
ff04:0:0:0:0:0:0:1 3522
DoneRemoves all the Multicast Listeners.
Only for testing/reference Backbone Router device.
> bbr mgmt mlr listener clear
Done
> bbr mgmt mlr listener
DoneConfigure the response status for the next MLR.req.
Only for testing/reference device.
Known status values:
- 0: ST_MLR_SUCCESS
- 2: ST_MLR_INVALID
- 3: ST_MLR_NO_PERSISTENT
- 4: ST_MLR_NO_RESOURCES
- 5: ST_MLR_BBR_NOT_PRIMARY
- 6: ST_MLR_GENERAL_FAILURE
> bbr mgmt mlr response 2
DoneShow local Backbone state ([Disabled,Primary, Secondary]) for Thread 1.2 FTD.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr state
Disabled
Done
> bbr state
Primary
Done
> bbr state
Secondary
DoneEnable Backbone Router Service for Thread 1.2 FTD. SRV_DATA.ntf would be triggered for attached device if there is no Backbone Router Service in Thread Network Data.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr enable
DoneDisable Backbone Router Service for Thread 1.2 FTD. SRV_DATA.ntf would be triggered if Backbone Router is Primary state. o OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr disable
DoneRegister Backbone Router Service for Thread 1.2 FTD. SRV_DATA.ntf would be triggered for attached device.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr register
DoneShow local Backbone Router configuration for Thread 1.2 FTD.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr config
seqno: 10
delay: 120 secs
timeout: 300 secs
DoneConfigure local Backbone Router configuration for Thread 1.2 FTD. bbr register should be issued explicitly to register Backbone Router service to Leader for Secondary Backbone Router. SRV_DATA.ntf would be initiated automatically if BBR Dataset changes for Primary Backbone Router.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr config seqno 20 delay 30
DoneShow jitter (in seconds) for Backbone Router registration for Thread 1.2 FTD.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr jitter
20
DoneSet jitter (in seconds) for Backbone Router registration for Thread 1.2 FTD.
OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE is required.
> bbr jitter 10
DoneShow current Border Agent information.
Enables Border Agent service.
By default, the Border Agent service is enabled. The ba enable and ba disable allow user to explicitly control its state. This can be useful in scenarios such as:
- The user wishes to delay the start of the Border Agent service (and its mDNS advertisement of the
_meshcop._udpservice on the infrastructure link). This allows time to prepare or determine vendor-specific TXT data entries for inclusion. - Unit tests or test scripts might disable the Border Agent service to prevent it from interfering with specific test steps. For example, tests validating mDNS or DNS-SD functionality may disable the Border Agent to prevent its registration of the MeshCoP service.
> ba enable
Done
Disables Border Agent service.
> ba disable
Done
Print Border Agent's service port.
> ba port
49152
DonePrint Border Agent's state.
Possible states are
Disabled: Border Agent service is disabled.Inactive: Border Agent service is enabled but not yet active.Active: Border Agent service is enabled and active. External commissioner can connect and establish secure DTLS sessions with the Border Agent using PSKc
> ba state
Active
DoneSets the base name to construct the service instance name used when advertising the mDNS _meshcop._udp service by the Border Agent.
Requires the OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_ENABLE feature.
The name can also be configured using the OPENTHREAD_CONFIG_BORDER_AGENT_MESHCOP_SERVICE_BASE_NAME configuration option (which is the recommended way to specify this name). This CLI command (and its corresponding API) is provided for projects where the name needs to be set after device initialization and at run-time.
Per the Thread specification, the service instance should be a user-friendly name identifying the device model or product. A recommended format is "VendorName ProductName". To construct the full name and ensure name uniqueness, the OpenThread Border Agent module will append the Extended Address of the device (as 16-character hex digits) to the given base name. Note that the same name will be used for the ephemeral key service _meshcop-e._udp when the ephemeral key feature is enabled and used.
ba servicebasename OpenThreadBorderAgent
DonePrints the list of Border Agent's sessions. Information per session:
- Peer socket address (IPv6 address and port).
- Whether or not the session is connected.
- Whether or not the session is accepted as full commissioner.
- Session lifetime in milliseconds (calculated from the time the session was first established).
ba sessions
[fe80:0:0:0:cc79:2a29:d311:1aea]:9202 connected:yes commissioner:no lifetime:1860
DoneForcefully evicts the current active Thread Commissioner.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_COMMISSIONER_EVICTION_API_ENABLE.
This command is intended as an administrator tool to address a misbehaving or stale commissioner session that may be connected through a different Border Agent. It provides a mechanism to clear the single Active Commissioner role within the Thread network, allowing a new candidate to be selected as the Active commissioner.
> ba evictcommissioner
DonePrint the Border Agent's Ephemeral Key Manager state.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
Possible states are
Disabled: Ephemeral Key Manager is disabled.Stopped: Enabled but no key is in use (not yet set or started).Started: Ephemeral key is set. Listening to accept secure connections from commissioner candidates.Connected: Secure session is established with an external commissioner candidate. Not yet accepted as full commissioner.Accepted: Secure session is established and external candidate is accepted as full commissioner.
> ba ephemeralkey
Stopped
Done
> ba ephemeralkey start Z10X20g3J15w1000P60m16 1000
Done
> ba ephemeralkey
Started
DoneEnables the Border agent's Ephemeral Key Manager.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
> ba ephemeralkey enable
DoneDisables the Border Agent's Ephemeral Key Manager.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
> ba ephemeralkey disable
Done
> ba ephemeralkey
Disabled
DoneStarts using an ephemeral key for a given timeout duration.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
An ephemeral key can only be set when current state is Stopped, i.e., it is enabled but not yet started. This means that setting the ephemeral key again while a previously set key is still in use will fail. Callers can stop the previous key using ba ephemeralkey stop before starting with a new key.
The Ephemeral Key Manager and the Border Agent service (which uses PSKc) can be enabled and used in parallel, as they use independent and separate DTLS transport and sessions.
The keystring string is directly used as the ephemeral PSK (excluding the trailing null \0 character). Its length MUST be between 6 and 32, inclusive.
The timeout is in milliseconds. If not provided or set to zero, the default value of 2 minutes will be used. If the timeout value is larger than 10 minutes, the 10 minutes timeout value will be used instead.
The port specifies the UDP port to use with the ephemeral key. If UDP port is zero or is not provided, an ephemeral port will be used. ba ephemeralkey port will give the current UDP port in use.
When successfully set, the ephemeral key can be used only once by an external commissioner candidate to establish a secure session. After the commissioner candidate disconnects, the use of the ephemeral key is stopped. If the timeout expires, the use of the ephemeral key is stopped, and any connected session using the key is immediately disconnected.
The Ephemeral Key Manager limits the number of failed DTLS connections to 10 attempts. After the 10th failed attempt, the use of the ephemeral key is automatically stopped (even if the timeout has not yet expired).
> ba ephemeralkey start Z10X20g3J15w1000P60m16 5000 1234
Done
> ba ephemeralkey
Started
Done
> ba ephemeralkey port
1234
DoneStops the ephemeral key use and disconnects any session using it.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
If there is no ephemeral key in use, calling this function has no effect.
> ba ephemeralkey stop
DonePrint the port number in use by Ephemeral Key Manager.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
> ba ephemeralkey port
1234
DoneEnables callback from Border Agent to be notified of state changes of Border Agent's Ephemeral Key Manager.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
> ba ephemeralkey callback enable
Done
> ba ephemeralkey start W10X120 5000 49155
Done
BorderAgentEphemeralKey callback - state:Started
BorderAgentEphemeralKey callback - state:Connected
BorderAgentEphemeralKey callback - state:StoppedDisables callback from Border Agent to be notified of state changes of Border Agent's Ephemeral Key Manager.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE.
> ba ephemeralkey callback disable
DoneGenerates a cryptographically secure random Thread Administration One-Time Passcode (TAP) string.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE and OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.
The TAP is a string of 9 characters, generated as a sequence of eight cryptographically secure random numeric digits [0-9] followed by a single check digit determined using the Verhoeff algorithm.
Note that this command simply generates and outputs a TAP. It does not start ephemeral key use with this TAP on the Border Agent.
> ba ephemeralkey generate-tap
989710128
DoneValidates a given Thread Administration One-Time Passcode (TAP) string.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE and OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.
Validates that the TAP string has the proper length, contains digit characters [0-9], and validates the Verhoeff checksum.
> ba ephemeralkey validate-tap 989710128
validated
DoneGet the border agent counter values.
Note that it requires OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE to output the ePSKc counters.
> ba counters
epskcActivation: 2
epskcApiDeactivation: 1
epskcTimeoutDeactivation: 1
epskcMaxAttemptDeactivation: 0
epskcDisconnectDeactivation: 0
epskcInvalidBaStateError: 1
epskcInvalidArgsError: 1
epskcStartSecureSessionError: 0
epskcSecureSessionSuccess: 0
epskcSecureSessionFailure: 0
epskcCommissionerPetition: 0
pskcSecureSessionSuccess: 0
pskcSecureSessionFailure: 0
pskcCommissionerPetition: 0
mgmtActiveGet: 0
mgmtPendingGet: 0
DoneEnables or disables Border Agent Admitter function, or outputs its status.
All ba admitter sub-commands requires OPENTHREAD_CONFIG_BORDER_AGENT_ADMITTER_ENABLE in addition to OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE.
> ba admitter
Disabled
Done
> ba admitter enable
Done
> ba admitter
Enabled
DoneOutputs the state of Border Agent Admitter.
> ba admitter state
enabled: yes
is-prime: yes
is-active-commissioner: yes
is-petition-rejected: no
DoneGets or sets the Border Agent Admitter Joiner UDP port.
> ba admitter joinerudpport
1000
Done
> ba admitter joinerudpport 1001
DoneOutputs the list of enrollers and accepted joiners per enroller.
> ba admitter enrollers
Enroller - id: phone01275ABC
steering-data: [0042008000000000]
mode: 0xc0
msec-since-registered: 10478
Joiner - iid: a5d2e4f0c8b1937e
msec-since-accepted: 3299
msec-till-expiration: 418852
DoneEnables Border Agent Tracker.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE.
When enabled, the tracker browses for the _meshcop._udp mDNS service to discover and track Border Agents on the infra-if network.
> batracker enable
DoneDisables Border Agent Tracker.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE.
> batracker disable
Done
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE.
Shows the state of Border Agent Tracker, running or inactive.
The tracker can be enabled by the user (e.g., via batracker enable) or by the OpenThread stack itself. The tracker is considered running if it is enabled by either entity and the underlying DNS-SD (mDNS) is ready.
> batracker state
running
DoneRequires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE.
Outputs the list of discovered Border Agents. Information per Agent:
- Service name
- Port number
- Host name
- TXT data (parsed human-readable information, or raw key/value pairs)
- Host addresses
- Milliseconds since agent was first discovered
- Milliseconds since the last change to agent info (port, addresses, TXT data)
By default, if OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE is enabled, the TXT data is parsed and displayed in a human-readable format.
The optional rawtxt argument forces the output of TXT data in its raw format (key/value pairs), even when the parser is enabled. If the parser is disabled, the raw format is always used.
> batracker agents
ServiceName: OTBR-by-Google-a7215b46a4f1fd
Port: 49154
Host: otbe345eefb12f7f9c
TxtData:
RecordVersion: 1
AgentId: e12f639deb66987e11a7215cd123
ThreadVersion: 1.4.0
NetworkName: ota7215b46a4f1fd
ExtendedPanId: 16dd92d88a32e63f
ActiveTimestamp: 1771558107
PartitionId: 0x10930b04
DomainName: DefaultDomain
BbrSeqNum: 23
BbrPort: 61631
OmrPrefix: fd70:ad65:47d9:1::/64
ExtAddress: 8e5d342e265b279c
VendorName: Google
ModelName: OTBR
StateBitmap:
ConnMode: pskc
ThreadIfState: active
Availability: high
ThreadRole: leader
BbrIsActive: yes
BbrIsPrimary: yes
EpskcSupported: yes
MultiAilState: not-detected
AdmitterSupported: yes
Address(es):
fd7c:af54:fada:4dcc:6aec:8aff:fe0d:e90b
MilliSecondsSinceDiscovered: 3523
MilliSecondsSinceLastChange: 3523
Done> batracker agents rawtxt
ServiceName: OTBR-by-Google-be345eefb12f7f9c
Port: 49152
Host: otbe345eefb12f7f9c
TxtData:
id=4b21d3f4a431725048380698f3073a4b
rv=31
nn=4f70656e546872656164
xp=dead00beef00cafe
tv=312e342e30
xa=be345eefb12f7f9c
sb=00000820
dn=44656661756c74446f6d61696e
Address(es):
fe80:0:0:0:108f:3188:ff96:8e9f
fd7c:af54:fada:564d:7:fd6e:744c:e300
fd7c:af54:fada:564d:d9:899d:1217:9e2
MilliSecondsSinceDiscovered: 5237
MilliSecondsSinceLastChange: 5237
DoneShow the current message buffer information.
- The
totalshows total number of message buffers in pool. - The
freeshows the number of free message buffers. - The
max-usedshows the maximum number of used buffers at the same time since OT stack initialization or lastbufferinfo reset. - This is then followed by info about different queues used by OpenThread stack, each line representing info about a queue.
- The first number shows number messages in the queue.
- The second number shows number of buffers used by all messages in the queue.
- The third number shows total number of bytes of all messages in the queue.
> bufferinfo
total: 40
free: 40
max-used: 5
6lo send: 0 0 0
6lo reas: 0 0 0
ip6: 0 0 0
mpl: 0 0 0
mle: 0 0 0
coap: 0 0 0
coap secure: 0 0 0
application coap: 0 0 0
DoneReset the message buffer counter tracking maximum number buffers in use at the same time.
> bufferinfo reset
DoneGet the CCA threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
> ccathreshold
-75 dBm
DoneSet the CCA threshold measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
> ccathreshold -62
DoneGet the IEEE 802.15.4 Channel value.
> channel
11
DoneSet the IEEE 802.15.4 Channel value.
> channel 11
DoneGet channel manager state.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE is required.
channel: 11
auto: 1
delay: 120
interval: 10800
supported: { 11-26}
favored: { 11-26}
DoneInitiate a channel change with the channel manager.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE is required.
> channel manager change 11
channel manager change 11
DoneRequest a channel selection with the channel manager.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE are required.
> channel manager select 1
channel manager select 1
DoneEnable/disable the auto-channel-selection functionality.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE are required.
> channel manager auto 1
channel manager auto 1
DoneSet the channel change delay (in seconds).
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE are required.
> channel manager delay 120
channel manager delay 120
DoneSet the auto-channel-selection interval (in seconds).
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE are required.
> channel manager interval 10800
channel manager interval 10800
DoneSet the supported channel mask for the auto-channel-selection.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE are required.
> channel manager supported 0x7fffc00
channel manager supported 0x7fffc00
DoneSet the favored channel mask for the auto-channel-selection.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE are required.
> channel manager favored 0x7fffc00
channel manager favored 0x7fffc00
DoneGet current channel monitor state and channel occupancy.
OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE is required.
> channel monitor
channel monitor
enabled: 1
interval: 41000
threshold: -75
window: 960
count: 10552
occupancies:
ch 11 (0x0cb7) 4.96% busy
ch 12 (0x2e2b) 18.03% busy
ch 13 (0x2f54) 18.48% busy
ch 14 (0x0fef) 6.22% busy
ch 15 (0x1536) 8.28% busy
ch 16 (0x1746) 9.09% busy
ch 17 (0x0b8b) 4.50% busy
ch 18 (0x60a7) 37.75% busy
ch 19 (0x0810) 3.14% busy
ch 20 (0x0c2a) 4.75% busy
ch 21 (0x08dc) 3.46% busy
ch 22 (0x101d) 6.29% busy
ch 23 (0x0092) 0.22% busy
ch 24 (0x0028) 0.06% busy
ch 25 (0x0063) 0.15% busy
ch 26 (0x058c) 2.16% busy
DoneStart the channel monitor.
OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE is required.
> channel monitor start
channel monitor start
DoneStop the channel monitor.
OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE is required.
> channel monitor stop
channel monitor stop
DoneGet preferred channel mask.
> channel preferred
0x7fff800
DoneGet supported channel mask.
> channel supported
0x7fff800
DoneList attached Child IDs.
> child list
1 2 3 6 7 8
DonePrint table of attached children.
> child table
| ID | RLOC16 | Timeout | Age | LQ In | C_VN |R|D|N|Ver|CSL|QMsgCnt|Suprvsn| Extended MAC |
+-----+--------+------------+------------+-------+------+-+-+-+---+---+-------+-------+------------------+
| 1 | 0xc801 | 240 | 24 | 3 | 131 |1|0|0| 3| 0 | 0 | 129 | 4ecede68435358ac |
| 2 | 0xc802 | 240 | 2 | 3 | 131 |0|0|0| 3| 1 | 0 | 0 | a672a601d2ce37d8 |
DonePrint diagnostic information for an attached Thread Child. The id may be a Child ID or an RLOC16.
> child 1
Child ID: 1
Rloc: 9c01
Ext Addr: e2b3540590b0fd87
Mode: rn
CSL Synchronized: 1
Net Data: 184
Timeout: 100
Age: 0
Link Quality In: 3
RSSI: -20
Supervision Interval: 129
DoneGet the list of IP addresses stored for MTD children.
> childip
3401: fdde:ad00:beef:0:3037:3e03:8c5f:bc0c
DoneGet the maximum number of IP addresses that each MTD child may register with this device as parent.
> childip max
4
DoneSet the maximum number of IP addresses that each MTD child may register with this device as parent. 0 to clear the setting and restore the default.
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is required.
> childip max 2
DoneGet the Thread maximum number of allowed children.
> childmax
5
DoneSet the Thread maximum number of allowed children.
> childmax 2
DoneGet the Child Supervision interval value on the child.
Child Supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child within the supervision interval. If there is no transmission to the child within the supervision interval, OpenThread enqueues and sends a Child Supervision Message to the child.
> childsupervision interval
30
DoneSet the Child Supervision interval value on the child.
> childsupervision interval 30
DoneGet the Child Supervision Check Timeout value on the child.
If the device is a sleepy child and it does not hear from its parent within the specified check timeout, it initiates the re-attach process (MLE Child Update Request/Response exchange with its parent).
> childsupervision checktimeout
30
DoneSet the Child Supervision Check Timeout value on the child.
> childsupervision checktimeout 30
DoneGet the current value of supervision check timeout failure counter.
The counter tracks the number of supervision check failures on the child. It is incremented when the child does not hear from its parent within the specified check timeout interval.
> childsupervision failcounter
0
DoneReset the supervision check timeout failure counter to zero.
> childsupervision failcounter reset
DoneGet the Thread Child Timeout value.
> childtimeout
300
DoneSet the Thread Child Timeout value.
> childtimeout 300
DoneGet the coex status.
OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is required.
> coex
Enabled
DoneDisable coex.
OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is required.
> coex disable
DoneEnable coex.
OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is required.
> coex enable
DoneShow coex metrics.
OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is required.
> coex metrics
Stopped: false
Grant Glitch: 0
Transmit metrics
Request: 0
Grant Immediate: 0
Grant Wait: 0
Grant Wait Activated: 0
Grant Wait Timeout: 0
Grant Deactivated During Request: 0
Delayed Grant: 0
Average Request To Grant Time: 0
Receive metrics
Request: 0
Grant Immediate: 0
Grant Wait: 0
Grant Wait Activated: 0
Grant Wait Timeout: 0
Grant Deactivated During Request: 0
Delayed Grant: 0
Average Request To Grant Time: 0
Grant None: 0
DoneGet the CONTEXT_ID_REUSE_DELAY value.
> contextreusedelay
11
DoneSet the CONTEXT_ID_REUSE_DELAY value.
> contextreusedelay 11
DoneGet the supported counter names.
> counters
br
ip
mac
mle
DoneGet the counter value.
Note:
OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLEis required forcounters br
> counters mac
TxTotal: 10
TxUnicast: 3
TxBroadcast: 7
TxAckRequested: 3
TxAcked: 3
TxNoAckRequested: 7
TxData: 10
TxDataPoll: 0
TxBeacon: 0
TxBeaconRequest: 0
TxOther: 0
TxRetry: 0
TxErrCca: 0
TxErrBusyChannel: 0
RxTotal: 2
RxUnicast: 1
RxBroadcast: 1
RxData: 2
RxDataPoll: 0
RxBeacon: 0
RxBeaconRequest: 0
RxOther: 0
RxAddressFiltered: 0
RxDestAddrFiltered: 0
RxDuplicated: 0
RxErrNoFrame: 0
RxErrNoUnknownNeighbor: 0
RxErrInvalidSrcAddr: 0
RxErrSec: 0
RxErrFcs: 0
RxErrOther: 0
Done
> counters mle
Role Disabled: 0
Role Detached: 1
Role Child: 0
Role Router: 0
Role Leader: 1
Attach Attempts: 1
Partition Id Changes: 1
Better Partition Attach Attempts: 0
Better Parent Attach Attempts: 0
Parent Changes: 0
Time Disabled Milli: 10026
Time Detached Milli: 6852
Time Child Milli: 0
Time Router Milli: 0
Time Leader Milli: 16195
Time Tracked Milli: 33073
Done
> counters ip
TxSuccess: 10
TxFailed: 0
RxSuccess: 5
RxFailed: 0
Done
> counters br
Inbound Unicast: Packets 4 Bytes 320
Inbound Multicast: Packets 0 Bytes 0
Outbound Unicast: Packets 2 Bytes 160
Outbound Multicast: Packets 0 Bytes 0
RA Rx: 4
RA TxSuccess: 2
RA TxFailed: 0
RS Rx: 0
RS TxSuccess: 2
RS TxFailed: 0
DoneReset the counter value.
> counters mac reset
Done
> counters mle reset
Done
> counters ip reset
DoneGet the CSL configuration.
CSL period is shown in microseconds.
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is required.
> csl
channel: 11
period: 160000us
timeout: 1000s
DoneSet CSL channel.
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is required.
> csl channel 20
DoneSet CSL period in microseconds. Disable CSL by setting this parameter to 0.
The CSL period MUST be a multiple 160 microseconds which is 802.15.4 "ten symbols time".
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is required.
> csl period 30000000
DoneSet the CSL timeout in seconds.
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is required.
> csl timeout 10
DoneGets the CSL Accuracy in units of PPM.
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE or OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE is required.
> csl accuracy
20
DoneGets the CSL Uncertainty in units of 10 us.
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE or OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE is required.
> csl uncertainty
10
DoneExecutes a series of CLI commands to gather information about the device and thread network. This is intended for debugging.
The output will display each executed CLI command preceded by "$", followed by the corresponding command's generated output.
The generated output encompasses the following information:
- Version
- Current state
- Uptime and attach time
- Channel
- PAN IDs, extended MAC address, and RLOC16
- Unicast and multicast IPv6 address list
- Network Data
- Partition ID
- Leader Data
- Buffer info
- Network statistics
- IP, MAC, and MLE counters
If the device is operating as FTD:
- Child table, child IP addresses
- Neighbor table (including connection time)
- Router table
- EID cache
If the device supports and acts as an SRP client:
- SRP client state
- SRP client services and host info
If the device supports and acts as an SRP sever:
- SRP server state and address mode
- SRP server registered hosts and services
If the device supports and acts as a border router:
- BR state
- OMR prefixes
- On-link prefixes
- RDNSS table
- Discovered routers, and peer BRs
- DHCPv6 PD state and OMR prefix
- BR counters
If the device supports TREL:
- TREL status, peer table, and counters
If the device supports NAT64:
- NAT64 state, mappings, and counters
If the device supports History Tracker:
- Network info, neighbor, router, prefix, and route history
Get the minimal delay timer (in seconds).
> delaytimermin
30
DoneSet the minimal delay timer (in seconds).
> delaytimermin 60
DoneStart the graceful detach process by first notifying other nodes (sending Address Release if acting as a router, or setting Child Timeout value to zero on parent if acting as a child) and then stopping Thread protocol operation.
> detach
Finished detaching
DoneStart the graceful detach process similar to the detach command without blocking and waiting for the callback indicating that detach is finished.
> detach async
DoneGet the current device properties.
> deviceprops
PowerSupply : external
IsBorderRouter : yes
SupportsCcm : no
IsUnstable : no
WeightAdjustment : 0
DoneSet the device properties which are then used to determine and set the Leader Weight.
- power-supply:
battery,external,external-stable, orexternal-unstable. - weight-adjustment: Valid range is from -16 to +16. Clamped if not within the range.
> deviceprops battery 0 0 0 -5
Done
> deviceprops
PowerSupply : battery
IsBorderRouter : no
SupportsCcm : no
IsUnstable : no
WeightAdjustment : -5
Done
> leaderweight
51
DonePerform an MLE Discovery operation.
- channel: The channel to discover on. If no channel is provided, the discovery will cover all valid channels.
> discover
| J | Network Name | Extended PAN | PAN | MAC Address | Ch | dBm | LQI |
+---+------------------+------------------+------+------------------+----+-----+-----+
| 0 | OpenThread | dead00beef00cafe | ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 |
DoneGet the default query config used by DNS client.
The config includes
- Server IPv6 address and port
- Response timeout in msec (wait time to rx response)
- Maximum tx attempts before reporting failure
- Boolean flag to indicate whether the server can resolve the query recursively or not.
- Service resolution mode which specifies which records to query. Possible options are:
srv: Query for SRV record only.txt: Query for TXT record only.srv_txt: Query for both SRV and TXT records in the same message.srv_txt_sep: Query in parallel for SRV and TXT using separate messages.srv_txt_opt: Query for TXT/SRV together first, if it fails then query separately.
- Whether to allow/disallow NAT64 address translation during address resolution (requires
OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE) - Transport protocol UDP or TCP (requires
OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE)
> dns config
Server: [fd00:0:0:0:0:0:0:1]:1234
ResponseTimeout: 5000 ms
MaxTxAttempts: 2
RecursionDesired: no
ServiceMode: srv_txt_opt
Nat64Mode: allow
TransportProtocol: udp
Done
>dns config [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)] [service mode] [protocol]
Set the default query config.
Service mode specifies which records to query. Possible options are:
def: Use default option.srv: Query for SRV record only.txt: Query for TXT record only.srv_txt: Query for both SRV and TXT records in the same message.srv_txt_sep: Query in parallel for SRV and TXT using separate messages.srv_txt_opt: Query for TXT/SRV together first, if it fails then query separately.
To set protocol effectively to tcp OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE is required.
> dns config fd00::1 1234 5000 2 0 srv_txt_sep tcp
Done
> dns config
Server: [fd00:0:0:0:0:0:0:1]:1234
ResponseTimeout: 5000 ms
MaxTxAttempts: 2
RecursionDesired: no
ServiceMode: srv_txt_sep
Nat64Mode: allow
TransportProtocol: tcp
DoneWe can leave some of the fields as unspecified (or use value zero). The unspecified fields are replaced by the corresponding OT config option definitions OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_{} to form the default query config.
> dns config fd00::2
Done
> dns config
Server: [fd00:0:0:0:0:0:0:2]:53
ResponseTimeout: 6000 ms
MaxTxAttempts: 3
RecursionDesired: yes
Nat64Mode: allow
TransportProtocol: udp
DoneThis final example shows how only 'recursion desired' and the service mode are set, and all other parameters are set to their defaults:
> dns config :: 0 0 0 1 srv_txt_sep
Done
> dns config
Server: [2001:4860:4860:0:0:0:0:8888]:53
ResponseTimeout: 6000 ms
MaxTxAttempts: 3
RecursionDesired: yes
ServiceMode: srv_txt_sep
Nat64Mode: allow
TransportProtocol: udp
Donedns resolve <hostname> [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)] [transport protocol]
Send DNS Query to obtain IPv6 address for given hostname.
The parameters after hostname are optional. Any unspecified (or zero) value for these optional parameters is replaced by the value from the current default config (dns config).
To use tcp, OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE is required.
> dns resolve ipv6.google.com
> DNS response for ipv6.google.com - 2a00:1450:401b:801:0:0:0:200e TTL: 300The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data.
Note: The command will return
InvalidStatewhen the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable.
> dns resolve example.com 8.8.8.8
Synthesized IPv6 DNS server address: fdde:ad00:beef:2:0:0:808:808
DNS response for example.com. - fd4c:9574:3720:2:0:0:5db8:d822 TTL:20456
Donedns resolve4 <hostname> [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)]
Send DNS query to obtain IPv4 address for a given hostname and provide the NAT64 synthesized IPv6 addresses for the IPv4 addresses from the query response.
Requires OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE.
The parameters after hostname are optional. Any unspecified (or zero) value for these optional parameters is replaced by the value from the current default config (dns config).
This command requires a NAT64 prefix to be configured and present in Thread Network Data.
For example, if a NAT64 prefix of 2001:db8:122:344::/96 is used within the Thread mesh, the outputted IPv6 address corresponds to an IPv4 address of 142.250.191.78 for the ipv4.google.com host:
> dns resolve4 ipv4.google.com
> DNS response for ipv4.google.com - 2001:db8:122:344:0:0:8efa:bf4e TTL: 20456dns browse <service-name> [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)]
Send a browse (service instance enumeration) DNS query to get the list of services for given service-name.
The parameters after service-name are optional. Any unspecified (or zero) value for these optional parameters is replaced by the value from the current default config (dns config).
> dns browse _service._udp.example.com
DNS browse response for _service._udp.example.com.
inst1
inst2
inst3
DoneThe detailed service info (port number, weight, host name, TXT data, host addresses) is outputted only when provided by server/resolver in the browse response (in additional Data Section). This is a SHOULD and not a MUST requirement, and servers/resolvers are not required to provide this.
The recommended behavior, which is supported by the OpenThread DNS-SD resolver, is to only provide the additional data when there is a single instance in the response. However, users should assume that the browse response may only contain the list of matching service instances and not any detail service info. To resolve a service instance, users can use the dns service or dns servicehost commands.
> dns browse _service._udp.example.com
DNS browse response for _service._udp.example.com.
inst1
Port:1234, Priority:1, Weight:2, TTL:7200
Host:host.example.com.
HostAddress:fd00:0:0:0:0:0:0:abcd TTL:7200
TXT:[a=6531, b=6c12] TTL:7300
Done> dns browse _airplay._tcp.default.service.arpa
DNS browse response for _airplay._tcp.default.service.arpa.
Gabe's Mac mini
Port:7000, Priority:0, Weight:0, TTL:10
Host:Gabes-Mac-mini.default.service.arpa.
HostAddress:fd97:739d:386a:1:1c2e:d83c:fcbe:9cf4 TTL:10
DoneNote: The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return
InvalidStatewhen the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. When testing DNS-SD discovery proxy, the zone is notlocaland instead should bedefault.service.arpa.
dns service <service-instance-label> <service-name> [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)]
Send a service instance resolution DNS query for a given service instance. Service instance label is provided first, followed by the service name (note that service instance label can contain dot '.' character).
The parameters after service-name are optional. Any unspecified (or zero) value for these optional parameters is replaced by the value from the current default config (dns config).
Note: The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return
InvalidStatewhen the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable.
dns servicehost <service-instance-label> <service-name> [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)]
Send a service instance resolution DNS query for a given service instance with a potential follow-up address resolution for the host name discovered for the service instance (if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query).
Service instance label is provided first, followed by the service name (note that service instance label can contain dot '.' character).
The parameters after service-name are optional. Any unspecified (or zero) value for these optional parameters is replaced by the value from the current default config (dns config).
dns query <record-type> <first-label> <next-labels> [DNS server IP] [DNS server port] [response timeout (ms)] [max tx attempts] [recursion desired (boolean)]
Requires OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE and OPENTHREAD_CONFIG_DNS_CLIENT_ARBITRARY_RECORD_QUERY_ENABLE.
Sends a DNS query for a given record type and DNS name. DNS name is provided as a first label, followed by the next labels which are dot '.' separated. Note that the first label can itself contain the dot '.' character.
The record-type is a numerical value corresponding to the DNS RRType values.
The parameters after next-labels are optional. Any unspecified (or zero) value for these optional parameters is replaced by the value from the current default config (dns config).
If record type is PTR (12), CNAME (5), DNAME (39), NS (2), or SRV (33), the record data in the received response contains a DNS name which may use DNS name compression. For these specific record types, the record data is first decompressed such that it contains the full uncompressed DNS name. This decompressed data is then provided in the output. For all other record types, the record data is read and provided as it appears in the received response message.
> dns query 25 myhost default.service.arpa.
DNS query response for myhost.default.service.arpa.
0)
RecordType:25, RecordLength: 32, TTL:7108, Section:answer
Name:myhost.default.service.arpa.
RecordData:[001900010000e02d00440201030d4983605c0406803deb2d672cc42224773977]
DoneEnable/Disable the upstream DNS feature. If no argument is provided, it prints whether the upstream DNS feature is enabled.
OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE is required.
Enable the upstream DNS feature.
> dns server upstream enable
Done
Get whether the upstream DNS feature is enabled.
> dns server upstream
Enabled
Done
Enable/Disable the "DNS name compression" mode.
By default, DNS name compression is enabled. When disabled, DNS names are appended in full and are never compressed. This applies to OpenThread's DNS and SRP client/server modules.
DNS name compression cannot be disabled if the OpenThread mDNS module is enabled. Enabling the mDNS module will automatically enable name compression if it was previously disabled. Attempting to disable compression while the mDNS module is active will fail.
This is intended for testing only and requires OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE.
Get the current "DNS name compression" mode.
> dns compression
Enabled
Set the "DNS name compression" mode.
> dns compression disable
Done
>
>
> dns compression
Disabled
Done
Get the Thread Domain Name for Thread 1.2 device.
> domainname
Thread
DoneSet the Thread Domain Name for Thread 1.2 device.
> domainname Test\ Thread
DoneGet the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device.
> dua iid
0004000300020001
DoneSet the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device.
> dua iid 0004000300020001
DoneClear the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device.
> dua iid clear
DonePrint the EID-to-RLOC cache entries.
> eidcache
fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d 2000 cache canEvict=1 transTime=0 eid=fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d
fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7f fffe retry canEvict=1 timeout=10 retryDelay=30
DoneGet the factory-assigned IEEE EUI-64.
> eui64
0615aae900124b00
DoneGet the IEEE 802.15.4 Extended Address.
> extaddr
dead00beef00cafe
DoneSet the IEEE 802.15.4 Extended Address.
> extaddr dead00beef00cafe
dead00beef00cafe
DoneGet the Thread Extended PAN ID value.
NOTE The current commissioning credential becomes stale after changing this value. Use pskc to reset.
> extpanid
dead00beef00cafe
DoneSet the Thread Extended PAN ID value.
> extpanid dead00beef00cafe
DoneDelete all stored settings, and signal a platform reset.
> factoryresetSend fake Thread messages.
Note: Only for certification test.
> fake /a/an fdde:ad00:beef:0:0:ff:fe00:a800 fd00:7d03:7d03:7d03:55f2:bb6a:7a43:a03b 1111222233334444
DoneGet external FEM parameters.
> fem
LNA gain 11 dBm
DoneGet the Rx LNA gain in dBm of the external FEM.
> fem lnagain
11
DoneSet the Rx LNA gain in dBm of the external FEM.
> fem lnagain 8
DoneShow the status of the IPv6 interface.
> ifconfig
down
DoneBring up the IPv6 interface.
> ifconfig up
DoneBring down the IPv6 interface.
> ifconfig down
DoneShow OpenThread instance identifier.
> instanceid
468697314
DoneList all IPv6 addresses assigned to the Thread interface.
> ipaddr
fdde:ad00:beef:0:0:ff:fe00:0
fdde:ad00:beef:0:558:f56b:d688:799
fe80:0:0:0:f3d9:2a82:c8d8:fe43
DoneUse -v to get more verbose information about the address:
origin: can bethread,slaac,dhcp6, ormanual, and indicates the origin of the addressplen: prefix length (in bits)preferred: preferred flag (boolean)valid: valid flag (boolean)
> ipaddr -v
fd5e:18fa:f4a5:b8:0:ff:fe00:fc00 origin:thread plen:64 preferred:0 valid:1
fd5e:18fa:f4a5:b8:0:ff:fe00:dc00 origin:thread plen:64 preferred:0 valid:1
fd5e:18fa:f4a5:b8:f8e:5d95:87a0:e82c origin:thread plen:64 preferred:0 valid:1
fe80:0:0:0:4891:b191:e277:8826 origin:thread plen:64 preferred:1 valid:1
DoneAdd an IPv6 address to the Thread interface.
> ipaddr add 2001::dead:beef:cafe
DoneDelete an IPv6 address from the Thread interface.
> ipaddr del 2001::dead:beef:cafe
DonePrint Thread link-local IPv6 address.
> ipaddr linklocal
fe80:0:0:0:f3d9:2a82:c8d8:fe43
DonePrint Thread Mesh Local EID address.
> ipaddr mleid
fdde:ad00:beef:0:558:f56b:d688:799
DonePrint Thread Routing Locator (RLOC) address.
> ipaddr rloc
fdde:ad00:beef:0:0:ff:fe00:0
DoneList all IPv6 multicast addresses subscribed to the Thread interface.
> ipmaddr
ff05:0:0:0:0:0:0:1
ff33:40:fdde:ad00:beef:0:0:1
ff32:40:fdde:ad00:beef:0:0:1
DoneSubscribe the Thread interface to the IPv6 multicast address.
> ipmaddr add ff05::1
DoneUnsubscribe the Thread interface to the IPv6 multicast address.
> ipmaddr del ff05::1
DoneGet the Link-Local All Thread Nodes multicast address.
> ipmaddr llatn
ff32:40:fdde:ad00:beef:0:0:1
Done
Get the Realm-Local All Thread Nodes multicast address.
> ipmaddr rlatn
ff33:40:fdde:ad00:beef:0:0:1
Done
Set the Joiner port.
> joinerport 1000
DoneGet the Thread Key Sequence Counter.
> keysequence counter
10
DoneSet the Thread Key Sequence Counter.
This command is reserved for testing and demo purposes only. Changing Key Sequence Counter will render a production application non-compliant with the Thread Specification.
> keysequence counter 10
DoneGet Thread Key Switch Guard Time (in hours)
> keysequence guardtime
0
DoneSet Thread Key Switch Guard Time (in hours).
This command is reserved for testing and demo purposes only. Changing Key Switch Guard Time will render a production application non-compliant with the Thread Specification.
> keysequence guardtime 0
DoneShow the Thread Leader Data.
> leaderdata
Partition ID: 1077744240
Weighting: 64
Data Version: 109
Stable Data Version: 211
Leader Router ID: 60
DoneGet the Thread Leader Weight.
> leaderweight
128
DoneSet the Thread Leader Weight.
> leaderweight 128
DoneSend a Link Metrics Management Request to clear an Enhanced-ACK Based Probing.
- async: Use the non-blocking mode.
- ipaddr: Peer address (SHOULD be link local address of the neighboring device).
> linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack clear
Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: Success
Done
> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack clear
Done
> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: SuccessSend a Link Metrics Management Request to register an Enhanced-ACK Based Probing.
- async: Use the non-blocking mode.
- ipaddr: Peer address.
- qmr: This specifies what metrics to query. At most two options are allowed to select (per spec 4.11.3.4.4.6).
- q: Layer 2 LQI.
- m: Link Margin.
- r: RSSI.
- r: This is optional and only used for reference devices. When this option is specified, Type/Average Enum of each Type Id Flags would be set to
reserved. This is used to verify the Probing Subject correctly handles invalid Type Id Flags. This is only available whenOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLEis enabled.
> linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm
Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: Success
Done
> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm
Done
> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: Success
> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm r
Done
> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: Cannot support new seriesSend a Link Metrics Management Request to configure a Forward Tracking Series.
- async: Use the non-blocking mode.
- ipaddr: Peer address.
- seriesid: The Series ID.
- ldraX: This specifies which frames are to be accounted.
- l: MLE Link Probe.
- d: MAC Data.
- r: MAC Data Request.
- a: MAC Ack.
- X: This represents none of the above flags, i.e., to stop accounting and remove the series. This can only be used without any other flags.
- pqmr: This specifies what metrics to query.
- p: Layer 2 Number of PDUs received.
- q: Layer 2 LQI.
- m: Link Margin.
- r: RSSI.
> linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 forward 1 dra pqmr
Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: SUCCESS
Done
> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 forward 1 dra pqmr
Done
> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2
Status: SUCCESSSend a MLE Link Probe message to the peer.
- ipaddr: Peer address.
- seriesid: The Series ID for which this Probe message targets at.
- length: The length of the Probe message, valid range: [0, 64].
> linkmetrics probe fe80:0:0:0:3092:f334:1455:1ad2 1 10
DonePerform a Link Metrics query (Single Probe).
- async: Use the non-blocking mode.
- ipaddr: Peer address.
- pqmr: This specifies what metrics to query.
- p: Layer 2 Number of PDUs received.
- q: Layer 2 LQI.
- m: Link Margin.
- r: RSSI.
> linkmetrics request fe80:0:0:0:3092:f334:1455:1ad2 single qmr
Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2
- LQI: 76 (Exponential Moving Average)
- Margin: 82 (dB) (Exponential Moving Average)
- RSSI: -18 (dBm) (Exponential Moving Average)
Done
> linkmetrics request async fe80:0:0:0:3092:f334:1455:1ad2 single qmr
Done
> Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2
- LQI: 76 (Exponential Moving Average)
- Margin: 82 (dB) (Exponential Moving Average)
- RSSI: -18 (dBm) (Exponential Moving Average)Perform a Link Metrics query (Forward Tracking Series).
- sync: Use the blocking mode.
- ipaddr: Peer address.
- seriesid: The Series ID.
> linkmetrics request fe80:0:0:0:3092:f334:1455:1ad2 forward 1
Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2
- PDU Counter: 2 (Count/Summation)
- LQI: 76 (Exponential Moving Average)
- Margin: 82 (dB) (Exponential Moving Average)
- RSSI: -18 (dBm) (Exponential Moving Average)
Done
> linkmetrics request async fe80:0:0:0:3092:f334:1455:1ad2 forward 1
Done
> Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2
- PDU Counter: 2 (Count/Summation)
- LQI: 76 (Exponential Moving Average)
- Margin: 82 (dB) (Exponential Moving Average)
- RSSI: -18 (dBm) (Exponential Moving Average)Disable the Link Metrics Manager.
OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE is required.
> linkmetricsmgr disable
DoneEnable the Link Metrics Manager.
OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE is required.
> linkmetricsmgr enable
DoneDisplay the Link Metrics data of all subjects. The subjects are identified by its extended address.
OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE is required.
> linkmetricsmgr show
ExtAddr:827aa7f7f63e1234, LinkMargin:80, Rssi:-20
DoneGets the current state (In Progress or Idle) of anycast locator.
OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE is required.
> locate
Idle
Done
> locate fdde:ad00:beef:0:0:ff:fe00:fc10
> locate
In Progress
DoneLocate the closest destination of an anycast address (i.e., find the destination's mesh local EID and RLOC16).
OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE is required.
The closest destination is determined based on the the current routing table and path costs within the Thread mesh.
Locate the leader using its anycast address:
> locate fdde:ad00:beef:0:0:ff:fe00:fc00
fdde:ad00:beef:0:d9d3:9000:16b:d03b 0xc800
DoneLocate the closest destination of a service anycast address:
> srp server enable
Done
> netdata show
Prefixes:
Routes:
Services:
44970 5d c002 s c800
44970 5d c002 s cc00
Done
> locate fdde:ad00:beef:0:0:ff:fe00:fc10
fdde:ad00:beef:0:a477:dc98:a4e4:71ea 0xcc00
done- Note: Simulation Only, ie:
OPENTHREAD_EXAMPLES_SIMULATION - Requires
OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
Specifies filename to capture otPlatLog() messages, useful when debugging automated test scripts on Linux when logging disrupts the automated test scripts.
Get the log level.
> log level
1
DoneSet the log level.
> log level 4
DoneDiscover network topology (list of routers and their connections).
This command requires OPENTHREAD_CONFIG_MESH_DIAG_ENABLE and OPENTHREAD_FTD.
Parameters are optional and indicate additional items to discover. Can be added in any order.
ip6-addrsto discover the list of IPv6 addresses of every router.childrento discover the child table of every router.
Output lists all discovered routers. Information per router:
- Router ID
- RLOC16
- Extended MAC address
- Thread Version (if known).
- Whether the router is this device is itself (
me) - Whether the router is the parent of this device when device is a child (
parent) - Whether the router is
leader - Whether the router acts as a border router providing external connectivity (
br) - List of routers to which this router has a link:
3-links: Router IDs to which this router has a incoming link with link quality 32-links: Router IDs to which this router has a incoming link with link quality 21-links: Router IDs to which this router has a incoming link with link quality 1- If a list if empty, it is omitted in the out.
- If
ip6-addrs, list of IPv6 addresses of the router - If
children, list of all children of the router. Information per child:- RLOC16
- Incoming Link Quality from perspective of parent to child (zero indicates unknown)
- Child Device mode (
rrx-on-when-idle,dFull Thread Device,nFull Network Data,-no flags set) - Whether the child is this device itself (
me) - Whether the child acts as a border router providing external connectivity (
br)
Discover network topology:
> meshdiag topology
id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - me - leader
3-links:{ 46 }
id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4
3-links:{ 02 51 57 }
id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4
3-links:{ 51 57 }
id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4
3-links:{ 33 57 }
2-links:{ 46 }
id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4
3-links:{ 46 51 }
1-links:{ 33 }
DoneDiscover network topology with router's IPv6 addresses and children:
> meshdiag topology children ip6-addrs
id:62 rloc16:0xf800 ext-addr:ce349873897233a5 ver:4 - me - br
3-links:{ 46 }
ip6-addrs:
fdde:ad00:beef:0:0:ff:fe00:f800
fdde:ad00:beef:0:211d:39e9:6b2e:4ad1
fe80:0:0:0:cc34:9873:8972:33a5
children: none
id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - leader - br
3-links:{ 46 51 }
ip6-addrs:
fdde:ad00:beef:0:0:ff:fe00:fc00
fdde:ad00:beef:0:0:ff:fe00:800
fdde:ad00:beef:0:8a36:a3eb:47ae:a9b0
fe80:0:0:0:88a5:7d2c:603f:e16c
children:
rloc16:0x0803 lq:3, mode:rn
rloc16:0x0804 lq:3, mode:rdn
id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4
3-links:{ 57 }
ip6-addrs:
fdde:ad00:beef:0:0:ff:fe00:8400
fdde:ad00:beef:0:824:a126:cf19:a9f4
fe80:0:0:0:d0e5:11a1:46b9:e54d
children: none
id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4
3-links:{ 02 46 57 }
ip6-addrs:
fdde:ad00:beef:0:0:ff:fe00:cc00
fdde:ad00:beef:0:2986:bba3:12d0:1dd2
fe80:0:0:0:98ab:43ab:abf0:5352
children: none
id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4
3-links:{ 33 51 }
ip6-addrs:
fdde:ad00:beef:0:0:ff:fe00:e400
fdde:ad00:beef:0:87d0:550:bc18:9920
fe80:0:0:0:d8e9:c4c0:e9da:55ff
children:
rloc16:0xe402 lq:3, mode:rn - br
rloc16:0xe403 lq:3, mode:rn
id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4
3-links:{ 02 51 62 }
ip6-addrs:
fdde:ad00:beef:0:0:ff:fe00:b800
fdde:ad00:beef:0:df4d:2994:d85c:c337
fe80:0:0:0:fc10:9d27:7e01:75cc
children: none
DoneDiscover network topology with children:
> meshdiag topology children
id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - parent - leader - br
3-links:{ 46 51 }
children:
rloc16:0x0803 lq:0, mode:rn
rloc16:0x0804 lq:0, mode:rdn - me
id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4
3-links:{ 02 51 62 }
children: none
id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4
3-links:{ 57 }
children: none
id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4
3-links:{ 02 46 57 }
children: none
id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4
3-links:{ 33 51 }
children:
rloc16:0xe402 lq:3, mode:rn - br
rloc16:0xe403 lq:3, mode:rn
id:62 rloc16:0xf800 ext-addr:ce349873897233a5 ver:4 - br
3-links:{ 46 }
children: noneStart a query for child table of a router with a given RLOC16.
Output lists all child entries. Information per child:
- RLOC16
- Extended MAC address
- Thread Version
- Timeout (in seconds)
- Age (seconds since last heard)
- Supervision interval (in seconds)
- Number of queued messages (in case the child is sleepy)
- Device Mode
- RSS (average and last) and link margin
- Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC)
- Connection time (seconds since link establishment {dd}d.{hh}:{mm}:{ss} format)
- CSL info
- If synchronized
- Period (in unit of 10-symbols-time)
- Timeout (in seconds)
- Channel
> meshdiag childtable 0x6400
rloc16:0x6402 ext-addr:8e6f4d323bbed1fe ver:4
timeout:120 age:36 supvn:129 q-msg:0
rx-on:yes type:ftd full-net:yes
rss - ave:-20 last:-20 margin:80
err-rate - frame:11.51% msg:0.76%
conn-time:00:11:07
csl - sync:no period:0 timeout:0 channel:0
rloc16:0x6403 ext-addr:ee24e64ecf8c079a ver:4
timeout:120 age:19 supvn:129 q-msg:0
rx-on:no type:mtd full-net:no
rss - ave:-20 last:-20 margin:80
err-rate - frame:0.73% msg:0.00%
conn-time:01:08:53
csl - sync:no period:0 timeout:0 channel:0
DoneSend a query to a parent to retrieve the IPv6 addresses of all its MTD children.
> meshdiag childip6 0xdc00
child-rloc16: 0xdc02
fdde:ad00:beef:0:ded8:cd58:b73:2c21
fd00:2:0:0:c24a:456:3b6b:c597
fd00:1:0:0:120b:95fe:3ecc:d238
child-rloc16: 0xdc03
fdde:ad00:beef:0:3aa6:b8bf:e7d6:eefe
fd00:2:0:0:8ff8:a188:7436:6720
fd00:1:0:0:1fcf:5495:790a:370f
DoneStart a query for router neighbor table of a router with a given RLOC16.
Output lists all router neighbor entries. Information per entry:
- RLOC16
- Extended MAC address
- Thread Version
- RSS (average and last) and link margin
- Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC)
- Connection time (seconds since link establishment {dd}d.{hh}:{mm}:{ss} format)
> meshdiag routerneighbortable 0x7400
rloc16:0x9c00 ext-addr:764788cf6e57a4d2 ver:4
rss - ave:-20 last:-20 margin:80
err-rate - frame:1.38% msg:0.00%
conn-time:01:54:02
rloc16:0x7c00 ext-addr:4ed24fceec9bf6d3 ver:4
rss - ave:-20 last:-20 margin:80
err-rate - frame:0.72% msg:0.00%
conn-time:00:11:27
DoneGet or set the response timeout value (in milliseconds).
The default response timeout value is specified by OPENTHREAD_CONFIG_MESH_DIAG_RESPONSE_TIMEOUT configuration.
Changing the response timeout does not impact any ongoing query. The given timeout value will be clamped to stay between 50 milliseconds and 10 minutes.
> responsetimeout
5000
Done
> responsetimeout 7000
Done
> responsetimeout
7000
DoneSet the Mesh Local IID.
It must be used before Thread stack is enabled.
Only for testing/reference device.
> mliid 1122334455667788
DoneRegister Multicast Listeners to Primary Backbone Router, with an optional timeout (in seconds).
Omit timeout to use the default MLR timeout on the Primary Backbone Router.
Use timeout = 0 to deregister Multicast Listeners.
NOTE: Only for Thread 1.2 Commissioner FTD device.
> mlr reg ff04::1
status 0, 0 failed
Done
> mlr reg ff04::1 ff04::2 ff02::1
status 2, 1 failed
ff02:0:0:0:0:0:0:1
Done
> mlr reg ff04::1 ff04::2 1000
status 0, 0 failed
Done
> mlr reg ff04::1 ff04::2 0
status 0, 0 failed
DoneGet the Thread Device Mode value.
- -: no flags set (rx-off-when-idle, minimal Thread device, stable network data)
- r: rx-on-when-idle
- d: Full Thread Device
- n: Full Network Data
> mode
rdn
DoneSet the Thread Device Mode value.
- -: no flags set (rx-off-when-idle, minimal Thread device, stable network data)
- r: rx-on-when-idle
- d: Full Thread Device
- n: Full Network Data
> mode rdn
Done> mode -
DoneGet the list of supported radio links by the device.
This command is always available, even when only a single radio is supported by the device.
> multiradio
[15.4, TREL]
DoneGet the list of neighbors and their supported radios and their preference.
This command is only available when device supports more than one radio link.
> multiradio neighbor list
ExtAddr:3a65bc38dbe4a5be, RLOC16:0xcc00, Radios:[15.4(255), TREL(255)]
ExtAddr:17df23452ee4a4be, RLOC16:0x1300, Radios:[15.4(255)]
DoneGet the radio info for specific neighbor with a given extended address.
This command is only available when device supports more than one radio link.
> multiradio neighbor 3a65bc38dbe4a5be
[15.4(255), TREL(255)]
DoneGets the IPv4 configured CIDR in the NAT64 translator.
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is required.
> nat64 cidr
192.168.255.0/24
DoneSets the IPv4 CIDR in the NAT64 translator.
Note:
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLEis required.- A valid CIDR must have a non-zero prefix length.
- When updating the CIDR, NAT64 translator will be reset and all existing sessions will be expired.
> nat64 cidr 192.168.100.0/24
DoneDisable NAT64 functions, including the translator and the prefix publishing.
This command will reset the mapping table in the translator (if NAT64 translator is enabled in the build).
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE or OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE are required.
> nat64 disable
DoneEnable NAT64 functions, including the translator and the prefix publishing.
This command can be called anytime.
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE or OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE are required.
> nat64 enable
DoneGets the state of NAT64 functions.
Possible results for prefix manager are (OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE is required):
Disabled: NAT64 prefix manager is disabled.NotRunning: NAT64 prefix manager is enabled, but is not running, probably because the routing manager is disabled.Idle: NAT64 prefix manager is enabled and is running, but is not publishing a NAT64 prefix. Usually when there is another border router publishing a NAT64 prefix with higher priority.Active: NAT64 prefix manager is enabled, running and publishing a NAT64 prefix.
Possible results for NAT64 translator are (OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is required):
Disabled: NAT64 translator is disabled.NotRunning: NAT64 translator is enabled, but is not translating packets, probably because it is not configured with a NAT64 prefix or a CIDR for NAT64.Active: NAT64 translator is enabled and is translating packets.
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE or OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE are required.
> nat64 state
PrefixManager: NotRunning
Translator: NotRunning
Done
> nat64 state
PrefixManager: Idle
Translator: NotRunning
Done
> nat64 state
PrefixManager: Active
Translator: Active
DoneGet the NAT64 translator mappings.
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is required.
> nat64 mappings
| | Address | | 4 to 6 | 6 to 4 |
+----------+---------------------------+--------+--------------+--------------+
| ID | IPv6 | IPv4 | Expiry | Pkts | Bytes | Pkts | Bytes |
+----------+------------+--------------+--------+------+-------+------+-------+
| 00021cb9 | fdc7::df79 | 192.168.64.2 | 7196s | 6 | 456 | 11 | 1928 |
| | TCP | 0 | 0 | 0 | 0 |
| | UDP | 1 | 136 | 16 | 1608 |
| | ICMP | 5 | 320 | 5 | 320 |Get the NAT64 translator packet and error counters.
OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is required.
> nat64 counters
| | 4 to 6 | 6 to 4 |
+---------------+-------------------------+-------------------------+
| Protocol | Pkts | Bytes | Pkts | Bytes |
+---------------+----------+--------------+----------+--------------+
| Total | 11 | 704 | 11 | 704 |
| TCP | 0 | 0 | 0 | 0 |
| UDP | 0 | 0 | 0 | 0 |
| ICMP | 11 | 704 | 11 | 704 |
| Errors | Pkts | Pkts |
+---------------+-------------------------+-------------------------+
| Total | 8 | 4 |
| Illegal Pkt | 0 | 0 |
| Unsup Proto | 0 | 0 |
| No Mapping | 2 | 0 |
DonePrint link quality info for all neighbors.
> neighbor linkquality
| RLOC16 | Extended MAC | Frame Error | Msg Error | Avg RSS | Last RSS | Age |
+--------+------------------+-------------+-----------+---------+----------+-------+
| 0xe800 | 9e2fa4e1b84f92db | 0.00 % | 0.00 % | -46 | -48 | 1 |
| 0xc001 | 0ad7ed6beaa6016d | 4.67 % | 0.08 % | -68 | -72 | 10 |
DoneList RLOC16 of neighbors.
> neighbor list
0xcc01 0xc800 0xf000
DonePrint table of neighbors.
> neighbor table
| Role | RLOC16 | Age | Avg RSSI | Last RSSI | LQ In |R|D|N| Extended MAC | Version |
+------+--------+-----+----------+-----------+-------+-+-+-+------------------+---------+
| R | 0x2000 | 4 | -68 | -68 | 3 |1|1|1| fa97259e4eb574e4 | 5 |
| R | 0xf000 | 0 | -96 | -97 | 1 |1|1|1| ba9fd148fba30fbd | 5 |
DonePrint connection time and age of neighbors.
The table provides the following info per neighbor:
- RLOC16
- Extended MAC address
- Age (seconds since last heard from neighbor)
- Connection time (seconds since link establishment with neighbor)
Duration intervals are formatted as <hh>:<mm>:<ss> for hours, minutes, and seconds if the duration is less than one day. If the duration is longer than one day, the format is <dd>d.<hh>:<mm>:<ss>.
> neighbor conntime
| RLOC16 | Extended MAC | Last Heard (Age) | Connection Time |
+--------+------------------+------------------+------------------+
| 0x8401 | 1a28be396a14a318 | 00:00:13 | 00:07:59 |
| 0x5c00 | 723ebf0d9eba3264 | 00:00:03 | 00:11:27 |
| 0xe800 | ce53628a1e3f5b3c | 00:00:02 | 00:00:15 |
DonePrint connection time and age of neighbors.
This command is similar to neighbor conntime, but it displays the information in a list format. The age and connection time are both displayed in seconds.
> neighbor conntime list
0x8401 1a28be396a14a318 age:63 conn-time:644
0x5c00 723ebf0d9eba3264 age:23 conn-time:852
0xe800 ce53628a1e3f5b3c age:23 conn-time:180
DoneList all UDP sockets.
> netstat
| Local Address | Peer Address |
+-------------------------------------------------+-------------------------------------------------+
| [0:0:0:0:0:0:0:0]:49153 | [0:0:0:0:0:0:0:0]:0 |
| [0:0:0:0:0:0:0:0]:49152 | [0:0:0:0:0:0:0:0]:0 |
| [0:0:0:0:0:0:0:0]:61631 | [0:0:0:0:0:0:0:0]:0 |
| [0:0:0:0:0:0:0:0]:19788 | [0:0:0:0:0:0:0:0]:0 |
DoneSend network diagnostic request to retrieve tlv of <type>s.
If <addr> is unicast address, Diagnostic Get will be sent. if <addr> is multicast address, Diagnostic Query will be sent.
> networkdiagnostic get fdde:ad00:beef:0:0:ff:fe00:fc00 0 1 6
> DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c000608640b0f674074c503
Ext Address: '0e336e1c41494e1c'
Rloc16: 0x0c00
Leader Data:
PartitionId: 0x640b0f67
Weighting: 64
DataVersion: 116
StableDataVersion: 197
LeaderRouterId: 0x03
Done
> networkdiagnostic get ff02::1 0 1
> DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c00
Ext Address: '0e336e1c41494e1c'
Rloc16: 0x0c00
Done
DIAG_GET.rsp/ans: 00083efcdb7e3f9eb0f201021800
Ext Address: '3efcdb7e3f9eb0f2'
Rloc16: 0x1800
DoneSend network diagnostic request to reset <addr>'s tlv of <type>s. Currently MAC Counters(9) is supported.
> diagnostic reset fd00:db8::ff:fe00:0 9
DoneGet or set the non-preferred channels value as a channel mask. This is used to respond to a Network Diagnostics Get request for the corresponding TLV. The channel mask is a 32-bit unsigned integer value where the least significant bit (LSB), also referred to as bit 0, corresponds to channel number 0, and so on.
> networkdiagnostic nonpreferredchannels 0x4000000
Done
> networkdiagnostic nonpreferredchannels
0x4000000
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 Key value.
> networkkey
00112233445566778899aabbccddeeff
DoneSet the Thread Network Key value.
> networkkey 00112233445566778899aabbccddeeff
DoneGet the Thread Network Name.
> networkname
OpenThread
DoneSet the Thread Network Name.
NOTE The current commissioning credential becomes stale after changing this value. Use pskc to reset.
> networkname OpenThread
DoneGet the Thread network time and the time sync parameters.
> networktime
Network Time: 21084154us (synchronized)
Time Sync Period: 100s
XTAL Threshold: 300ppm
DoneSet time sync parameters
- timesyncperiod: The time synchronization period, in seconds.
- xtalthreshold: The XTAL accuracy threshold for a device to become Router-Capable device, in PPM.
> networktime 100 300
DoneOutput the table of allocated Router IDs and the current next hop (as Router ID) and path cost for each ID.
> nexthop
| ID |NxtHop| Cost |
+------+------+------+
| 9 | 9 | 1 |
| 25 | 25 | 0 |
| 30 | 30 | 1 |
| 46 | - | - |
| 50 | 30 | 3 |
| 60 | 30 | 2 |
DoneGet the next hop (as RLOC16) and path cost towards a given RLOC16 destination.
> nexthop 0xc000
0xc000 cost:0
Done
nexthop 0x8001
0x2000 cost:3
DoneWakes up the peer identified by the extended address and establishes a peer-to-peer link with the peer.
OPENTHREAD_CONFIG_P2P_ENABLE and OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE are required.
> p2p link extaddr dead00beef00cafe
DoneTears down the P2P link identified by the extended address.
OPENTHREAD_CONFIG_P2P_ENABLE is required.
> p2p unlink dead00beef00cafe
DoneGet the IEEE 802.15.4 PAN ID value.
> panid
0xdead
DoneSet the IEEE 802.15.4 PAN ID value.
> panid 0xdead
DoneGet the diagnostic information for a Thread Router as parent.
Note: When operating as a Thread Router when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is enabled, this command will return the cached information from when the device was previously attached as a Thread Child. Returning cached information is necessary to support the Thread Test Harness - Test Scenario 8.2.x requests the former parent (i.e. Joiner Router's) MAC address even if the device has already promoted to a router.
> parent
Ext Addr: be1857c6c21dce55
Rloc: 5c00
Link Quality In: 3
Link Quality Out: 3
Age: 20
Version: 4
DoneNote: When OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is enabled, this command will return two extra lines with information relevant for CSL Receiver operation.
CSL clock accuracy: 20
CSL uncertainty: 5Get the assigned parent priority value, -2 means not assigned.
> parentpriority
1
DoneSet the assigned parent priority value: 1, 0, -1 or -2.
> parentpriority 1
DoneGet the Thread Network Partition ID.
> partitionid
4294967295
DoneGet the preferred Thread Leader Partition ID.
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is required.
> partitionid preferred
4294967295
DoneSet the preferred Thread Leader Partition ID.
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is required.
> partitionid preferred 0xffffffff
DoneSend an ICMPv6 Echo Request.
- async: Use the non-blocking mode. New commands are allowed before the ping process terminates.
- source: The source IPv6 address of the echo request.
- -m: multicast loop, which allows looping back pings to multicast addresses that the device itself is subscribed to.
- size: The number of data bytes to be sent.
- count: The number of ICMPv6 Echo Requests to be sent.
- interval: The interval between two consecutive ICMPv6 Echo Requests in seconds. The value may have fractional form, for example
0.5. - hoplimit: The hoplimit of ICMPv6 Echo Request to be sent.
- timeout: Time in seconds to wait for the final ICMPv6 Echo Reply after sending out the request. The value may have fractional form, for example
3.5.
> ping fd00:db8:0:0:76b:6a05:3ae9:a61a
> 16 bytes from fd00:db8:0:0:76b:6a05:3ae9:a61a: icmp_seq=5 hlim=64 time=0ms
1 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 0/0.0/0 ms.
Done
> ping -I fd00:db8:0:0:76b:6a05:3ae9:a61a ff02::1 100 1 1 1
> 108 bytes from fd00:db8:0:0:f605:fb4b:d429:d59a: icmp_seq=4 hlim=64 time=7ms
1 packets transmitted, 1 packets received. Round-trip min/avg/max = 7/7.0/7 ms.
DoneThe address can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data.
Note: The command will return
InvalidStatewhen the preferred NAT64 prefix is unavailable.
> ping 172.17.0.1
Pinging synthesized IPv6 address: fdde:ad00:beef:2:0:0:ac11:1
> 16 bytes from fdde:ad00:beef:2:0:0:ac11:1: icmp_seq=5 hlim=64 time=0ms
1 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 0/0.0/0 ms.
DoneStop sending ICMPv6 Echo Requests.
> ping stop
DonePrint the current platform
> platform
NRF52840
DoneGet the customized data poll period of sleepy end device (milliseconds). Only for certification test.
> pollperiod
0
DoneSet the customized data poll period for sleepy end device (milliseconds >= 10ms). Only for certification test.
> pollperiod 10
DoneGet pskc in hex format.
> pskc
00000000000000000000000000000000
DoneWith -p generate pskc from <passphrase> (UTF-8 encoded) together with current network name and extended PAN ID, otherwise set pskc as <key> (hex format).
> pskc 67c0c203aa0b042bfb5381c47aef4d9e
Done
> pskc -p 123456
DoneGet pskc key reference.
OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE is required.
> pskcref
0x80000000
DoneSet pskc key reference as <keyref>.
OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE is required.
> pskcref 0x20017
DonePrefer a Router ID when solicit router id from Leader.
> preferrouterid 16
DoneGet the prefix list in the local Network Data. Note: For the Thread 1.2 border router with backbone capability, the local Domain Prefix would be listed as well (with flag D), with preceding - if backbone functionality is disabled.
> prefix
2001:dead:beef:cafe::/64 paros med
- fd00:7d03:7d03:7d03::/64 prosD med
DoneAdd a valid prefix to the Network Data.
Note: The Domain Prefix flag (D) is only available for Thread 1.2.
- p: Preferred flag
- a: Stateless IPv6 Address Autoconfiguration flag
- d: DHCPv6 IPv6 Address Configuration flag
- c: DHCPv6 Other Configuration flag
- r: Default Route flag
- o: On Mesh flag
- s: Stable flag
- n: Nd Dns flag
- D: Domain Prefix flag
- prf: Default router preference, which may be 'high', 'med', or 'low'.
> prefix add 2001:dead:beef:cafe::/64 paros med
Done
> prefix add fd00:7d03:7d03:7d03::/64 prosD med
DoneGet the mesh local prefix.
> prefix meshlocal
fdde:ad00:beef:0::/64
DoneSet the mesh local prefix.
> prefix meshlocal fdde:ad00:beef:0::/64
DoneInvalidate a prefix in the Network Data.
> prefix remove 2001:dead:beef:cafe::/64
DoneGet radio promiscuous property.
> promiscuous
Disabled
DoneEnable radio promiscuous operation and print raw packet content.
> promiscuous enable
DoneDisable radio promiscuous operation.
> promiscuous disable
DoneEnable radio.
> radio enable
DoneDisable radio.
> radio disable
DoneOPENTHREAD_CONFIG_RADIO_STATS_ENABLE is required. This feature is only available on FTD and MTD.
The radio statistics shows the time when the radio is in sleep/tx/rx state. The command will show the time of these states since last reset in unit of microseconds. It will also show the percentage of the time.
> radio stats
Radio Statistics:
Total Time: 67.756s
Tx Time: 0.022944s (0.03%)
Rx Time: 1.482353s (2.18%)
Sleep Time: 66.251128s (97.77%)
Disabled Time: 0.000080s (0.00%)
DoneOPENTHREAD_CONFIG_RADIO_STATS_ENABLE is required. This feature is only available on FTD and MTD.
This command resets the radio statistics. It sets all the time to 0.
> radio stats clear
DoneOPENTHREAD_CONFIG_MAC_FILTER_ENABLE is required.
The radio filter is mainly intended for testing. It can be used to temporarily block all tx/rx on the IEEE 802.15.4 radio.
When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any frame and/or potentially send ack). Also the frame transmission requests return immediately without sending the frame over the air (return "no ack" error if ack is requested, otherwise return success).
Get radio filter status (enabled or disabled).
> radiofilter
Disabled
DoneOPENTHREAD_CONFIG_MAC_FILTER_ENABLE is required.
Enable radio radio filter.
> radiofilter enable
DoneOPENTHREAD_CONFIG_MAC_FILTER_ENABLE is required.
Disable radio radio filter.
> radiofilter disable
DoneRCP-related commands.
Set the radio region, this can affect the transmit power limit.
> region US
Done
> region
US
DonePrint RCP version string.
> rcp version
OPENTHREAD/20191113-00825-g82053cc9d-dirty; SIMULATION; Jun 4 2020 17:53:16
DoneRelease a Router ID that has been allocated by the device in the Leader role.
> releaserouterid 16
DoneSignal a platform reset.
> resetSignal a platform reset to bootloader mode, if supported.
Requires OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE.
> reset bootloader
DoneGet the Thread RLOC16 value.
> rloc16
0xdead
DoneGet the external route list in the local Network Data.
> route
2001:dead:beef:cafe::/64 s med
DoneAdd a valid external route to the Network Data.
- s: Stable flag
- n: NAT64 flag
- a: Advertising PIO (AP) flag
- prf: Default Router Preference, which may be: 'high', 'med', or 'low'.
> route add 2001:dead:beef:cafe::/64 s med
DoneInvalidate a external route in the Network Data.
> route remove 2001:dead:beef:cafe::/64
DoneList allocated Router IDs.
> router list
8 24 50
DonePrint table of routers.
> router table
| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC | Link |
+----+--------+----------+-----------+-------+--------+-----+------------------+------+
| 22 | 0x5800 | 63 | 0 | 0 | 0 | 0 | 0aeb8196c9f61658 | 0 |
| 49 | 0xc400 | 63 | 0 | 3 | 3 | 0 | faa1c03908e2dbf2 | 1 |
DonePrint diagnostic information for a Thread Router. The id may be a Router ID or an RLOC16.
> router 50
Alloc: 1
Router ID: 50
Rloc: c800
Next Hop: c800
Link: 1
Ext Addr: e2b3540590b0fd87
Cost: 0
Link Quality In: 3
Link Quality Out: 3
Age: 3
Done> router 0xc800
Alloc: 1
Router ID: 50
Rloc: c800
Next Hop: c800
Link: 1
Ext Addr: e2b3540590b0fd87
Cost: 0
Link Quality In: 3
Link Quality Out: 3
Age: 7
DoneGet the ROUTER_DOWNGRADE_THRESHOLD value.
> routerdowngradethreshold
23
DoneSet the ROUTER_DOWNGRADE_THRESHOLD value.
> routerdowngradethreshold 23
DoneIndicates whether the router role is enabled or disabled.
> routereligible
Enabled
DoneEnable the router role.
> routereligible enable
DoneDisable the router role.
> routereligible disable
DoneGet the ROUTER_SELECTION_JITTER value.
> routerselectionjitter
120
DoneSet the ROUTER_SELECTION_JITTER value.
> routerselectionjitter 120
DoneGet the ROUTER_UPGRADE_THRESHOLD value.
> routerupgradethreshold
16
DoneSet the ROUTER_UPGRADE_THRESHOLD value.
> routerupgradethreshold 16
DoneGet the MLE_CHILD_ROUTER_LINKS value.
> childrouterlinks
16
DoneSet the MLE_CHILD_ROUTER_LINKS value.
> childrouterlinks 16
DonePerform an IEEE 802.15.4 Active Scan.
- channel: The channel to scan on. If no channel is provided, the active scan will cover all valid channels.
> scan
| PAN | MAC Address | Ch | dBm | LQI |
+------+------------------+----+-----+-----+
| ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 |
DonePerform an IEEE 802.15.4 Energy Scan.
- duration: The time in milliseconds to spend scanning each channel.
> scan energy 10
| Ch | RSSI |
+----+------+
| 11 | -59 |
| 12 | -62 |
| 13 | -67 |
| 14 | -61 |
| 15 | -87 |
| 16 | -86 |
| 17 | -86 |
| 18 | -52 |
| 19 | -58 |
| 20 | -82 |
| 21 | -76 |
| 22 | -82 |
| 23 | -74 |
| 24 | -81 |
| 25 | -88 |
| 26 | -71 |
Done> scan energy 10 20
| Ch | RSSI |
+----+------+
| 20 | -82 |
DoneModule for controlling service registration in Network Data. Each change in service registration must be sent to leader by netdata register command before taking effect.
Add service to the Network Data.
- enterpriseNumber: IANA enterprise number
- serviceData: hex-encoded binary service data
- serverData: hex-encoded binary server data (empty if not provided)
> service add 44970 112233 aabbcc
Done
> netdata register
DoneRemove service from Network Data.
- enterpriseNumber: IANA enterprise number
- serviceData: hext-encoded binary service data
> service remove 44970 112233
Done
> netdata register
DoneReturn true when there are no other nodes in the network, otherwise return false.
> singleton
true or false
DoneSend SNTP Query to obtain current unix epoch time (from 1st January 1970). The latter two parameters have following default values:
- NTP server IP: 2001:4860:4806:8:: (Google IPv6 NTP Server)
- NTP server port: 123
> sntp query
> SNTP response - Unix time: 1540894725 (era: 0)You can use NAT64 of OpenThread Border Router to reach e.g. Google IPv4 NTP Server:
> sntp query 64:ff9b::d8ef:2308
> SNTP response - Unix time: 1540898611 (era: 0)Return state of current state.
> state
disabled, detached, child, router or leader
DoneBecome a leader and start a new partition
If the device is not attached, this command will force the device to start as the leader of the network. This use case is only intended for testing and demo purposes, and using the API while the device is detached can make a production application non-compliant with the Thread Specification.
If the device is already attached, this API can be used to try to take over as the leader, creating a new partition. For this to work, the local leader weight (leaderweight) must be larger than the weight of the current leader (from leaderdata). If it is not, error NotCapable is outputted to indicate to the caller that they need to adjust the weight.
Taking over the leader role in this way is only allowed when triggered by an explicit user action. Using this API without such user action can make a production application non-compliant with the Thread Specification.
> leaderdata
Partition ID: 1886755069
Weighting: 65
Data Version: 178
Stable Data Version: 48
Leader Router ID: 59
Done
> leaderweight
64
Done
> state leader
Error 27: NotCapable
> leaderweight 66
Done
> state leader
DoneTry to switch to state detached, child, router.
> state detached
DoneSet the target power.
channel: Thread channel.targetpower: The target power in the unit of 0.01dBm.
> targetpower 12 1000
DoneEnable/disable filter that drops UDP messages sent to the TMF port from untrusted origin. Also get the current state of the filter if no argument is specified.
Note: This filter is enabled by default.
This command is intended for testing only. OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is required for all test sub-commands.
Get the current state of the filter.
> test tmforiginfilter
Enabled
Enable or disable the filter.
> test tmforiginfilter enable
Done
>
> test tmforiginfilter
Enabled
>
> test tmforiginfilter disable
Done
>
> test tmforiginfilter
Disabled
>
Enable Thread protocol operation and attach to a Thread network.
> thread start
DoneDisable Thread protocol operation and detach from a Thread network.
> thread stop
DoneGet the Thread Version number.
> thread version
2
DonePrint the tx queue time-in-queue histogram.
Requires OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE.
The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped.
Each table row shows min and max time-in-queue (in milliseconds) followed by number of messages with time-in-queue within the specified min-max range. The histogram information is collected since the OpenThread instance was initialized or since the last time statistics collection was reset by the timeinqueue reset command.
The collected statistics can be reset by timeinqueue reset.
> timeinqueue
| Min | Max |Msg Count|
+------+------+---------+
| 0 | 9 | 1537 |
| 10 | 19 | 156 |
| 20 | 29 | 57 |
| 30 | 39 | 108 |
| 40 | 49 | 60 |
| 50 | 59 | 76 |
| 60 | 69 | 88 |
| 70 | 79 | 51 |
| 80 | 89 | 86 |
| 90 | 99 | 45 |
| 100 | 109 | 43 |
| 110 | 119 | 44 |
| 120 | 129 | 38 |
| 130 | 139 | 44 |
| 140 | 149 | 35 |
| 150 | 159 | 41 |
| 160 | 169 | 34 |
| 170 | 179 | 13 |
| 180 | 189 | 24 |
| 190 | 199 | 3 |
| 200 | 209 | 0 |
| 210 | 219 | 0 |
| 220 | 229 | 2 |
| 230 | 239 | 0 |
| 240 | 249 | 0 |
| 250 | 259 | 0 |
| 260 | 269 | 0 |
| 270 | 279 | 0 |
| 280 | 289 | 0 |
| 290 | 299 | 1 |
| 300 | 309 | 0 |
| 310 | 319 | 0 |
| 320 | 329 | 0 |
| 330 | 339 | 0 |
| 340 | 349 | 0 |
| 350 | 359 | 0 |
| 360 | 369 | 0 |
| 370 | 379 | 0 |
| 380 | 389 | 0 |
| 390 | 399 | 0 |
| 400 | 409 | 0 |
| 410 | 419 | 0 |
| 420 | 429 | 0 |
| 430 | 439 | 0 |
| 440 | 449 | 0 |
| 450 | 459 | 0 |
| 460 | 469 | 0 |
| 470 | 479 | 0 |
| 480 | 489 | 0 |
| 490 | inf | 0 |
DonePrint the maximum observed time-in-queue in milliseconds.
Requires OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE.
The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped.
> timeinqueue max
291Reset the TX queue time-in-queue statistics.
> timeinqueue reset
DoneIndicate whether TREL radio operation is enabled or not.
OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE is required for all trel sub-commands.
The TREL operation is enabled if and only if it is enabled by both the user (see trel enable) and the OpenThread stack.
> trel
Enabled
DoneEnable TREL operation.
The TREL interface's operational state is determined by two factors: the user's preference (set by this command) and the OpenThread stack's internal state. The TREL interface is enabled only when both the user and the OpenThread stack have it enabled. Otherwise, it is disabled.
Upon OpenThread stack initialization, the user's preference is set to enabled by default. This allows the stack to control the TREL interface state automatically (e.g., enabling it when radio links are enabled and disabling it when radio links are disabled).
If the user explicitly disables the TREL operation using trel disable, it will remain disabled until the user explicitly re-enables it using trel enable. This ensures the user's 'disable' request persists across other OpenThread stack state changes (which may trigger disabling/enabling of all radio links, including the TREL link).
> trel enable
DoneDisable TREL operation.
> trel disable
DoneIndicate whether TREL filter mode is enabled or not
When filter mode is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly intended for use during testing.
> trel filter
Disabled
DoneEnable TREL filter mode.
> trel filter enable
DoneDisable TREL filter mode.
> trel filter disable
DoneGet the TREL peer table in table format or as a list.
> trel peers
| No | Ext MAC Address | Ext PAN Id | IPv6 Socket Address |
+-----+------------------+------------------+--------------------------------------------------+
| 1 | 5e5785ba3a63adb9 | f0d9c001f00d2e43 | [fe80:0:0:0:cc79:2a29:d311:1aea]:9202 |
| 2 | ce792a29d3111aea | dead00beef00cafe | [fe80:0:0:0:5c57:85ba:3a63:adb9]:9203 |
Done
> trel peers list
001 ExtAddr:5e5785ba3a63adb9 ExtPanId:f0d9c001f00d2e43 SockAddr:[fe80:0:0:0:cc79:2a29:d311:1aea]:9202
002 ExtAddr:ce792a29d3111aea ExtPanId:dead00beef00cafe SockAddr:[fe80:0:0:0:5c57:85ba:3a63:adb9]:9203
DoneGet the TREL counters.
> trel counters
Inbound: Packets 32 Bytes 4000
Outbound: Packets 4 Bytes 320 Failures 1
DoneReset the TREL counters.
> trel counters reset
DoneGet the TREL UDP port number.
> trel port
49154
DoneEnable thread version check when upgrading to router or leader.
Note: Thread version check is enabled by default.
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is required.
> tvcheck enable
DoneDisable thread version check when upgrading to router or leader.
Note: Thread version check is enabled by default.
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is required.
> tvcheck disable
DoneGet the transmit power in dBm.
> txpower
-10 dBm
DoneSet the transmit power in dBm.
> txpower -10
DoneAdd a port to the allowed unsecured port list.
> unsecureport add 1234
DoneRemove a port from the allowed unsecured port list.
> unsecureport remove 1234
DoneRemove all ports from the allowed unsecured port list.
> unsecureport remove all
DonePrint all ports from the allowed unsecured port list.
> unsecureport get
1234
DoneThis command requires OPENTHREAD_CONFIG_UPTIME_ENABLE to be enabled.
Print the OpenThread stack uptime (duration since OpenThread stack initialization).
> uptime
12:46:35.469
Done
>This command requires OPENTHREAD_CONFIG_UPTIME_ENABLE to be enabled.
Print the OpenThread stack uptime in msec.
> uptime ms
426238
Done
>Get the vendor name.
> vendor name
nest
DoneSet the vendor name (requires OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE).
> vendor name nest
DoneGet the vendor model.
> vendor model
Hub Max
DoneSet the vendor model (requires OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE).
> vendor model Hub\ Max
DoneGet the vendor SW version.
> vendor swversion
Marble3.5.1
DoneSet the vendor SW version (requires OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE).
> vendor swversion Marble3.5.1
DoneCalculates the Verhoeff checksum for a given decimal string.
Requires OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.
The input string MUST consist of characters in ['0'-'9'].
> verhoeff calculate 30731842
1
DoneValidates the Verhoeff checksum for a given decimal string.
Requires OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.
The input string MUST consist of characters in ['0'-'9']. The last digit is treated as checksum.
> verhoeff validate 307318421
Done
> verhoeff validate 307318425
Error 1: FailedPrint the build version information.
> version
OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09
DonePrint API version number.
> version api
28
DoneGet the alternate short address used by MAC layer. Can be 0xfffe if not set.
> mac altshortaddr
0x4801
DoneGet the number of direct TX retries on the MAC layer.
> mac retries direct
3
DoneSet the number of direct TX retries on the MAC layer.
> mac retries direct 5
DoneGet the number of indirect TX retries on the MAC layer.
> mac retries indirect
3
DoneSet the number of indirect TX retries on the MAC layer.
> mac retries indirect 5
DoneInstruct an Rx-Off-When-Idle device to send a mac frame to its parent. The mac frame could be either a mac data request or an empty mac data frame. Use datarequest to send a mac data request and data to send an empty mac data. This feature is for certification, it can only be used when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE is enabled.
> mac send datarequest
Done> mac send emptydata
DoneList the macfilter status, including address and received signal strength filter settings.
> macfilter
Address Mode: Allowlist
0f6127e33af6b403 : rss -95 (lqi 1)
0f6127e33af6b402
RssIn List:
0f6127e33af6b403 : rss -95 (lqi 1)
Default rss: -50 (lqi 3)
DoneList the address filter status.
> macfilter addr
Allowlist
0f6127e33af6b403 : rss -95 (lqi 1)
0f6127e33af6b402
DoneDisable address filter mode.
> macfilter addr disable
DoneEnable allowlist address filter mode.
> macfilter addr allowlist
DoneEnable denylist address filter mode.
> macfilter addr denylist
DoneAdd an IEEE 802.15.4 Extended Address to the address filter, and fixed the received signal strength for the messages from the address if rss is specified.
> macfilter addr add 0f6127e33af6b403 -95
Done> macfilter addr add 0f6127e33af6b402
DoneRemove the IEEE802.15.4 Extended Address from the address filter.
> macfilter addr remove 0f6127e33af6b402
DoneClear all the IEEE802.15.4 Extended Addresses from the address filter.
> macfilter addr clear
DoneList the rss filter status
> macfilter rss
0f6127e33af6b403 : rss -95 (lqi 1)
Default rss: -50 (lqi 3)
DoneSet the received signal strength for the messages from the IEEE802.15.4 Extended Address. If extaddr is *, default received signal strength for all received messages would be set.
> macfilter rss add * -50
Done> macfilter rss add 0f6127e33af6b404 -85
DoneSet the received link quality for the messages from the IEEE802.15.4 Extended Address. Valid lqi range [0,3] If extaddr is *, default received link quality for all received messages would be set. Equivalent with 'filter rss add' with similar usage
> macfilter rss add-lqi * 3
Done> macfilter rss add-lqi 0f6127e33af6b404 2
DoneRemoves the received signal strength or received link quality setting on the Extended Address. If extaddr is *, default received signal strength or link quality for all received messages would be unset.
> macfilter rss remove *
Done> macfilter rss remove 0f6127e33af6b404
DoneClear all the received signal strength or received link quality settings.
> macfilter rss clear
DoneFactory Diagnostics module is enabled only when building OpenThread with OPENTHREAD_CONFIG_DIAG_ENABLE=1 option. Go diagnostics module for more information.
Get the wake-up channel.
Requires OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE or OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE.
> wakeup channel
12
DoneSet the wake-up channel.
Requires OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE or OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE.
> wakeup channel 12
DoneGet the wake-up listen interval and duration.
Requires OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE.
> wakeup parameters
interval: 1000000us
duration: 8000us
DoneSet the wake-up listen interval and duration.
Requires OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE.
> wakeup parameters 1000000 8000
DoneShow the state of wake-up listening feature.
OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE is required.
> wakeup listen
Enabled
DoneEnable/disable listening for wake-up frames.
OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE is required.
> wakeup listen enable
DoneWakes a Wake-up End Device.
OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE is required.
> wakeup wake 1ece0a6c4653a7c1 7500 1090
Done