CLI Command Reference

Stay organized with collections Save and categorize content based on your preferences.

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 (enable,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 enable
Done
bbr disable
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 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 (enable,disable)

Enables or disables the Border Routing Manager.

Parameters

No parameters.

Examples

br enable
Done
br disable
Done

CLI and API References

br favorednat64prefix

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 favorednat64prefix
fd14:1078:b3d5:b0b0:0:0::/96 prf:low
Done

CLI and API References

br favoredomrprefix

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 favoredomrprefix
fdfc:1ff5:1512:5622::/64 prf:low
Done

CLI and API References

br nat64prefix

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
fd14:1078:b3d5:b0b0:0:0::/96
Done

CLI and API References

br omrprefix

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
fdfc:1ff5:1512:5622::/64
Done

CLI and API References

br onlinkprefix

Gets the On-Link Prefix for the adjacent infrastructure link, for example fd41:2650:a6f5:0::/64.

An 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
fd41:2650:a6f5:0::/64
Done

CLI and API References

br prefixtable

This function 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)

This function sets the preference to use when advertising Route Info Options in Router Advertisement messages sent over the infrastructure link, for example for discovered OMR prefixes.

By default BR will use medium preference level, but this function allows the default value to be changed. As an example, it can be set to low preference in the case where device is a temporary BR (a mobile BR or a battery-powered BR) to indicate that other BRs (if any) should be preferred over this BR on the infrastructure link.

Parameters

br rioprf [high|med|low]

Examples

br rioprf
med
Done
br rioprf low
Done

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.

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
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

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

This function 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
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

childsupervision checktimeout (set)

Sets the supervision check timeout interval (in seconds).

Parameters

childsupervision checktimeout timeout-seconds

Examples

childsupervision checktimeout 30
Done

CLI and API References

childsupervision checktimeout

Gets the supervision check timeout interval (in seconds).

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).

This command can only be used with FTD devices.

Parameters

childsupervision interval interval-seconds

Examples

childsupervision interval 30
Done

CLI and API References

childsupervision interval

Gets the child supervision interval (in seconds).

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 supervision message (a data message with empty payload) to the child.

This command can only be used with FTD devices.

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: 1000 (in units of 10 symbols), 160ms
Timeout: 1000s
Done

CLI and API References

csl period

Sets the CSL period in units of 10 symbols.

Disable CSL by setting this parameter to 0.

Parameters

csl period period

Examples

csl period 3000
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
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::/64
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 example activetimestamp, pendingtimestamp, or networkkey.
  • 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

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

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

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

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]]

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

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

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

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

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 the discerner.
  • joiner discerner clear sets aDiscerner to nullptr.

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.

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.
The additional 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, and a] map to otLinkMetricsSeriesFlags. X represents none of the otLinkMetricsSeriesFlags, 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, and r] 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, and r] 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

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

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

netdata help

Gets a list of netdata CLI commands.

Parameters

No parameters.

Examples

netdata help
help
publish
register
show
steeringdata
unpublish
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)

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)

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 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 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, and otNetDataGetNextService.

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
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

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

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

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