ba id (get,set)
Gets or sets the 16 bytes Border Router ID which can uniquely identifies the device among multiple BRs.
Parameters
ba id [border-agent-id]
Use the optional border-agent-id
argument to set the Border Agent ID.
Examples
ba id
cb6da1e0c0448aaec39fa90f3d58f45c
Done
ba id 00112233445566778899aabbccddeeff
Done
CLI and API References
ba port
Gets the UDP port of the Thread Border Agent service.
Parameters
No parameters.
Examples
ba port
49153
Done
CLI and API References
ba state
Gets the otBorderAgentState of the Thread Border Agent role.
Parameters
No parameters.
Examples
ba state
Started
Done
CLI and API References
bbr
Returns the current Primary Backbone Router information for the Thread device.
Parameters
No parameters.
Examples
bbr
BBR Primary:
server16: 0xE400
seqno: 10
delay: 120 secs
timeout: 300 secs
Done
bbr
BBR Primary: None
Done
CLI and API References
- No associated API
bbr config (set)
Sets the local Backbone Router configuration otBackboneRouterConfig.
A Server Data Request message SRV_DATA.ntf
is initiated automatically if BBR Dataset changes for Primary Backbone Router.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
bbr register
should be issued explicitly to register Backbone Router service to Leader for Secondary Backbone Router.
Parameters
bbr config [seqno seqno] [delay delay] [timeout timeout]
Examples
bbr config seqno 20 delay 30
Done
CLI and API References
bbr config
Gets the local Backbone Router configuration.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
Parameters
No parameters.
Examples
bbr config
seqno: 10
delay: 120 secs
timeout: 300 secs
Done
CLI and API References
bbr disable
Enables or disables Backbone functionality.
If enabled, a Server Data Request message SRV_DATA.ntf
is triggered for the attached device if there is no Backbone Router Service in the Thread Network Data.
If disabled, SRV_DATA.ntf
is triggered if the Backbone Router is in the Primary state.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
Parameters
No parameters.
Examples
bbr disable
Done
CLI and API References
bbr enable
Enables or disables Backbone functionality.
If enabled, a Server Data Request message SRV_DATA.ntf
is triggered for the attached device if there is no Backbone Router Service in the Thread Network Data.
If disabled, SRV_DATA.ntf
is triggered if the Backbone Router is in the Primary state.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
Parameters
No parameters.
Examples
bbr enable
Done
CLI and API References
bbr jitter (get,set)
Gets or sets jitter (in seconds) for Backbone Router registration.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
Parameters
bbr jitter [jitter]
Examples
bbr jitter
20
Done
bbr jitter 10
Done
CLI and API References
bbr mgmt dua
With the meshLocalIid
included, this command configures the response status for the next DUA registration. Without meshLocalIid
, respond to the next DUA.req with the specified status
or coap-code
.
Available when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
Parameters
bbr mgmt dua status|coap-code [meshLocalIid]
For status
or coap-code
, use:
- 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
Examples
bbr mgmt dua 1 2f7c235e5025a2fd
Done
bbr mgmt dua 160
Done
CLI and API References
bbr mgmt mlr listener add
Adds a Multicast Listener with a timeout value, in seconds.
Pass 0
to use the default MLR timeout.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
, OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
, and OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
are enabled.
Parameters
bbr mgmt mlr listener add ipaddress [timeout-seconds]
Examples
bbr mgmt mlr listener add ff04::1
Done
bbr mgmt mlr listener add ff04::2 300
Done
CLI and API References
bbr mgmt mlr listener
Returns the Multicast Listeners with the otBackboneRouterMulticastListenerInfomTimeout
in seconds.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
and OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
are enabled.
Parameters
No parameters.
Examples
bbr mgmt mlr listener
ff04:0:0:0:0:0:0:abcd 3534000
ff04:0:0:0:0:0:0:eeee 3537610
Done
CLI and API References
bbr mgmt mlr listener clear
Clears the Multicast Listeners.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
, OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
, and OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
are enabled.
Parameters
No parameters.
Examples
bbr mgmt mlr listener clear
Done
CLI and API References
bbr mgmt mlr response
Configures the response status for the next Multicast Listener Registration.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
, OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE
, and OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
are enabled.
Parameters
bbr mgmt mlr response status-code
For status-code
, use:
- 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
Examples
bbr mgmt mlr response 2
Done
CLI and API References
bbr register
Explicitly registers local Backbone Router configuration.
A Server Data Request message SRV_DATA.ntf
is triggered for the attached device.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
Parameters
No parameters.
Examples
bbr register
Done
CLI and API References
bbr state
Gets the Backbone Router otBackboneRouterState.
Available when OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
is enabled.
Parameters
No parameters.
Examples
bbr state
Disabled
Done
bbr state
Primary
Done
bbr state
Secondary
Done
CLI and API References
br disable
Disables the Border Routing Manager.
Parameters
No parameters.
Examples
br disable
Done
CLI and API References
br enable
Enables the Border Routing Manager.
Parameters
No parameters.
Examples
br enable
Done
CLI and API References
br init
Initializes the Border Routing Manager.
Parameters
br init infrastructure-network-index is-running
Examples
br init 2 1
Done
CLI and API References
br nat64prefix
Outputs both local and favored NAT64 prefixes.
Parameters
No parameters.
Examples
br nat64prefix
Local: fd14:1078:b3d5:b0b0:0:0::/96
Favored: fd14:1078:b3d5:b0b0:0:0::/96 prf:low
Done
CLI and API References
br nat64prefix favored
Gets the currently favored NAT64 prefix.
The favored NAT64 prefix can be discovered from infrastructure link or can be this device's local NAT64 prefix.
Parameters
No parameters.
Examples
br nat64prefix favored
fd14:1078:b3d5:b0b0:0:0::/96 prf:low
Done
CLI and API References
br nat64prefix local
Gets the local NAT64 Prefix of the Border Router.
NAT64 Prefix might not be advertised in the Thread network.
OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
must be enabled.
Parameters
No parameters.
Examples
br nat64prefix local
fd14:1078:b3d5:b0b0:0:0::/96
Done
CLI and API References
br omrprefix
Outputs both local and favored OMR prefix.
Parameters
No parameters.
Examples
br omrprefix
Local: fdfc:1ff5:1512:5622::/64
Favored: fdfc:1ff5:1512:5622::/64 prf:low
Done
CLI and API References
br omrprefix favored
Gets the currently favored Off-Mesh-Routable (OMR) Prefix.
The favored OMR prefix can be discovered from Network Data or can be this device's local OMR prefix.
Parameters
No parameters.
Examples
br omrprefix favored
fdfc:1ff5:1512:5622::/64 prf:low
Done
CLI and API References
br omrprefix local
Gets the local Off-Mesh-Routable (OMR) Prefix, for example fdfc:1ff5:1512:5622::/64
.
An OMR Prefix is a randomly generated 64-bit prefix that's published in the Thread network if there isn't already an OMR prefix. This prefix can be reached from the local Wi-Fi or Ethernet network.
Parameters
No parameters.
Examples
br omrprefix local
fdfc:1ff5:1512:5622::/64
Done
CLI and API References
br onlinkprefix
Outputs both local and favored on-link prefixes.
Parameters
No parameters.
Examples
br onlinkprefix
Local: fd41:2650:a6f5:0::/64
Favored: 2600::0:1234:da12::/64
Done
CLI and API References
br onlinkprefix favored
Gets the currently favored On-Link Prefix.
The favored prefix is either a discovered on-link prefix on the infrastructure link or the local on-link prefix.
Parameters
No parameters.
Examples
br onlinkprefix favored
2600::0:1234:da12::/64
Done
CLI and API References
br onlinkprefix local
Gets the local On-Link Prefix for the adjacent infrastructure link.
The local On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a usable on-link prefix being advertised on the link.
Parameters
No parameters.
Examples
br onlinkprefix local
fd41:2650:a6f5:0::/64
Done
CLI and API References
br prefixtable
Iterates over the entries in the Border Router's discovered prefix table.
Parameters
No parameters.
Examples
br prefixtable
prefix:fd00:1234:5678:0::/64, on-link:no, ms-since-rx:29526, lifetime:1800, route-prf:med,
router:ff02:0:0:0:0:0:0:1
prefix:1200:abba:baba:0::/64, on-link:yes, ms-since-rx:29527, lifetime:1800, preferred:1800,
router:ff02:0:0:0:0:0:0:1
Done
CLI and API References
br rioprf (high,med,low)
Explicitly sets the preference to use when advertising Route Info Options (RIO) in Router Advertisement messages sent over the infrastructure link.
After a call to this function, BR will use the given preference for all its advertised RIOs. The preference can be cleared by calling
otBorderRoutingClearRouteInfoOptionPreference()
.
Parameters
br rioprf [high|med|low]
Examples
br rioprf low
Done
CLI and API References
br rioprf
Gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement messages sent over the infrastructure link.
The RIO preference is determined as follows:
- If explicitly set by user by calling
otBorderRoutingSetRouteInfoOptionPreference()
, the given preference is used. - Otherwise, it is determined based on device's current role: Medium preference when in router/leader role and low preference when in child role.
Parameters
No parameters.
Examples
br rioprf
med
Done
CLI and API References
br rioprf clear
Clears a previously set preference value for advertised Route Info Options.
After a call to this function, BR will use device's role to determine the RIO preference: Medium preference when in router/leader role and low preference when in child role.
Parameters
No parameters.
Examples
br rioprf clear
Done
CLI and API References
br routeprf (high,med,low)
Explicitly sets the preference of published routes in Network Data.
After a call to this function, BR will use the given preference. The preference can be cleared by calling
otBorderRoutingClearRoutePreference()
.
Parameters
br routeprf [high|med|low]
Examples
br routeprf low
Done
CLI and API References
br routeprf
Gets the current preference used for published routes in Network Data.
The preference is determined as follows:
- If explicitly set by user by calling
otBorderRoutingSetRoutePreference()
, the given preference is used. - Otherwise, it is determined automatically by
RoutingManager
based on the device's role and link quality.
Parameters
No parameters.
Examples
br routeprf
med
Done
CLI and API References
br routeprf clear
Clears a previously set preference value for published routes in Network Data.
After a call to this function, BR will determine the preference automatically based on the device's role and link quality (to the parent when acting as end-device).
Parameters
No parameters.
Examples
br routeprf clear
Done
CLI and API References
br state
Gets the current state of Border Routing Manager.
Parameters
No parameters.
Examples
br state
running
CLI and API References
bufferinfo
Gets the current message buffer information.
total
displays the total number of message buffers in pool.free
displays the number of free message buffers.max-used
displays max number of used buffers at the same time since OT stack initialization or lastbufferinfo reset
.
Next, the CLI displays info about different queues used by the OpenThread stack, for example 6lo send
. Each line after the queue represents 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.
Parameters
No parameters.
Examples
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
Done
CLI and API References
bufferinfo reset
Reset the Message Buffer information counter tracking the maximum number buffers in use at the same time.
This resets mMaxUsedBuffers
in
otBufferInfo
.
Parameters
No parameters.
Examples
bufferinfo reset
Done
CLI and API References
ccathreshold (get,set)
Gets or sets the CCA threshold in dBm measured at the antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
Parameters
ccathreshold [CCA-threshold-dBm]
Use the optional CCA-threshold-dBm
argument to set the CCA threshold.
Examples
ccathreshold
-75 dBm
Done
ccathreshold -62
Done
CLI and API References
channel (get,set)
Gets or sets the IEEE 802.15.4 Channel value.
Parameters
channel [channel-num]
Use channel-num
to set the channel.
Examples
channel
11
Done
channel 11
Done
CLI and API References
- No associated API
channel manager auto
Enables or disables the auto-channel-selection functionality.
When enabled, ChannelManager
will periodically invoke a RequestChannelSelect(false)
. The period interval can be set by SetAutoChannelSelectionInterval()
.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager auto enable
1
is a boolean to enable
.
Examples
channel manager auto 1
channel manager auto 1
Done
CLI and API References
channel manager change
Requests a Thread network channel change.
The network switches to the given channel after a specified delay (see otChannelManagerSetDelay()). The channel change is performed by updating the Pending Operational Dataset.
A subsequent call will cancel an ongoing previously requested channel change.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
is required.
Parameters
channel manager change channel-num
Examples
channel manager change 11
channel manager change 11
Done
CLI and API References
channel manager
Get the channel manager state. OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
is required.
Parameters
No parameters.
Examples
channel manager
channel: 11
auto: 1
delay: 120
interval: 10800
supported: { 11-26}
favored: { 11-26}
Done
CLI and API References
channel manager delay
Sets the delay (in seconds) used for a channel change.
The delay should preferably be longer than the maximum data poll interval used by all sleepy-end-devices within the Thread network.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager delay delay-seconds
Examples
channel manager delay 120
channel manager delay 120
Done
CLI and API References
channel manager favored
Sets the favored channel mask.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager favored mask
Examples
channel manager favored 0x7fffc00
channel manager favored 0x7fffc00
Done
CLI and API References
channel manager interval
Sets the period interval (in seconds) used by auto-channel-selection functionality.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager interval interval-seconds
Examples
channel manager interval 10800
channel manager interval 10800
Done
CLI and API References
channel manager select
Requests that ChannelManager
checks and selects a new channel and starts a channel change.
Unlike the
otChannelManagerRequestChannelChange()
where the channel must be given as a parameter, this function asks the ChannelManager
to select a channel by itself (based on collected channel quality info).
Once called, the Channel Manager will perform the following 3 steps:
1) ChannelManager
decides if the channel change would be helpful. This check can be skipped if aSkipQualityCheck
is set to true (forcing a channel selection to happen and skipping the quality check). This step uses the collected link quality metrics on the device (such as CCA failure rate, frame and message error rates per neighbor, etc.) to determine if the current channel quality is at the level that justifies a channel change.
2) If the first step passes, then ChannelManager
selects a potentially better channel. It uses the collected channel quality data by ChannelMonitor
module. The supported and favored channels are used at this step. (see otChannelManagerSetSupportedChannels() and otChannelManagerSetFavoredChannels()).
3) If the newly selected channel is different from the current channel, ChannelManager
requests/starts the channel change process (internally invoking a RequestChannelChange()
).
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager select skip-quality-check
Use a 1
or 0
for the boolean skip-quality-check
.
Examples
channel manager select 1
channel manager select 1
Done
CLI and API References
channel manager supported
Sets the supported channel mask.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager supported mask
Examples
channel manager supported 0x7fffc00
channel manager supported 0x7fffc00
Done
CLI and API References
channel manager threshold
Sets the CCA failure rate threshold.
OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
and OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
are required.
Parameters
channel manager threshold threshold-percent
Use a hex value for threshold-percent
. 0
maps to 0% and 0xffff
maps to 100%.
Examples
channel manager threshold 0xffff
channel manager threshold 0xffff
Done
CLI and API References
channel monitor
Get the current channel monitor state and channel occupancy. OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
is required.
Parameters
No parameters.
Examples
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
Done
CLI and API References
- No associated API
channel monitor start
Start the channel monitor. OT CLI sends a boolean value of true
to otChannelMonitorSetEnabled. OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
is required.
Parameters
No parameters.
Examples
channel monitor start
channel monitor start
Done
CLI and API References
channel monitor stop
Stop the channel monitor. OT CLI sends a boolean value of false
to otChannelMonitorSetEnabled. OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
is required.
Parameters
No parameters.
Examples
channel monitor stop
channel monitor stop
Done
CLI and API References
channel preferred
Gets the radio preferred channel mask that the device prefers to form on.
Parameters
No parameters.
Examples
channel preferred
0x7fff800
Done
CLI and API References
channel supported
Get the radio supported channel mask that the device is allowed to be on.
Parameters
No parameters.
Examples
channel supported
0x7fff800
Done
CLI and API References
child (id)
Gets diagnostic information for an attached Child by its Child ID or RLOC16.
Parameters
child child-id
Examples
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
Done
CLI and API References
child list
Returns a list of attached Child IDs.
Parameters
No parameters.
Examples
child list
1 2 3 6 7 8
Done
CLI and API References
child table
Prints a table of the attached children.
Parameters
No parameters.
Examples
child table
| ID | RLOC16 | Timeout | Age | LQ In | C_VN |R|D|N|Ver|CSL|QMsgCnt| Extended MAC |
+-----+--------+------------+------------+-------+------+-+-+-+---+---+-------+------------------+
| 1 | 0xc801 | 240 | 24 | 3 | 131 |1|0|0| 3| 0 | 0 | 4ecede68435358ac |
| 2 | 0xc802 | 240 | 2 | 3 | 131 |0|0|0| 3| 1 | 0 | a672a601d2ce37d8 |
Done
CLI and API References
childip
Gets a list of IP addresses stored for MTD children.
Parameters
No parameters.
Examples
childip
3401: fdde:ad00:beef:0:3037:3e03:8c5f:bc0c
Done
CLI and API References
childip max (set)
Sets or restores the maximum number of IP addresses that each MTD child may register with this device as parent.
Pass 0
to clear the setting and restore the default.
Available when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
Parameters
childip max count
Examples
childip max 2
Done
CLI and API References
childip max
Gets the maximum number of IP addresses that each MTD child may register with this device as parent.
Parameters
No parameters.
Examples
childip max
4
Done
CLI and API References
childmax (set)
Sets the maximum number of children currently allowed.
This parameter can only be set when Thread protocol operation has been stopped.
Parameters
childmax count
Examples
childmax 2
Done
CLI and API References
childmax
Gets the maximum number of children currently allowed.
Parameters
No parameters.
Examples
childmax
5
Done
CLI and API References
childrouterlinks (get,set)
Gets or sets the MLE_CHILD_ROUTER_LINKS value.
Parameters
childrouterlinks [links]
Examples
childrouterlinks
16
Done
childrouterlinks 16
Done
CLI and API References
childsupervision checktimeout (set)
Sets the supervision check timeout interval (in seconds) on the child.
Parameters
childsupervision checktimeout timeout-seconds
Examples
childsupervision checktimeout 30
Done
CLI and API References
childsupervision checktimeout
Gets the supervision check timeout interval (in seconds) 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).
Parameters
No parameters.
Examples
childsupervision checktimeout
30
Done
CLI and API References
childsupervision interval (set)
Sets the child supervision interval (in seconds) on the child.
Parameters
childsupervision interval interval-seconds
Examples
childsupervision interval 30
Done
CLI and API References
childsupervision interval
Gets the Child Supervision interval (in seconds) on a 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.
Parameters
No parameters.
Examples
childsupervision interval
30
Done
CLI and API References
childtimeout (set)
Sets the Thread Child Timeout (in seconds) used when operating in the Child role.
Parameters
childtimeout timeout-seconds
Examples
childtimeout 300
Done
CLI and API References
childtimeout
Gets the Thread Child Timeout (in seconds) used when operating in the Child role.
Parameters
No parameters.
Examples
childtimeout
300
Done
CLI and API References
contextreusedelay (get,set)
Gets or sets the CONTEXT_ID_REUSE_DELAY
value.
Parameters
contextreusedelay delay
Use the optional delay
argument to set the CONTEXT_ID_REUSE_DELAY
.
Examples
contextreusedelay
11
Done
contextreusedelay 11
Done
CLI and API References
counters (mac)
Get the MAC layer counters.
Parameters
counters mac
Examples
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
CLI and API References
counters (mle)
Gets the Thread MLE counters.
Parameters
counters mle
Examples
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
Parent Changes: 0
Done
CLI and API References
counters
Gets the supported counter names.
Parameters
No parameters.
Examples
counters
ip
mac
mle
Done
CLI and API References
- No associated API
counters ip
Gets the IPv6 counters.
Parameters
counters ip
Examples
counters ip
TxSuccess: 10
TxFailed: 0
RxSuccess: 5
RxFailed: 0
Done
CLI and API References
counters ip reset
Resets the IPv6 counters.
Parameters
counters ip reset
Examples
counters ip reset
Done
CLI and API References
counters mac reset
Resets the MAC layer counters.
Parameters
counters mac reset
Examples
counters mac reset
Done
CLI and API References
counters mle reset
Resets the Thread MLE counters.
Parameters
counters mle reset
Examples
counters mle reset
Done
CLI and API References
csl channel
Sets the CSL channel.
Parameters
csl channel channel
Examples
csl channel 20
Done
CLI and API References
csl
Gets the CSL configuration.
Parameters
No parameters.
Examples
csl
Channel: 11
Period: 160000us
Timeout: 1000s
Done
CLI and API References
csl period
Sets the CSL period in microseconds.
Disable CSL by setting this parameter to 0
.
The CSL period MUST be a multiple of OT_LINK_CSL_PERIOD_TEN_SYMBOLS_UNIT_IN_USEC
, otherwise OT_ERROR_INVALID_ARGS
is returned.
Parameters
csl period period
Examples
csl period 3000000
Done
CLI and API References
csl timeout
Sets the CSL timeout in seconds.
Parameters
csl timeout timeout
Examples
cls timeout 10
Done
CLI and API References
dataset active
Gets the Active Operational Dataset.
OT CLI uses otOperationalDataset members to return dataset values to the console.
Parameters
dataset active [-x]
The optional -x
argument prints the Active Operational Dataset values as hex-encoded TLVs.
Examples
dataset active
Active Timestamp: 1
Channel: 13
Channel Mask: 0x07fff800
Ext PAN ID: d63e8e3e495ebbc3
Mesh Local Prefix: fd3d:b50b:f96d:722d::/64
Network Key: dfd34f0f05cad978ec4e32b0413038ff
Network Name: OpenThread-8f28
PAN ID: 0x8f28
PSKc: c23a76e98f1a6483639b1ac1271e2e27
Security Policy: 0, onrcb
Done
dataset active -x
0e08000000000001000000030000103506000...3023d82c841eff0e68db86f35740c030000ff
Done
CLI and API References
dataset activetimestamp (get, set)
Gets or sets otOperationalDataset::mActiveTimestamp.
Parameters
dataset activetimestamp [timestamp]
Pass the optional timestamp
argument to set the active timestamp.
Examples
dataset activetimestamp
123456789
Done
dataset activetimestamp 123456789
Done
CLI and API References
- No associated API
dataset channel (get,set)
Gets or sets otOperationalDataset::mChannel.
Parameters
dataset channel [channel-num]
Use the optional channel-num
argument to set the channel.
Examples
dataset channel
12
Done
dataset channel 12
Done
CLI and API References
- No associated API
dataset channelmask (get,set)
Gets or sets otOperationalDataset::mChannelMask
Parameters
dataset channelmask [channel-mask]
Use the optional channel-mask
argument to set the channel mask.
Examples
dataset channelmask
0x07fff800
Done
dataset channelmask 0x07fff800
Done
CLI and API References
- No associated API
dataset clear
Reset the Operational Dataset buffer.
Parameters
No parameters.
Examples
dataset clear
Done
CLI and API References
- No associated API
dataset commit active
Commit the Operational Dataset buffer to Active Operational Dataset.
Parameters
No parameters.
Examples
dataset commit active
Done
CLI and API References
dataset commit pending
Commit the Operational Dataset buffer to Pending Operational Dataset.
Parameters
No parameters.
Examples
dataset commit pending
Done
CLI and API References
dataset delay (get,set)
Gets or sets otOperationalDataset::mDelay.
Parameters
dataset delay [delay]
Use the optional delay
argument to set the delay timer value.
Examples
dataset delay
1000
Done
dataset delay 1000
Done
CLI and API References
dataset extpanid (get,set)
Gets or sets otOperationalDataset::mExtendedPanId.
Parameters
dataset extpanid [extpanid]
Use the optional extpanid
argument to set the Extended Personal Area Network ID.
Examples
dataset extpanid
000db80123456789
Done
dataset extpanid 000db80123456789
Done
CLI and API References
dataset help
Gets a list of dataset
CLI commands. For more information, refer to Display and Manage Datasets with OT CLI.
Parameters
No parameters.
Examples
dataset help
help
active
activetimestamp
channel
channelmask
clear
commit
delay
extpanid
init
meshlocalprefix
mgmtgetcommand
mgmtsetcommand
networkkey
networkname
panid
pending
pendingtimestamp
pskc
securitypolicy
set
tlvs
Done
CLI and API References
- No associated API
dataset init (active,new,pending,tlvs)
OT CLI checks for active
, pending
, or tlvs
and returns the corresponding values. Otherwise, OT CLI creates a new, random network and returns a new dataset.
Parameters
dataset init {active|new|pending|tlvs} [hex-encoded-tlvs]
Use new
to initialize a new dataset, then enter the command dataset commit active
. Use tlvs
for hex-encoded TLVs.
Examples
dataset init new
Done
CLI and API References
dataset meshlocalprefix (get,set)
Gets or sets otOperationalDataset::mMeshLocalPrefix.
Parameters
dataset meshlocalprefix [meshlocalprefix]
Use the optional meshlocalprefix
argument to set the Mesh-Local Prefix.
Examples
dataset meshlocalprefix
fd00:db8:0:0::/64
Done
dataset meshlocalprefix fd00:db8:0:0::
Done
CLI and API References
- No associated API
dataset mgmtgetcommand active
Sends MGMT_ACTIVE_GET.
OT CLI sends a MGMT_ACTIVE_GET with the relevant arguments. To learn more about these parameters and argument mappings, refer to Display and Manage Datasets with OT CLI.
Parameters
dataset mgmtgetcommand active [address leader-address] [dataset-components] [-x tlv-list]
- Use
address
to specify the IPv6 destination; otherwise, the Leader ALOC is used as default. - For
dataset-components
, you can pass any combination of otOperationalDatasetComponents, for exampleactivetimestamp
,pendingtimestamp
, ornetworkkey
. - The optional
-x
argument specifies raw TLVs to be requested.
Examples
dataset mgmtgetcommand active address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp securitypolicy
Done
dataset mgmtgetcommand active networkname
Done
CLI and API References
- otDatasetSendMgmtActiveGet
- dataset mgmtgetcommand pending
- dataset mgmtsetcommand active
- dataset mgmtsetcommand pending
dataset mgmtgetcommand pending
Sends MGMT_PENDING_GET.
Parameters
dataset mgmtgetcommand pending [address leader-address] [dataset-components] [-x tlv-list]
To learn more about these parameters and argument mappings, refer to Display and Manage Datasets with OT CLI.
Examples
dataset mgmtgetcommand pending address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp securitypolicy
Done
dataset mgmtgetcommand pending networkname
Done
CLI and API References
- otDatasetSendMgmtPendingGet
- dataset mgmtgetcommand active
- dataset mgmtsetcommand active
- dataset mgmtsetcommand pending
dataset mgmtsetcommand active
Sends MGMT_ACTIVE_SET.
Parameters
dataset mgmtsetcommand active [dataset-components] [-x tlv-list]
To learn more about these parameters and argument mappings, refer to Display and Manage Datasets with OT CLI.
Examples
dataset mgmtsetcommand active activetimestamp 123 securitypolicy 1 onrcb
Done
CLI and API References
- otDatasetSendMgmtActiveSet
- dataset mgmtgetcommand active
- dataset mgmtgetcommand pending
- dataset mgmtsetcommand pending
dataset mgmtsetcommand pending
Sends MGMT_PENDING_SET.
Parameters
dataset mgmtsetcommand pending [dataset-components] [-x tlv-list]
To learn more about these parameters and argument mappings, refer to Display and Manage Datasets with OT CLI.
Examples
dataset mgmtsetcommand pending activetimestamp 123 securitypolicy 1 onrcb
Done
CLI and API References
- otDatasetSendMgmtPendingSet
- dataset mgmtgetcommand active
- dataset mgmtgetcommand pending
- dataset mgmtsetcommand active
dataset networkkey (get,set)
Gets or sets otOperationalDataset::mNetworkKey.
Parameters
dataset networkkey [key]
Use the optional key
argument to set the Network Key.
Examples
dataset networkkey
00112233445566778899aabbccddeeff
Done
dataset networkkey 00112233445566778899aabbccddeeff
Done
CLI and API References
- No associated API
dataset networkname (get,set)
Gets or sets otOperationalDataset::mNetworkName.
Parameters
dataset networkname [name]
Use the optional name
argument to set the Network Name.
Examples
dataset networkname
OpenThread
Done
dataset networkname OpenThread
Done
CLI and API References
dataset panid (get,set)
Gets or sets otOperationalDataset::mPanId.
Parameters
dataset panid [panid]
Use the optional panid
argument to set the PAN ID.
Examples
dataset panid
0x1234
Done
dataset panid 0x1234
Done
CLI and API References
- No associated API
dataset pendingtimestamp (get,set)
Gets or sets otOperationalDataset::mPendingTimestamp.
Parameters
dataset pendingtimestamp [timestamp]
Use the optional timestamp
argument to set the pending timestamp seconds.
Examples
dataset pendingtimestamp
123456789
Done
dataset pendingtimestamp 123456789
Done
CLI and API References
- No associated API
dataset pskc (get,set)
Gets or sets otOperationalDataset::mPskc.
Parameters
dataset pskc [-p passphrase] | [key]
For FTD only, use -p
with the passphrase
argument. -p
generates a pskc from the UTF-8 encoded passphrase
that you provide, together with the network name and extended PAN ID. If set, -p
uses the dataset buffer; otherwise, it uses the current stack. Alternatively, you can set pskc as key
(hex format).
Examples
dataset pskc
67c0c203aa0b042bfb5381c47aef4d9e
Done
dataset pskc -p 123456
Done
dataset pskc 67c0c203aa0b042bfb5381c47aef4d9e
Done
CLI and API References
- No associated API
dataset securitypolicy (get,set)
Gets or sets the Dataset security policy.
Parameters
dataset securitypolicy [rotationtime [onrcCepR]]
- Use
rotationtime
forthrKeyRotation
, in units of hours. - Security Policy commands use the
onrcCepR
argument mappings to get and set otSecurityPolicy members, for exampleo
represents otSecurityPolicy::mObtainNetworkKeyEnabled. For more information, refer to Display and Manage Datasets with OT CLI.
Examples
dataset securitypolicy
672 onrc
Done
dataset securitypolicy 672 onrc
Done
CLI and API References
- No associated API
dataset set (active,pending)
Sets the Active Operational Dataset.
If the dataset does not include an Active Timestamp, the dataset is only partially complete.
If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network.
If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.
If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.
The CLI dataset set
command sets the Active Operational Dataset using hex-encoded TLVs.
Parameters
dataset set {active|pending} tlvs
Examples
dataset set active 0e08000000000001000000030000103506000...3023d82c841eff0e68db86f35740c030000ff
Done
dataset set pending 0e08000000000001000000030000103506000...3023d82c841eff0e68db86f35740c030000ff
Done
CLI and API References
dataset tlvs
Converts a given Operational Dataset to
otOperationalDatasetTlvs
.
Parameters
No parameters.
Examples
dataset tlvs
0e080000000000010000000300001635060004001fffe0020...f7f8
Done
CLI and API References
delaytimermin (set)
Sets the minimal delay timer (in seconds).
Parameters
delaytimermin delaytimermin
Examples
delaytimermin 60
Done
CLI and API References
delaytimermin
Get the minimal delay timer (in seconds).
Parameters
No parameters.
Examples
delaytimermin
30
Done
CLI and API References
detach async
Start the graceful detach process similar to the detach
command without blocking and waiting for the callback indicating that detach is finished.
Parameters
No parameters.
Examples
detach async
Done
CLI and API References
detach
Start 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.
Parameters
No parameters.
Examples
detach
Finished detaching
Done
CLI and API References
deviceprops (set)
Sets the device properties.
Parameters
deviceprops powerSupply isBr supportsCcm isUnstable weightAdjustment
powerSupply
: should be 'battery', 'external', 'external-stable', 'external-unstable'.
Examples
deviceprops battery 0 0 0 -5
Done
deviceprops
PowerSupply : battery
IsBorderRouter : no
SupportsCcm : no
IsUnstable : no
WeightAdjustment : -5
Done
CLI and API References
deviceprops
Get the current device properties.
Requires OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE
.
Parameters
No parameters.
Examples
deviceprops
PowerSupply : external
IsBorderRouter : yes
SupportsCcm : no
IsUnstable : no
WeightAdjustment : 0
Done
CLI and API References
discover
Perform an MLE Discovery operation.
Parameters
discover [channel]
channel
: The channel to discover on. If no channel is provided, the discovery will cover all valid channels.
Examples
discover
| J | Network Name | Extended PAN | PAN | MAC Address | Ch | dBm | LQI |
+---+------------------+------------------+------+------------------+----+-----+-----+
| 0 | OpenThread | dead00beef00cafe | ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 |
Done
CLI and API References
discover reqcallback (enable,disable)
Sets a callback to receive MLE Discovery Request data.
Parameters
discover reqcallback enable|disable
Examples
discover reqcallback enable
Done
CLI and API References
dns browse
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
).
Parameters
dns browse service-name [dns-server-IP] [dns-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
Examples
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
instance2
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=1234] TTL:7300
Done
dns browse _airplay._tcp.default.service.arpa
DNS browse response for _airplay._tcp.default.service.arpa.
Mac mini
Port:7000, Priority:0, Weight:0, TTL:10
Host:Mac-mini.default.service.arpa.
HostAddress:fd97:739d:386a:1:1c2e:d83c:fcbe:9cf4 TTL:10
Done
CLI and API References
dns compression (enable,disable)
Set the "DNS name compression" mode.
By default DNS name compression is enabled. When disabled, DNS names are appended as full and never compressed. This is applicable to OpenThread's DNS and SRP client/server modules." OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is required.
Parameters
dns compression [enable|disable]
Examples
dns compression enable
Enabled
dns compression disable
Done
dns compression
Disabled
Done
CLI and API References
dns compression
Indicates whether the "DNS name compression" mode is enabled or not.
This is intended for testing only and available when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
config is enabled.
By default DNS name compression is enabled. When disabled, DNS names are appended as full and never compressed. This is applicable to OpenThread's DNS and SRP client/server modules." OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is required.
Parameters
dns compression [enable|disable]
Examples
dns compression
Enabled
CLI and API References
dns config (set)
Sets the default query config on DNS client.
In a non-NULL aConfig
, caller can choose to leave some of the fields in
otDnsQueryConfig
instance unspecified (value zero). The unspecified fields are replaced by the corresponding OT config option definitions OPENTHREAD_CONFIG_DNS_CLIENTDEFAULT{}
to form the default query config.
When OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_ADDRESS_AUTO_SET_ENABLE
is enabled, the server's IPv6 address in the default config is automatically set and updated by DNS client. This is done only when user does not explicitly set or specify it. This behavior requires SRP client and its auto-start feature to be enabled. SRP client will then monitor the Thread Network Data for DNS/SRP Service entries to select an SRP server. The selected SRP server address is also set as the DNS server address in the default config.
We 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. OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
is required.
Parameters
dns config [dns-server-IP] [dns-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean] [service-mode]
Examples
dns config fd00::1 1234 5000 2 0
Done
dns config
Server: [fd00:0:0:0:0:0:0:1]:1234
ResponseTimeout: 5000 ms
MaxTxAttempts: 2
RecursionDesired: no
Done
dns config fd00::2
Done
dns config
Server: [fd00:0:0:0:0:0:0:2]:53
ResponseTimeout: 3000 ms
MaxTxAttempts: 3
RecursionDesired: yes
Done
CLI and API References
dns config
Gets the current default query config used by DNS client.
When OpenThread stack starts, the default DNS query config is determined from a set of OT config options such as OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_IP6_ADDRESS
, _DEFAULT_SERVER_PORT
, _DEFAULT_RESPONSE_TIMEOUT
, etc. (see config/dns_client.h
for all related config options).
The config includes the 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. OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
is required.
Parameters
No parameters.
Examples
dns config
Server: [fd00:0:0:0:0:0:0:1]:1234
ResponseTimeout: 5000 ms
MaxTxAttempts: 2
RecursionDesired: no
ServiceMode: srv
Nat64Mode: allow
Done
CLI and API References
dns resolve
Sends an address resolution DNS query for AAAA (IPv6) record(s) for a given host name.
The aConfig
can be NULL. In this case the default config (from
otDnsClientGetDefaultConfig()
) will be used as the config for this query. In a non-NULL aConfig
, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
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).
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.
Parameters
dns resolve hostname [dns-server-IP] [dns-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
Examples
dns resolve ipv6.google.com
DNS response for ipv6.google.com - 2a00:1450:401b:801:0:0:0:200e TTL: 300
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
Done
CLI and API References
dns service
Starts a DNS service instance resolution for a given service instance.
Is available when OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE
is enabled.
The aConfig
can be NULL. In this case the default config (from
otDnsClientGetDefaultConfig()
) will be used as the config for this query. In a non-NULL aConfig
, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
The function sends queries for SRV and/or TXT records for the given service instance. The mServiceMode
field in
otDnsQueryConfig
determines which records to query (SRV only, TXT only, or both SRV and TXT) and how to perform the query (together in the same message, separately in parallel, or in optimized mode where client will try in the same message first and then separately if it fails to get a response).
The SRV record provides information about service port, priority, and weight along with the host name associated with the service instance. This function DOES NOT perform address resolution for the host name discovered from SRV record. The server/resolver may provide AAAA/A record(s) for the host name in the Additional Data section of the response to SRV/TXT query and this information can be retrieved using
otDnsServiceResponseGetServiceInfo()
in otDnsServiceCallback
. Users of this API MUST NOT assume that host address will always be available from
otDnsServiceResponseGetServiceInfo()
.
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
).
Parameters
dns service service-instance-label service-name [DNS-server-IP] [DNS-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
Examples
CLI and API References
dns servicehost
Starts a DNS service instance resolution for a given service instance, with a potential follow-up address resolution for the host name discovered for the service instance.
Is available when OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE
is enabled.
The aConfig
can be NULL. In this case the default config (from
otDnsClientGetDefaultConfig()
) will be used as the config for this query. In a non-NULL aConfig
, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config. This function cannot be used with mServiceMode
in DNS config set to OT_DNS_SERVICE_MODE_TXT
(i.e., querying for TXT record only) and will return OT_ERROR_INVALID_ARGS
.
Behaves similarly to
otDnsClientResolveService()
sending queries for SRV and TXT records. However, if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query (in the Additional Data section), it will perform host name resolution (sending an AAAA query) for the discovered host name from the SRV record. The callback aCallback
is invoked when responses for all queries are received (i.e., both service and host address resolutions are finished).
Send a service instance resolution DNS query for a given service instance with potential follow-up host name resolution. 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
).
Parameters
dns servicehost service-instance-label service-name [DNS-server-IP] [DNS-server-port] [response-timeout-ms] [max-tx-attempts] [recursion-desired-boolean]
Examples
CLI and API References
domainname (set)
Sets the Thread Domain Name.
Only succeeds when Thread protocols are disabled.
Parameters
domainname name
Use a backslash
to escape spaces.
Examples
domainname Test\ Thread
Done
CLI and API References
domainname
Gets the Thread Domain Name.
Parameters
No parameters.
Examples
domainname
Thread
Done
CLI and API References
dua iid (set,clear)
Sets or clears the Interface Identifier manually specified for the Thread Domain Unicast Address.
Available when OPENTHREAD_CONFIG_DUA_ENABLE
is enabled.
Parameters
dua iid iid|clear
dua iid clear
passes a nullptr
to otThreadSetFixedDuaInterfaceIdentifier. Otherwise, you can pass the iid
.
Examples
dua iid 0004000300020001
Done
dua iid clear
Done
CLI and API References
dua iid
Gets the Interface Identifier manually specified for the Thread Domain Unicast Address.
Available when OPENTHREAD_CONFIG_DUA_ENABLE
is enabled.
Parameters
No parameters.
Examples
dua iid
0004000300020001
Done
CLI and API References
eidcache
Returns the EID-to-RLOC cache entries.
Parameters
No parameters.
Examples
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
Done
CLI and API References
eui64
Gets the factory-assigned IEEE EUI-64 for this interface.
Parameters
No parameters.
Examples
eui64
0615aae900124b00
Done
CLI and API References
extaddr (set)
Sets the IEEE 802.15.4 Extended Address.
Parameters
extaddr extaddr
Examples
extaddr dead00beef00cafe
dead00beef00cafe
Done
CLI and API References
extaddr
Gets the IEEE 802.15.4 Extended Address.
Parameters
No parameters.
Examples
extaddr
dead00beef00cafe
Done
CLI and API References
extpanid (set)
Sets the IEEE 802.15.4 Extended PAN ID.
Parameters
extpanid extpanid
Examples
extpanid dead00beef00cafe
Done
CLI and API References
extpanid
Gets the IEEE 802.15.4 Extended PAN ID.
Parameters
No parameters.
Examples
extpanid
dead00beef00cafe
Done
CLI and API References
factoryreset
Deletes all the settings stored on non-volatile memory, and then triggers a platform reset.
Parameters
No parameters.
Examples
factoryreset
CLI and API References
fake (a,an)
Sends fake Thread messages.
Available when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
Parameters
fake /a/an dst-ipaddr target meshLocalIid
Examples
fake /a/an fdde:ad00:beef:0:0:ff:fe00:a800 fd00:7d03:7d03:7d03:55f2:bb6a:7a43:a03b 1111222233334444
Done
CLI and API References
fem
Gets external FEM parameters.
Parameters
No parameters.
Examples
fem
LNA gain 11 dBm
Done
CLI and API References
fem lnagain (get)
Gets the external FEM's Rx LNA gain in dBm.
Parameters
No parameters.
Examples
fem lnagain
11
Done
CLI and API References
fem lnagain (set)
Sets the external FEM's Rx LNA gain in dBm.
Parameters
No parameters.
Examples
fem lnagain 8
Done
CLI and API References
ifconfig (up,down)
Brings the IPv6 interface up or down.
Call this to enable or disable IPv6 communication.
Parameters
ifconfig up|down
Examples
ifconfig up
Done
ifconfig down
Done
CLI and API References
ifconfig
Indicates whether or not the IPv6 interface is up.
Parameters
No parameters.
Examples
ifconfig
down
Done
ifconfig
up
Done
CLI and API References
instanceid
Gets the instance identifier.
The instance identifier is set to a random value when the instance is constructed, and then its value will not change after initialization.
Parameters
No parameters.
Examples
instanceid
468697314
Done
CLI and API References
ipaddr add
Adds a Network Interface Address to the Thread interface.
The passed-in instance aAddress
is copied by the Thread interface. The Thread interface only supports a fixed number of externally added unicast addresses. See OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
.
Parameters
ipaddr add aAddress
Examples
ipaddr add 2001::dead:beef:cafe
Done
CLI and API References
ipaddr del
Removes a Network Interface Address from the Thread interface.
Parameters
ipaddr del aAddress
Examples
ipaddr del 2001::dead:beef:cafe
Done
CLI and API References
ipaddr
Gets the list of IPv6 addresses assigned to the Thread interface.
Parameters
ipaddr [-v]
Use -v
to get verbose IP Address information.
Examples
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
Done
ipaddr -v
fdde:ad00:beef:0:0:ff:fe00:0 origin:thread
fdde:ad00:beef:0:558:f56b:d688:799 origin:thread
fe80:0:0:0:f3d9:2a82:c8d8:fe43 origin:thread
Done
CLI and API References
ipaddr linklocal
Gets the Thread link-local IPv6 address.
The Thread link local address is derived using IEEE802.15.4 Extended Address as Interface Identifier.
Parameters
No parameters.
Examples
ipaddr linklocal
fe80:0:0:0:f3d9:2a82:c8d8:fe43
Done
CLI and API References
ipaddr mleid
Gets the Mesh Local EID address.
Parameters
No parameters.
Examples
ipaddr mleid
fdde:ad00:beef:0:558:f56b:d688:799
Done
CLI and API References
ipaddr rloc
Gets the Thread Routing Locator (RLOC) address.
Parameters
No parameters.
Examples
ipaddr rloc
fdde:ad00:beef:0:0:ff:fe00:0
Done
CLI and API References
ipmaddr add
Subscribes the Thread interface to a Network Interface Multicast Address.
The passed in instance aAddress
will be copied by the Thread interface. The Thread interface only supports a fixed number of externally added multicast addresses. See OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
.
Parameters
ipmaddr add aAddress
Examples
ipmaddr add ff05::1
Done
CLI and API References
ipmaddr del
Unsubscribes the Thread interface to a Network Interface Multicast Address.
Parameters
ipmaddr del aAddress
Examples
ipmaddr del ff05::1
Done
CLI and API References
ipmaddr
Gets the list of IPv6 multicast addresses subscribed to the Thread interface.
Parameters
No parameters.
Examples
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
Done
CLI and API References
ipmaddr llatn
Gets the Thread Link-Local All Thread Nodes multicast address.
The address is a link-local Unicast Prefix-Based Multicast Address [RFC 3306], with:
- flgs set to 3 (P = 1 and T = 1)
- scop set to 2
- plen set to 64
- network prefix set to the Mesh Local Prefix
- group ID set to 1
Parameters
No parameters.
Examples
ipmaddr llatn
ff32:40:fdde:ad00:beef:0:0:1
Done
CLI and API References
ipmaddr promiscuous (enable,disable)
Enables or disables multicast promiscuous mode on the Thread interface.
Parameters
ipmaddr promiscuous enable|disable
Examples
ipmaddr promiscuous enable
Done
ipmaddr promiscuous disable
Done
CLI and API References
ipmaddr promiscuous
Checks if multicast promiscuous mode is enabled on the Thread interface.
Parameters
No parameters.
Examples
ipmaddr promiscuous
Disabled
Done
CLI and API References
ipmaddr rlatn
Gets the Thread Realm-Local All Thread Nodes multicast address.
The address is a realm-local Unicast Prefix-Based Multicast Address [RFC 3306], with:
- flgs set to 3 (P = 1 and T = 1)
- scop set to 3
- plen set to 64
- network prefix set to the Mesh Local Prefix
- group ID set to 1
Parameters
No parameters.
Examples
ipmaddr rlatn
ff33:40:fdde:ad00:beef:0:0:1
Done
CLI and API References
joiner discerner (set)
Sets the Joiner Discerner.
Parameters
joiner discerner discerner
- Use
{number}/{length}
to set thediscerner
. joiner discerner clear
setsaDiscerner
tonullptr
.
Examples
joiner discerner 0xabc/12
Done
CLI and API References
joiner discerner clear
Clear the Joiner discerner.
Parameters
No parameters.
Examples
joiner discerner clear
Done
CLI and API References
- No associated API
joiner discerner
Gets the Joiner Discerner.
For more information, refer to otJoinerSetDiscerner.
Parameters
No parameters.
Examples
joiner discerner
0xabc/12
Done
CLI and API References
joiner help
Print the joiner
help menu.
Parameters
No parameters.
Examples
joiner help
help
id
start
state
stop
Done
CLI and API References
- No associated API
joiner id
Gets the Joiner ID.
If a Joiner Discerner is not set, Joiner ID is the first 64 bits of the result of computing SHA-256 over factory-assigned IEEE EUI-64. Otherwise the Joiner ID is calculated from the Joiner Discerner value.
The Joiner ID is also used as the device's IEEE 802.15.4 Extended Address during the commissioning process.
Parameters
No parameters.
Examples
joiner id
d65e64fa83f81cf7
Done
CLI and API References
joiner start
Enables the Thread Joiner role.
Parameters
joiner start joining-device-credential [provisioning-url]
joining-device-credential
: Joiner Passphrase. Must be a string of all uppercase alphanumeric characters (0-9 and A-Y, excluding I, O, Q, and Z for readability), with a length between 6 and 32 characters.provisioning-url
: Provisioning URL for the Joiner (optional).
Examples
joiner start J01NM3
Done
CLI and API References
joiner state
Gets the Joiner State.
Returns one of the following states:
-
Idle
-
Discover
-
Connecting
-
Connected
-
Entrust
-
Joined
Parameters
No parameters.
Examples
joiner state
Idle
Done
CLI and API References
joiner stop
Disables the Thread Joiner role.
Parameters
No parameters.
Examples
joiner stop
Done
CLI and API References
joinerport (set)
Sets the Joiner UDP Port.
Parameters
joinerport udp-port
Examples
joinerport 1000
Done
CLI and API References
joinerport
Gets the Joiner UDP Port.
Parameters
No parameters.
Examples
joinerport
1000
Done
CLI and API References
keysequence counter (set)
Sets the thrKeySequenceCounter.
Parameters
keysequence counter counter
Examples
keysequence counter 10
Done
CLI and API References
keysequence counter
Gets the thrKeySequenceCounter.
Parameters
No parameters.
Examples
keysequence counter
10
Done
CLI and API References
keysequence guardtime (set)
Sets the thrKeySwitchGuardTime (in hours).
Parameters
keysequence guardtime guardtime-hours
Use 0
to Thread Key Switch
immediately if there's a key index match.
Examples
keysequence guardtime 0
Done
CLI and API References
keysequence guardtime
Gets the thrKeySwitchGuardTime (in hours).
Parameters
No parameters.
Examples
keysequence guardtime
0
Done
CLI and API References
leaderdata
Gets the Thread Leader Data.
Parameters
No parameters.
Examples
leaderdata
Partition ID: 1077744240
Weighting: 64
Data Version: 109
Stable Data Version: 211
Leader Router ID: 60
Done
CLI and API References
leaderweight (set)
Sets the Thread Leader Weight used when operating in the Leader role.
Directly sets the Leader Weight to the new value, replacing its previous value (which may have been determined from the current
otDeviceProperties
).
Parameters
leaderweight weight
Examples
leaderweight 128
Done
CLI and API References
leaderweight
Gets the Thread Leader Weight used when operating in the Leader role.
Parameters
No parameters.
Examples
leaderweight
128
Done
CLI and API References
linkmetrics mgmt enhanced-ack clear
Sends a Link Metrics Management Request to clear an Enhanced-ACK Based Probing.
Parameters
linkmetrics mgmt peer-ipaddr enhanced-ack clear
peer-ipaddr
should be the Link Local address of the neighboring device.
Examples
linkmetrics mgmt 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: Success
CLI and API References
linkmetrics mgmt enhanced-ack register
Sends a Link Metrics Management Request to register an Enhanced-ACK Based Probing.
Parameters
linkmetrics mgmt peer-ipaddr enhanced-ack register [qmr][r]
[q
, m
, and r
] map to otLinkMetricsValues. Per spec 4.11.3.4.4.6, you can only use a maximum of two options at once, for example q
, or qm
.
q
: Layer 2 LQI.m
: Link Margin.r
: RSSI.
r
is optional and only used for reference devices. When this option is specified, Type/Average Enum of each Type Id Flags is set to reserved. This is used to verify that the Probing Subject correctly handles invalid Type Id Flags, and only available when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
Examples
linkmetrics mgmt 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 mgmt 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 series
CLI and API References
linkmetrics mgmt forward
Sends an MLE Link Metrics Management Request to configure or clear a Forward Tracking Series.
Parameters
linkmetrics mgmt peer-ipaddr forward series-id [ldraX][pqmr]
peer-ipaddr
: Peer address.series-id
: The Series ID.- [
l
,d
,r
, anda
] map to otLinkMetricsSeriesFlags.X
represents none of theotLinkMetricsSeriesFlags
, and stops the accounting and removes the series.l
: MLE Link Probe.d
: MAC Data.r
: MAC Data Request.a
: MAC Ack.X
: Can only be used without any other flags.
- [
p
,q
,m
, andr
] map to otLinkMetricsValues.p
: Layer 2 Number of PDUs received.q
: Layer 2 LQI.m
: Link Margin.r
: RSSI.
Examples
linkmetrics mgmt 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: SUCCESS
CLI and API References
linkmetrics probe
Sends an MLE Link Probe message.
Parameters
linkmetrics probe peer-ipaddr series-id length
peer-ipaddr
: Peer address.series-id
: The Series ID for which this Probe message targets.length
: The length of the Probe message. A valid range is [0, 64].
Examples
linkmetrics probe fe80:0:0:0:3092:f334:1455:1ad2 1 10
Done
CLI and API References
linkmetrics query forward
Perform a Link Metrics query (Forward Tracking Series).
Parameters
linkmetrics query peer-ipaddr forward series-id
peer-ipaddr
: Peer address.series-id
: The Series ID.
Examples
linkmetrics query 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)
CLI and API References
linkmetrics query single
Perform a Link Metrics query (Single Probe).
Parameters
linkmetrics query peer-ipaddr single [pqmr]
peer-ipaddr
: Peer address.- [
p
,q
,m
, andr
] map to otLinkMetrics.p
: Layer 2 Number of PDUs received.q
: Layer 2 LQI.m
: Link Margin.r
: RSSI.
Examples
linkmetrics query 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)
CLI and API References
linkmetricsmgr (enable,disable)
Enable or disable Link Metrics Manager.
Parameters
linkmetricsmgr enable|disable
Examples
linkmetricmgr enable
Done
linkmetricmgr disable
Done
CLI and API References
linkmetricsmgr show
Get Link Metrics data of a neighbor by its extended address.
Parameters
No parameters.
Examples
linkmetricsmgr show
ExtAddr:827aa7f7f63e1234, LinkMargin:80, Rssi:-20
Done
CLI and API References
locate (set)
Locate the closest destination of an anycast address (i.e., find the destination's mesh local EID and RLOC16).
The closest destination is determined based on the current routing table and path costs within the Thread mesh.
Available when OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE
is enabled.
Parameters
locate anycastaddr
Examples
locate fdde:ad00:beef:0:0:ff:fe00:fc00
fdde:ad00:beef:0:d9d3:9000:16b:d03b 0xc800
Done
CLI and API References
locate
Gets the current state (In Progress
or Idle
) of anycast locator.
Available when OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE
is enabled.
Parameters
No parameters.
Examples
locate
Idle
Done
locate fdde:ad00:beef:0:0:ff:fe00:fc10
locate
In Progress
Done
CLI and API References
log filename
Specifies filename to capture
otPlatLog()
messages, useful when debugging automated test scripts on Linux when logging disrupts the automated test scripts.
Requires OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART
and OPENTHREAD_POSIX
.
Parameters
log filename filename
Examples
CLI and API References
log level (set)
Sets the log level.
Parameters
log level level
Examples
log level 4
Done
CLI and API References
log level
Get the log level.
Parameters
No parameters.
Examples
log level
1
Done
CLI and API References
macfilter addr add
Is available only when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
configuration is enabled.
Adds an IEEE 802.15.4 Extended Address to the MAC filter list. If you specify the optional rss
argument, this fixes the received signal strength for messages from the address. If you do not use the rss
option, the address will use whatever default value you have set. If you have not set a default, the signal strength will be the over-air signal.
Parameters
macfilter addr add extaddr [rss]
Examples
macfilter addr add 0f6127e33af6b403 -95
Done
macfilter addr add 0f6127e33af6b402
Done
CLI and API References
macfilter addr allowlist
Enables the allowlist
MAC filter mode, which means that only the MAC addresses in the MAC filter list will be allowed access.
Parameters
No parameters.
Examples
macfilter addr allowlist
Done
CLI and API References
macfilter addr clear
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
configuration is enabled.
This command clears all the extended addresses from the MAC filter list.
Parameters
No parameters.
Examples
macfilter addr clear
Done
CLI and API References
macfilter addr denylist
Enables the denylist
MAC filter mode, which means that all MAC addresses in the MAC filter list will be denied access.
Parameters
No parameters.
Examples
macfilter addr denylist
Done
CLI and API References
macfilter addr disable
Disables MAC filter modes.
Parameters
No parameters.
Examples
macfilter addr disable
Done
CLI and API References
- No associated API
macfilter addr
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
configuration is enabled.
Provides the following information:
- Current mode of the MAC filter list: Either
AllowList
,DenyList,
orDisabled
- A list of all the extended addresses in the filter. The received signal strength (rss) and link quality indicator (lqi) are listed next to the address if these values have been set to be different from the default values.
Parameters
No parameters.
Examples
macfilter addr
Allowlist
0f6127e33af6b403 : rss -95 (lqi 1)
0f6127e33af6b402
Done
CLI and API References
macfilter addr remove
Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
configuration is enabled.
This command removes the specified extended address from the MAC filter list.
Parameters
macfilter addr remove extaddr
Examples
macfilter addr remove 0f6127e33af6b402
Done
CLI and API References
macfilter
Provides the following information:
Address Mode
: Current mode of the MAC filter: EitherAllowList
,DenyList,
orDisabled
- A list of all the extended addresses in the MAC filter list. The received signal strength (rss) and link quality indicator (lqi) are listed next to the address if these values have been set to be different from the default values.
- A separate list (
RssIn List
) that shows all the extended addresses where therss
has been set to be different from the default value. Default rss
: Shows the default values, if applicable, for therss
andlqi
settings.
Parameters
No parameters.
Examples
macfilter
Address Mode: Allowlist
0f6127e33af6b403 : rss -95 (lqi 1)
0f6127e33af6b402
RssIn List:
0f6127e33af6b403 : rss -95 (lqi 1)
Default rss: -50 (lqi 3)
Done
CLI and API References
meshdiag childip6
Send a query to a parent to retrieve the IPv6 addresses of all its MTD children.
Parameters
meshdiag childip6 parent-rloc16
Examples
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
Done
CLI and API References
meshdiag childtable
Start 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 child is sleepy)
- Device Mode
- RSS (average and last)
- 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)
Parameters
No parameters.
Examples
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
Done
CLI and API References
- No associated API
meshdiag routerneighbortable
Start 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)
Parameters
meshdiag routerneighbortable router-rloc16
Examples
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
Done
CLI and API References
meshdiag topology
Discover network topology (list of routers and their connections). Parameters are optional and indicate additional items to discover. Can be added in any order.
ip6-addrs
to discover the list of IPv6 addresses of every router.children
to discover the child table of every router.
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 (
r
rx-on-when-idle,d
Full Thread Device,n
Full 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
)
Parameters
meshdiag topology [ip6-addrs] [children]
Examples
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 }
Done
CLI and API References
mleadvimax
Gets the current Interval Max value used by Advertisement trickle timer.
This API requires OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
, and is intended for testing only.
Parameters
No parameters.
Examples
mleadvimax
12000
Done
CLI and API References
mliid
Sets the Mesh Local IID (for test purpose).
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
must be enabled.
It must be used before Thread stack is enabled.
Only for testing/reference device.
Parameters
mliid iid
Examples
mliid 1122334455667788
Done
CLI and API References
mlr reg
Registers Multicast Listeners to Primary Backbone Router.
OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
and OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
must be enabled.
Omit timeout to use the default MLR timeout on the Primary Backbone Router.
Use timeout = 0 to deregister Multicast Listeners.
Parameters
mlr reg ipaddr [timeout]
Examples
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
Done
CLI and API References
mode (get,set)
Set the MLE Link Mode configuration.
Parameters
mode [rdn]
-
: -: no flags set (rx-off-when-idle, minimal Thread device, stable network data)r
: rx-on-when-idled
: Full Thread Devicen
: Full Network Data
Examples
mode rdn
Done
mode -
Done
CLI and API References
multiradio
Get 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.
Parameters
No parameters.
Examples
multiradio
[15.4, TREL]
Done
CLI and API References
- No associated API
multiradio neighbor list
Gets the multi radio link information associated with a neighbor with a given Extended Address.
OPENTHREAD_CONFIG_MULTI_RADIO
must be enabled.
Parameters
No parameters.
Examples
multiradio neighbor list
ExtAddr:3a65bc38dbe4a5be, RLOC16:0xcc00, Radios:[15.4(255), TREL(255)]
ExtAddr:17df23452ee4a4be, RLOC16:0x1300, Radios:[15.4(255)]
Done
CLI and API References
multiradio neighbor
Gets the multi radio link information associated with a neighbor with a given Extended Address.
OPENTHREAD_CONFIG_MULTI_RADIO
must be enabled.
Parameters
multiradio neighbor ext-address
Examples
multiradio neighbor 3a65bc38dbe4a5be
[15.4(255), TREL(255)]
Done
CLI and API References
nat64 (enable,disable)
Enable or disable NAT64 functions.
When OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
is enabled, setting disabled to true resets the mapping table in the translator.
Available when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
or OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
is enabled.
Parameters
nat64 enable|disable
Examples
nat64 enable
Done
nat64 disable
Done
CLI and API References
nat64 cidr
Parameters
No parameters.
Examples
nat64 cidr 192.168.255.0/24
Done
CLI and API References
nat64 cidr
Gets the IPv4 CIDR configured in the NAT64 translator.
Available when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
is enabled.
Parameters
No parameters.
Examples
nat64 cidr
192.168.255.0/24
Done
CLI and API References
nat64 counters
Gets the NAT64 translator packet and error counters.
Available when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
is enabled.
Parameters
No parameters.
Examples
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 |
Done
CLI and API References
nat64 mappings
Gets the next AddressMapping info (using an iterator).
Available when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
is enabled.
Parameters
No parameters.
Examples
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 |
CLI and API References
nat64 state
Gets the state of NAT64 functions.
PrefixManager
state is available when OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
is enabled. Translator
state is available when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
is enabled.
When OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE
is enabled, PrefixManager
returns one of the following states:
Disabled
: NAT64 prefix manager is disabled.NotRunning
: NAT64 prefix manager is enabled, but is not running. This could mean that the routing manager is disabled.Idle
: NAT64 prefix manager is enabled and is running, but is not publishing a NAT64 prefix. This can happen when there is another border router publishing a NAT64 prefix with a higher priority.Active
: NAT64 prefix manager is enabled, running, and publishing a NAT64 prefix.
When OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE
is enabled, Translator
returns one of the following states:
Disabled
: NAT64 translator is disabled.NotRunning
: NAT64 translator is enabled, but is not translating packets. This could mean that the Translator is not configured with a NAT64 prefix or a CIDR for NAT64.Active
: NAT64 translator is enabled and is translating packets.
Parameters
No parameters.
Examples
nat64 state
PrefixManager: Active
Translator: Active
Done
CLI and API References
neighbor conntime list
Print 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.
Parameters
No parameters.
Examples
neighbor conntime list
0x8401 1a28be396a14a318 age:63 conn-time:644
0x5c00 723ebf0d9eba3264 age:23 conn-time:852
0xe800 ce53628a1e3f5b3c age:23 conn-time:180
Done
CLI and API References
- No associated API
neighbor conntime
Print the connection time and age of neighbors. Info per neighbor:
- RLOC16
- Extended MAC address
- Last Heard (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}
.
Parameters
No parameters.
Examples
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 |
Done
CLI and API References
- No associated API
netdata full
Print "yes" or "no" indicating whether or not the "net data full" callback has been invoked since start of Thread operation or since the last time netdata full reset
was used to reset the flag. This command requires OPENTHREAD_CONFIG_BORDER_ROUTER_SIGNAL_NETWORK_DATA_FULL
. The "net data full" callback is invoked whenever:
- The device is acting as a leader and receives a Network Data registration from a Border Router (BR) that it cannot add to Network Data (running out of space).
- The device is acting as a BR and new entries cannot be added to its local Network Data.
- The device is acting as a BR and tries to register its local Network Data entries with the leader, but determines that its local entries will not fit.
Parameters
No parameters.
Examples
netdata full
no
Done
CLI and API References
netdata full reset
Reset the flag tracking whether "net data full" callback was invoked.
Parameters
No parameters.
Examples
netdata full reset
Done
CLI and API References
- No associated API
netdata help
Gets a list of netdata
CLI commands.
Parameters
No parameters.
Examples
netdata help
length
maxlength
publish
register
show
steeringdata
unpublish
Done
CLI and API References
netdata length
Get the current length (number of bytes) of Partition's Thread Network Data.
Parameters
No parameters.
Examples
netdata length
23
Done
CLI and API References
netdata maxlength
Get the maximum observed length of the Thread Network Data since OT stack initialization or since the last call to
otNetDataResetMaxLength()
.
Parameters
No parameters.
Examples
netdata maxlength
40
Done
CLI and API References
netdata maxlength reset
Reset the tracked maximum length of the Thread Network Data.
Parameters
No parameters.
Examples
netdata maxlength reset
Done
CLI and API References
netdata publish dnssrp anycast
Publishes a DNS/SRP Service Anycast Address with a sequence number. Any current DNS/SRP Service entry being published from a previous publish dnssrp{anycast|unicast}
command is removed and replaced with the new arguments.
OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
must be enabled.
Parameters
netdata publish dnssrp anycast seq-num
Examples
netdata publish dnssrp anycast 1
Done
CLI and API References
- netdata publish dnssrp unicast (addr,port)
- netdata publish dnssrp unicast (mle)
- otNetDataPublishDnsSrpServiceAnycast
netdata publish dnssrp unicast (addr,port)
Publishes a DNS/SRP Service Unicast Address with an address and port number. The address and port information is included in Service TLV data. Any current DNS/SRP Service entry being published from a previous publish dnssrp{anycast|unicast}
command is removed and replaced with the new arguments.
OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
must be enabled.
Parameters
netdata publish dnssrp unicast address port
Examples
netdata publish dnssrp unicast fd00::1234 51525
Done
CLI and API References
- netdata publish dnssrp unicast (mle)
- netdata publish dnssrp anycast
- otNetDataPublishDnsSrpServiceUnicast
netdata publish dnssrp unicast (mle)
Publishes the device's Mesh-Local EID with a port number. MLE and port information is included in the Server TLV data. To use a different Unicast address, use the netdata publish dnssrp unicast (addr,port)
command.
Any current DNS/SRP Service entry being published from a previous publish dnssrp{anycast|unicast}
command is removed and replaced with the new arguments.
OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
must be enabled.
Parameters
netdata publish dnssrp unicast port
Examples
netdata publish dnssrp unicast 50152
Done
CLI and API References
- netdata publish dnssrp unicast (addr,port)
- netdata publish dnssrp anycast
- otNetDataPublishDnsSrpServiceUnicastMeshLocalEid
netdata publish prefix
Publish an on-mesh prefix entry. For more information, refer to Display and Manage Network Data with OT CLI.
Parameters
netdata publish prefix prefix [padcrosnD] [high|med|low]
OT CLI uses mapped arguments to configure otBorderRouterConfig values. For more information, refer to the OpenThread CLI Overview.
Examples
netdata publish prefix fd00:1234:5678::/64 paos med
Done
CLI and API References
netdata publish replace
Replaces a previously published external route entry. For more information, refer to Display and Manage Network Data with OT CLI.
Parameters
netdata publish replace oldprefix prefix [sn] [high|med|low]
OT CLI uses mapped arguments to configure otExternalRouteConfig values. For more information, refer to the OpenThread CLI Overview.
Examples
netdata publish replace ::/0 fd00:1234:5678::/64 s high
Done
CLI and API References
netdata publish route
Publish an external route entry. For more information, refer to Display and Manage Network Data with OT CLI.
Parameters
publish route prefix [sn] [high|med|low]
OT CLI uses mapped arguments to configure otExternalRouteConfig values. For more information, refer to the OpenThread CLI Overview.
Examples
netdata publish route fd00:1234:5678::/64 s high
Done
CLI and API References
netdata register
Register configured prefixes, routes, and services with the Leader.
OT CLI checks for OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE
. If OTBR is enabled, it registers local Network Data with the Leader. Otherwise, it calls the CLI function otServerRegister
. For more information, refer to Display and Manage Network Data with OT CLI.
Parameters
No parameters.
Examples
netdata register
Done
CLI and API References
netdata show local
Print local Network Data to sync with the Leader.
Parameters
netdata show local [-x]
- The optional
-x
argument gets local Network Data as hex-encoded TLVs.
Examples
netdata show local
Prefixes:
fd00:dead:beef:cafe::/64 paros med dc00
Routes:
Services:
Done
netdata show local -x
08040b02174703140040fd00deadbeefcafe0504dc00330007021140
Done
CLI and API References
netdata show
netdata show
from OT CLI gets full Network Data received from the Leader. This command uses several API functions to combine prefixes, routes, and services, including otNetDataGetNextOnMeshPrefix, otNetDataGetNextRoute, otNetDataGetNextService and otNetDataGetNextLowpanContextInfo.
On-mesh prefixes are listed under Prefixes
header:
- The on-mesh prefix
- Flags
- 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 (only available for Thread 1.2).
- Preference
high
,med
, orlow
- RLOC16 of device which added the on-mesh prefix
External Routes are listed under Routes
header:
- The route prefix
- Flags
- s: Stable flag
- n: NAT64 flag
- Preference
high
,med
, orlow
- RLOC16 of device which added the route prefix
Service entries are listed under Services
header:
- Enterprise number
- Service data (as hex bytes)
- Server data (as hex bytes)
- Flags
- s: Stable flag
- RLOC16 of devices which added the service entry
6LoWPAN Context IDs are listed under Contexts
header:
- The prefix
- Context ID
- Compress flag (
c
if marked or-
otherwise).
For more information, refer to Display and Manage Network Data with OT CLI.
Parameters
netdata show [-x]
- The optional
-x
argument gets Network Data as hex-encoded TLVs.
Examples
netdata show
Prefixes:
fd00:dead:beef:cafe::/64 paros med dc00
Routes:
fd49:7770:7fc5:0::/64 s med 4000
Services:
44970 5d c000 s 4000
44970 01 9a04b000000e10 s 4000
Contexts:
fd00:dead:beef:cafe::/64 1 c
Done
netdata show -x
08040b02174703140040fd00deadbeefcafe0504dc00330007021140
Done
CLI and API References
netdata steeringdata check (discerner)
Check if the steering data includes a Joiner with a given discerner value.
Parameters
netdata steeringdata check discerner
discerner
: The Joiner discerner in format{number}/{length}
.
Examples
netdata steeringdata check 0xabc/12
Done
netdata steeringdata check 0xdef/12
Error 23: NotFound
CLI and API References
netdata steeringdata check (eui64)
Check if the steering data includes a Joiner.
Parameters
netdata steeringdata check eui64
eui64
: The IEEE EUI-64 of the Joiner.
Examples
netdata steeringdata check d45e64fa83f81cf7
Done
CLI and API References
netdata unpublish (prefix)
Unpublishes a previously published On-Mesh or External Route Prefix.
OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE
must be enabled.
For more information, refer to Display and Manage Network Data with OT CLI.
Parameters
netdata unpublish prefix
Examples
netdata unpublish fd00:1234:5678::/64
Done
CLI and API References
netdata unpublish dnssrp
Unpublishes any previously added DNS/SRP (Anycast or Unicast) Service entry from the Thread Network Data.
OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
must be enabled.
Parameters
No parameters.
Examples
netdata unpublish dnssrp
Done
CLI and API References
networkkey (key)
Set the Thread Network Key.
Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Parameters
networkkey key
Examples
networkkey 00112233445566778899aabbccddeeff
Done
CLI and API References
networkkey
Get the Thread Network Key.
Parameters
No parameters.
Examples
networkkey
00112233445566778899aabbccddeeff
Done
CLI and API References
networkname (name)
Set the Thread Network Name.
Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Parameters
networkname name
Examples
networkname OpenThread
Done
CLI and API References
networkname
Get the Thread Network Name.
Parameters
No parameters.
Examples
networkname
OpenThread
Done
CLI and API References
networktime (set)
Sets the 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.
Parameters
networktime timesyncperiod xtalthreshold
Examples
networktime 100 300
Done
CLI and API References
networktime
Gets the Thread network time and the time sync parameters.
Parameters
No parameters.
Examples
networktime
Network Time: 21084154us (synchronized)
Time Sync Period: 100s
XTAL Threshold: 300ppm
Done
CLI and API References
nexthop (get)
Gets the next hop and path cost towards a given RLOC16 destination.
Can be used with either aNextHopRloc16
or aPathCost
being NULL indicating caller does not want to get the value.
Parameters
nexthop rloc16
Examples
nexthop 0xc000
0xc000 cost:0
Done
nexthop 0x8001
0x2000 cost:3
Done
CLI and API References
nexthop
Output table of allocated Router IDs and current next hop and path cost for each router.
Parameters
No parameters.
Examples
nexthop
| ID |NxtHop| Cost |
+------+------+------+
| 9 | 9 | 1 |
| 25 | 25 | 0 |
| 30 | 30 | 1 |
| 46 | - | - |
| 50 | 30 | 3 |
| 60 | 30 | 2 |
Done
CLI and API References
panid (panid)
Set the IEEE 802.15.4 PAN ID.
Succeeds only when Thread protocols are disabled. A successful call to this function also invalidates the Active and Pending Operational Datasets in non-volatile memory.
Parameters
panid panid
Examples
panid 0xdead
Done
CLI and API References
panid
Get the IEEE 802.15.4 PAN ID.
Parameters
No parameters.
Examples
panid
0xdead
Done
CLI and API References
parent
Get the diagnostic information for a Thread Router as parent.
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.
Parameters
No parameters.
Examples
parent
Ext Addr: be1857c6c21dce55
Rloc: 5c00
Link Quality In: 3
Link Quality Out: 3
Age: 20
Version: 4
Done
CLI and API References
parent search
Starts the process for child to search for a better parent while staying attached to its current parent.
Must be used when device is attached as a child.
Parameters
No parameters.
Examples
parent search
Done
CLI and API References
parentpriority (get,set)
Gets or sets the assigned parent priority value: 1, 0, -1 or -2. -2 means not assigned.
Parameters
parentpriority [parentpriority]
Examples
parentpriority
1
Done
parentpriority 1
Done
CLI and API References
partitionid
Get the Thread Network Partition ID.
Parameters
No parameters.
Examples
partitionid
4294967295
Done
CLI and API References
partitionid preferred (get,set)
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is required.
Parameters
partitionid preferred partitionid
Examples
partitionid preferred
4294967295
Done
partitionid preferred 0xffffffff
Done
CLI and API References
platform
Print the current platform
Parameters
No parameters.
Examples
platform
NRF52840
Done
CLI and API References
- No associated API
pollperiod (get,set)
Get or set the customized data poll period of sleepy end device (milliseconds). Only for certification test.
Parameters
No parameters.
Examples
pollperiod
0
Done
pollperiod 10
Done
CLI and API References
preferrouterid
Specifies the preferred router ID that the leader should provide when solicited.
Parameters
preferrouterid routerid
Examples
preferrouterid 16
Done
CLI and API References
prefix add
Adds a valid prefix to the Network Data.
Parameters
prefix add prefix [padcrosnD] [high|med|low]
OT CLI uses mapped arguments to configure otBorderRouterConfig values. For more information, refer to the OpenThread CLI Overview.
Examples
prefix add 2001:dead:beef:cafe::/64 paros med
Done
prefix add fd00:7d03:7d03:7d03::/64 prosD low
Done
CLI and API References
prefix meshlocal
Get the mesh local prefix.
Parameters
No parameters.
Examples
prefix meshlocal
fdde:ad00:beef:0::/64
Done
CLI and API References
- No associated API
prefix
Get the prefix list in the local Network Data.
For more information about otBorderRouterConfig flags, refer to OpenThread CLI Overview.
Parameters
No parameters.
Examples
prefix
2001:dead:beef:cafe::/64 paros med
- fd00:7d03:7d03:7d03::/64 prosD med
Done
CLI and API References
prefix remove
Remove a border router configuration from the local network data.
Parameters
No parameters.
Examples
prefix remove 2001:dead:beef:cafe::/64
Done
CLI and API References
promiscuous (enable,disable)
Enables or disables the link layer promiscuous mode.
Parameters
promiscuous enable|disable
Examples
promiscuous enable
Done
promiscuous disable
Done
CLI and API References
promiscuous
Indicates whether or not promiscuous mode is enabled at the link layer.
Parameters
No parameters.
Examples
promiscuous
Disabled
Done
CLI and API References
pskc (set)
Sets the pskc in hexadecimal format.
Parameters
pskc key
Examples
pskc 67c0c203aa0b042bfb5381c47aef4d9e
Done
CLI and API References
- No associated API
pskc -p
Generates the pskc from the passphrase (UTF-8 encoded), together with the current network name and extended PAN ID.
Parameters
pskc -p passphrase
Examples
pskc -p 123456
Done
CLI and API References
- No associated API
pskc
Get the Thread PSKc.
Parameters
No parameters.
Examples
pskc
67c0c203aa0b042bfb5381c47aef4d9e
Done
CLI and API References
pskcref (set)
Set the Key Reference to the Thread PSKc.
Requires the build-time feature OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
to be enabled.
Will only succeed when Thread protocols are disabled. Upon success, this will also invalidate the Active and Pending Operational Datasets in non-volatile memory.
Parameters
pskc keyref
Examples
pskc 0x20017
Done
CLI and API References
pskcref
Get Key Reference to Thread PSKc stored.
Requires the build-time feature OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
to be enabled.
Parameters
No parameters.
Examples
pskcref
0x80000000
Done
CLI and API References
radio (enable,disable)
Enables or disables the radio.
Parameters
radio enable|disable
Examples
radio enable
Done
radio disable
Done
CLI and API References
radio stats clear
Resets the radio statistics.
All times are reset to 0.
Parameters
No parameters.
Examples
radio stats clear
Done
CLI and API References
radio stats
Gets the radio statistics.
The radio statistics include the time when the radio is in TX/RX/Sleep state. These times are in units of microseconds. All times are calculated from the last reset of radio statistics.
Parameters
No parameters.
Examples
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%)
Done
CLI and API References
rcp version
Get the radio version string.
Parameters
No parameters.
Examples
rcp version
OPENTHREAD/20191113-00825-g82053cc9d-dirty; SIMULATION; Jun 4 2020 17:53:16
Done
CLI and API References
region (set)
Set the region code.
The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Changing this can affect the transmit power limit.
Parameters
No parameters.
Examples
region US
Done
CLI and API References
region
Get the region code.
The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Parameters
No parameters.
Examples
region
US
Done
CLI and API References
releaserouterid (routerid)
Release a Router ID that has been allocated by the device in the Leader role.
Parameters
releaserouterid [routerid]
Examples
releaserouterid 16
Done
CLI and API References
rloc16
Get the RLOC16.
Parameters
No parameters.
Examples
rloc16
0xdead
Done
CLI and API References
route add
For parameters, use:
- s: Stable flag
- n: NAT64 flag
- prf: Default Router Preference, [high, med, low].
Add a valid external route to the Network Data.
Parameters
route add prefix [sn] [high|med|low]
Examples
route add 2001:dead:beef:cafe::/64 s med
Done
CLI and API References
route remove
Remove an external route configuration from the local network data.
Parameters
route remove [prefix]
Examples
route remove 2001:dead:beef:cafe::/64
Done
CLI and API References
route
Get the external route list in the local Network Data.
Parameters
No parameters.
Examples
route
2001:dead:beef:cafe::/64 s med
Done
CLI and API References
router (id)
The function retains diagnostic information for a given Thread Router.
Print diagnostic information for a Thread Router. The id may be a Router ID or an RLOC16.
Parameters
router [id]
Examples
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
Done
CLI and API References
router list
List allocated Router IDs.
Parameters
No parameters.
Examples
router list
8 24 50
Done
CLI and API References
router table
Prints a list of routers in a table format.
Parameters
No parameters.
Examples
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 |
Done
CLI and API References
routerdowngradethreshold (get,set)
Gets or sets the ROUTER_DOWNGRADE_THRESHOLD value.
Parameters
routerdowngradethreshold [threshold]
Examples
routerdowngradethreshold
23
Done
routerdowngradethreshold 23
Done
CLI and API References
routereligible (enable,disable)
Enables or disables the router role.
Parameters
routereligible [enable|disable]
Examples
routereligible enable
Done
routereligible disable
Done
CLI and API References
routereligible
Indicates whether the router role is enabled or disabled.
Parameters
No parameters.
Examples
routereligible
Enabled
Done
CLI and API References
routerselectionjitter
Gets or sets the ROUTER_SELECTION_JITTER value.
Parameters
routerselectionjitter [jitter]
Examples
routerselectionjitter
120
Done
routerselectionjitter 120
Done
CLI and API References
routerupgradethreshold (get,set)
Gets or sets the ROUTER_UPGRADE_THRESHOLD value.
Parameters
routerupgradethreshold [threshold]
Examples
routerupgradethreshold
16
Done
routerupgradethreshold 16
Done
CLI and API References
scan energy
Performs an IEEE 802.15.4 energy scan, and displays the time in milliseconds to use for scanning each channel. All channels are shown unless you specify a certain channel by using the channel option.
Parameters
scan energy [duration] [channel]
Examples
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 |
Done
CLI and API References
scan
Performs an active IEEE 802.15.4 scan. The scan covers all channels if no channel is specified; otherwise the span covers only the channel specified.
Parameters
scan [channel]
Examples
scan
| PAN | MAC Address | Ch | dBm | LQI |
+------+------------------+----+-----+-----+
| ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 |
Done
CLI and API References
service add
Adds service to the network data.
- enterpriseNumber: IANA enterprise number
- serviceData: Hex-encoded binary service data
- serverData: Hex-encoded binary server data
Parameters
service add enterpriseNumber serviceData serverData
Examples
service add 44970 112233 aabbcc
Done
netdata register
Done
CLI and API References
service remove
Removes service from the network data.
- enterpriseNumber: IANA enterprise number
- serviceData: Hex-encoded binary service data
Parameters
service remove enterpriseNumber serviceData
Examples
service remove 44970 112233
Done
netdata register
Done
CLI and API References
singleton
Indicates whether a node is the only router on the network. Returns either true
or false
.
Parameters
No parameters.
Examples
singleton
true
Done
CLI and API References
sntp query
Sends an SNTP query to obtain the current unix epoch time (from January 1, 1970).
- SNTP server default IP address:
2001:4860:4806:8::
(Google IPv6 NTP Server) - SNTP server default port:
123
Parameters
sntp query [SNTP server IP] [SNTP server port]
Examples
sntp query
SNTP response - Unix time: 1540894725 (era: 0)
Done
sntp query 64:ff9b::d8ef:2308
SNTP response - Unix time: 1540898611 (era: 0)
Done
CLI and API References
state
Returns the current role of the Thread device, or changes the role as specified with one of the options. Possible values returned when inquiring about the device role:
child
: The device is currently operating as a Thread child.router
: The device is currently operating as a Thread router.leader
: The device is currently operating as a Thread leader.detached
: The device is not currently participating in a Thread network/partition.disabled
: The Thread stack is currently disabled.
Using one of the options allows you to change the current role of a device, with the exclusion of changing to or from a disabled
state.
Parameters
state [child|router|leader|detached]
Examples
state
child
Done
state leader
Done
CLI and API References
- otThreadGetDeviceRole
- otThreadBecomeChild
- otThreadBecomeRouter
- otThreadBecomeLeader
- otThreadBecomeDetached
thread start
Starts the Thread protocol operation.
Parameters
No parameters.
Examples
thread start
Done
CLI and API References
thread stop
Stops the Thread protocol operation.
Parameters
No parameters.
Examples
thread stop
Done
CLI and API References
- No associated API
thread version
Gets the Thread protocol version.
Parameters
No parameters.
Examples
thread version
2
Done
CLI and API References
timeinqueue max
Gets the maximum time-in-queue for messages in the TX queue.
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.
The collected statistics can be reset by calling
otThreadResetTimeInQueueStat()
.
Parameters
No parameters.
Examples
timeinqueue max
281
Done
CLI and API References
timeinqueue reset
Resets the TX queue time-in-queue statistics.
Requires OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE
.
Parameters
No parameters.
Examples
timeinqueue reset
Done
CLI and API References
timeinqueue
Gets the time-in-queue histogram for messages in the TX queue.
Requires OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE
.
Histogram of the time-in-queue of messages in the transmit queue is collected. 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.
The histogram is returned as an array of uint32_t
values with aNumBins
entries. The first entry in the array (at index 0) represents the number of messages with a time-in-queue less than aBinInterval
. The second entry represents the number of messages with a time-in-queue greater than or equal to aBinInterval
, but less than 2 * aBinInterval
. And so on. The last entry represents the number of messages with time-in-queue greater than or equal to (aNumBins - 1) * aBinInterval
.
The collected statistics can be reset by calling
otThreadResetTimeInQueueStat()
. The histogram information is collected since the OpenThread instance was initialized or since the last time statistics collection was reset by calling the
otThreadResetTimeInQueueStat()
.
Pointers aNumBins
and aBinInterval
MUST NOT be NULL.
Parameters
No parameters.
Examples
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 |
Done
CLI and API References
trel (enable,disable)
Enables or disables the TREL radio operation.
Parameters
trel enable|disable
Examples
trel enable
Done
trel disable
Done
CLI and API References
trel filter (enable,disable)
Enables or disables TREL filter mode.
Parameters
trel filter enable|disable
Examples
trel filter enable
Done
trel filter disable
Done
CLI and API References
trel filter
Indicates whether TREL filter mode is enabled.
When filter mode is enabled, all Rx and Tx traffic sent through the TREL interface gets silently dropped.
Parameters
No parameters.
Examples
trel filter
Disabled
Done
CLI and API References
trel peers
Gets the TREL peer table in table or list format.
Parameters
trel peers [list]
Examples
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
Done
CLI and API References
trel
Indicates whether the TREL operation is enabled.
Parameters
No parameters.
Examples
trel
Enabled
Done
CLI and API References
tvcheck (enable,disable)
Enables or disables the Thread version check when upgrading to router or leader. This check is enabled by default.
Parameters
No parameters.
Examples
tvcheck enable
Done
tvcheck disable
Done
CLI and API References
txpower (get,set)
Gets (or sets with the use of the optional txpower
argument) the transmit power in dBm.
Parameters
txpower [txpower]
Examples
txpower -10
Done
txpower
-10 dBm
Done
CLI and API References
unsecure get
Lists all ports from the allowed unsecured port list.
Parameters
No parameters.
Examples
unsecure get
1234
Done
CLI and API References
unsecureport add
Adds a port to the allowed unsecured port list.
Parameters
unsecureport add port
Examples
unsecureport add 1234
Done
CLI and API References
unsecureport remove
Removes a specified port or all ports from the allowed unsecured port list.
Parameters
unsecureport remove port|all
Examples
unsecureport remove 1234
Done
unsecureport remove all
Done
CLI and API References
uptime ms
Returns the current instance uptime (in msec).
Requires OPENTHREAD_CONFIG_UPTIME_ENABLE
to be enabled.
The uptime is given as number of milliseconds since OpenThread instance was initialized.
Parameters
No parameters.
Examples
uptime ms
426238
Done
CLI and API References
uptime
Returns the current instance uptime as a human-readable string.
Requires OPENTHREAD_CONFIG_UPTIME_ENABLE
to be enabled.
The string follows the format "
If the resulting string does not fit in aBuffer
(within its aSize
characters), the string will be truncated but the outputted string is always null-terminated.
Parameters
No parameters.
Examples
uptime
12:46:35.469
Done
CLI and API References
vendor model
Get the vendor model string.
Parameters
No parameters.
Examples
vendor model
Hub Max
Done
CLI and API References
vendor name
Get the vendor name string.
Parameters
No parameters.
Examples
vendor name
nest
Done
CLI and API References
vendor swversion
Get the vendor sw version string.
Parameters
No parameters.
Examples
vendor swversion
Marble3.5.1
Done
CLI and API References
version api
Prints the API version number.
Parameters
No parameters.
Examples
version api
28
Done
CLI and API References
- No associated API
version
Gets the OpenThread version string.
Parameters
No parameters.
Examples
version
OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09
Done