1# OpenThread CLI Reference 2 3The OpenThread CLI exposes configuration and management APIs via a command line interface. Use the CLI to play with OpenThread, which can also be used with additional application code. The OpenThread test scripts use the CLI to execute test cases. 4 5## Separator and escaping characters 6 7The whitespace character (`' '`) is used to delimit the command name and the different arguments, together with tab (`'\t'`) and new line characters (`'\r'`, `'\n'`). 8 9Some arguments might require to accept whitespaces on them. For those cases the backslash character (`'\'`) can be used to escape separators or the backslash itself. 10 11Example: 12 13```bash 14> networkname Test\ Network 15Done 16> networkname 17Test Network 18Done 19> 20``` 21 22## OpenThread Command List 23 24- [ba](#ba) 25- [bbr](#bbr) 26- [br](README_BR.md) 27- [bufferinfo](#bufferinfo) 28- [ccathreshold](#ccathreshold) 29- [channel](#channel) 30- [child](#child-list) 31- [childip](#childip) 32- [childmax](#childmax) 33- [childsupervision](#childsupervision-interval) 34- [childtimeout](#childtimeout) 35- [coap](README_COAP.md) 36- [coaps](README_COAPS.md) 37- [coex](#coex) 38- [commissioner](README_COMMISSIONER.md) 39- [contextreusedelay](#contextreusedelay) 40- [counters](#counters) 41- [csl](#csl) 42- [dataset](README_DATASET.md) 43- [debug](#debug) 44- [delaytimermin](#delaytimermin) 45- [detach](#detach) 46- [deviceprops](#deviceprops) 47- [diag](#diag) 48- [discover](#discover-channel) 49- [dns](#dns-config) 50- [domainname](#domainname) 51- [dua](#dua-iid) 52- [eidcache](#eidcache) 53- [eui64](#eui64) 54- [extaddr](#extaddr) 55- [extpanid](#extpanid) 56- [factoryreset](#factoryreset) 57- [fake](#fake) 58- [fem](#fem) 59- [history](README_HISTORY.md) 60- [ifconfig](#ifconfig) 61- [instanceid](#instanceid) 62- [ipaddr](#ipaddr) 63- [ipmaddr](#ipmaddr) 64- [joiner](README_JOINER.md) 65- [joinerport](#joinerport-port) 66- [keysequence](#keysequence-counter) 67- [leaderdata](#leaderdata) 68- [leaderweight](#leaderweight) 69- [linkmetrics](#linkmetrics-config-async-ipaddr-enhanced-ack-clear) 70- [linkmetricsmgr](#linkmetricsmgr-disable) 71- [locate](#locate) 72- [log](#log-filename-filename) 73- [mac](#mac-retries-direct) 74- [macfilter](#macfilter) 75- [meshdiag](#meshdiag-topology-ip6-addrs-children) 76- [mliid](#mliid-iid) 77- [mlr](#mlr-reg-ipaddr--timeout) 78- [mode](#mode) 79- [multiradio](#multiradio) 80- [nat64](#nat64-cidr) 81- [neighbor](#neighbor-list) 82- [netdata](README_NETDATA.md) 83- [netstat](#netstat) 84- [networkdiagnostic](#networkdiagnostic-get-addr-type-) 85- [networkidtimeout](#networkidtimeout) 86- [networkkey](#networkkey) 87- [networkname](#networkname) 88- [networktime](#networktime) 89- [nexthop](#nexthop) 90- [panid](#panid) 91- [parent](#parent) 92- [parentpriority](#parentpriority) 93- [partitionid](#partitionid) 94- [ping](#ping-async--i-source--m-ipaddr-size-count-interval-hoplimit-timeout) 95- [platform](#platform) 96- [pollperiod](#pollperiod-pollperiod) 97- [preferrouterid](#preferrouterid-routerid) 98- [prefix](#prefix) 99- [promiscuous](#promiscuous) 100- [pskc](#pskc) 101- [pskcref](#pskcref) 102- [radio](#radio-enable) 103- [radiofilter](#radiofilter) 104- [rcp](#rcp) 105- [region](#region) 106- [releaserouterid](#releaserouterid-routerid) 107- [reset](#reset) 108- [rloc16](#rloc16) 109- [route](#route) 110- [router](#router-list) 111- [routerdowngradethreshold](#routerdowngradethreshold) 112- [routereligible](#routereligible) 113- [routerselectionjitter](#routerselectionjitter) 114- [routerupgradethreshold](#routerupgradethreshold) 115- [childrouterlinks](#childrouterlinks) 116- [scan](#scan-channel) 117- [service](#service) 118- [singleton](#singleton) 119- [sntp](#sntp-query-sntp-server-ip-sntp-server-port) 120- [state](#state) 121- [srp](README_SRP.md) 122- [tcat](README_TCAT.md) 123- [tcp](README_TCP.md) 124- [test](#test-tmforiginfilter-enabledisable) 125- [thread](#thread-start) 126- [timeinqueue](#timeinqueue) 127- [trel](#trel) 128- [tvcheck](#tvcheck-enable) 129- [txpower](#txpower) 130- [udp](README_UDP.md) 131- [unsecureport](#unsecureport-add-port) 132- [uptime](#uptime) 133- [vendor](#vendor-name) 134- [verhoeff](#verhoeff-calculate) 135- [version](#version) 136 137## OpenThread Command Details 138 139### bbr 140 141Show current Primary Backbone Router information for Thread 1.2 device. 142 143```bash 144> bbr 145BBR Primary: 146server16: 0xE400 147seqno: 10 148delay: 120 secs 149timeout: 300 secs 150Done 151``` 152 153```bash 154> bbr 155BBR Primary: None 156Done 157``` 158 159### bbr mgmt dua \<status\|coap-code\> [meshLocalIid] 160 161Configure the response status for DUA.req with meshLocalIid in payload. Without meshLocalIid, simply respond any coming DUA.req next with the specified status or COAP code. 162 163Only for testing/reference device. 164 165known status value: 166 167- 0: ST_DUA_SUCCESS 168- 1: ST_DUA_REREGISTER 169- 2: ST_DUA_INVALID 170- 3: ST_DUA_DUPLICATE 171- 4: ST_DUA_NO_RESOURCES 172- 5: ST_DUA_BBR_NOT_PRIMARY 173- 6: ST_DUA_GENERAL_FAILURE 174- 160: COAP code 5.00 175 176```bash 177> bbr mgmt dua 1 2f7c235e5025a2fd 178Done 179> bbr mgmt dua 160 180Done 181``` 182 183### bbr mgmt mlr listener 184 185Show the Multicast Listeners. 186 187Only for testing/reference Backbone Router device. 188 189```bash 190> bbr mgmt mlr listener 191ff04:0:0:0:0:0:0:abcd 3534000 192ff04:0:0:0:0:0:0:eeee 3537610 193Done 194``` 195 196### bbr mgmt mlr listener add \<ipaddr\> \[\<timeout\>\] 197 198Add a Multicast Listener with a given IPv6 multicast address and timeout (in seconds). 199 200Only for testing/reference Backbone Router device. 201 202```bash 203> bbr mgmt mlr listener add ff04::1 204Done 205> bbr mgmt mlr listener add ff04::2 300 206Done 207> bbr mgmt mlr listener 208ff04:0:0:0:0:0:0:2 261 209ff04:0:0:0:0:0:0:1 3522 210Done 211``` 212 213### bbr mgmt mlr listener clear 214 215Removes all the Multicast Listeners. 216 217Only for testing/reference Backbone Router device. 218 219```bash 220> bbr mgmt mlr listener clear 221Done 222> bbr mgmt mlr listener 223Done 224``` 225 226### bbr mgmt mlr response \<status\> 227 228Configure the response status for the next MLR.req. 229 230Only for testing/reference device. 231 232Known status values: 233 234- 0: ST_MLR_SUCCESS 235- 2: ST_MLR_INVALID 236- 3: ST_MLR_NO_PERSISTENT 237- 4: ST_MLR_NO_RESOURCES 238- 5: ST_MLR_BBR_NOT_PRIMARY 239- 6: ST_MLR_GENERAL_FAILURE 240 241```bash 242> bbr mgmt mlr response 2 243Done 244``` 245 246### bbr state 247 248Show local Backbone state ([`Disabled`,`Primary`, `Secondary`]) for Thread 1.2 FTD. 249 250`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 251 252```bash 253> bbr state 254Disabled 255Done 256 257> bbr state 258Primary 259Done 260 261> bbr state 262Secondary 263Done 264``` 265 266### bbr enable 267 268Enable Backbone Router Service for Thread 1.2 FTD. `SRV_DATA.ntf` would be triggered for attached device if there is no Backbone Router Service in Thread Network Data. 269 270`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 271 272```bash 273> bbr enable 274Done 275``` 276 277### bbr disable 278 279Disable Backbone Router Service for Thread 1.2 FTD. `SRV_DATA.ntf` would be triggered if Backbone Router is Primary state. o `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 280 281```bash 282> bbr disable 283Done 284``` 285 286### bbr register 287 288Register Backbone Router Service for Thread 1.2 FTD. `SRV_DATA.ntf` would be triggered for attached device. 289 290`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 291 292```bash 293> bbr register 294Done 295``` 296 297### bbr config 298 299Show local Backbone Router configuration for Thread 1.2 FTD. 300 301`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 302 303```bash 304> bbr config 305seqno: 10 306delay: 120 secs 307timeout: 300 secs 308Done 309``` 310 311### bbr config \[seqno \<seqno\>\] \[delay \<delay\>\] \[timeout \<timeout\>\] 312 313Configure local Backbone Router configuration for Thread 1.2 FTD. `bbr register` should be issued explicitly to register Backbone Router service to Leader for Secondary Backbone Router. `SRV_DATA.ntf` would be initiated automatically if BBR Dataset changes for Primary Backbone Router. 314 315`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 316 317```bash 318> bbr config seqno 20 delay 30 319Done 320``` 321 322### bbr jitter 323 324Show jitter (in seconds) for Backbone Router registration for Thread 1.2 FTD. 325 326`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 327 328```bash 329> bbr jitter 33020 331Done 332``` 333 334### bbr jitter \<jitter\> 335 336Set jitter (in seconds) for Backbone Router registration for Thread 1.2 FTD. 337 338`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 339 340```bash 341> bbr jitter 10 342Done 343``` 344 345### ba 346 347Show current Border Agent information. 348 349### ba port 350 351Print border agent service port. 352 353```bash 354> ba port 35549152 356Done 357``` 358 359### ba state 360 361Print border agent state. 362 363Possible states are 364 365- `Stopped` : Border Agent is stopped. 366- `Started` : Border Agent is running with no active connection with external commissioner. 367- `Active` : Border Agent is running and is connected with an external commissioner. 368 369```bash 370> ba state 371Started 372Done 373``` 374 375### ba disconnect 376 377Disconnects border agent from any active secure sessions. 378 379```bash 380> ba disconnect 381Done 382``` 383 384### ba ephemeralkey 385 386Indicates if an ephemeral key is active. 387 388Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`. 389 390```bash 391> ba ephemeralkey 392inactive 393Done 394 395> ba ephemeralkey set Z10X20g3J15w1000P60m16 1000 396Done 397 398> ba ephemeralkey 399active 400Done 401``` 402 403### ba ephemeralkey set \<keystring\> \[timeout\] \[port\] 404 405Sets the ephemeral key for a given timeout duration. 406 407Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`. 408 409The ephemeral key can be set when Border Agent is already running and is not currently connected to any external commissioner (i.e., `ba state` gives `Started`). 410 411The `keystring` string is directly used as the ephemeral PSK (excluding the trailing null `\0` character). Its length MUST be between 6 and 32, inclusive. 412 413The `timeout` is in milliseconds. If not provided or set to zero, the default value of 2 minutes will be used. If the timeout value is larger than 10 minutes, the 10 minutes timeout value will be used instead. 414 415The `port` specifies the UDP port to use with the ephemeral key. If UDP port is zero or is not provided, an ephemeral port will be used. `ba port` will give the current UDP port in use by the Border Agent. 416 417Setting the ephemeral key again before a previously set one is timed out, will replace the previous one. 418 419During the timeout interval, the ephemeral key can be used only once by an external commissioner to establish a connection. After the commissioner disconnects, the ephemeral key is cleared, and the Border Agent reverts to using PSKc. If the timeout expires while a commissioner is still connected, the session will be terminated, and the Border Agent will cease using the ephemeral key and revert to PSKc. 420 421```bash 422> ba ephemeralkey set Z10X20g3J15w1000P60m16 5000 1234 423Done 424``` 425 426### ba ephemeralkey clear 427 428Cancels the ephemeral key in use if any. 429 430Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`. 431 432Can be used to cancel a previously set ephemeral key before it is used or times out. If the Border Agent is not running or there is no ephemeral key in use, calling this function has no effect. 433 434If a commissioner is connected using the ephemeral key and is currently active, calling this method does not change its state. In this case the `ba ephemeralkey` will continue to return `active` until the commissioner disconnects. 435 436```bash 437> ba ephemeralkey clear 438Done 439``` 440 441### ba ephemeralkey callback enable 442 443Enables callback from Border Agent for ephemeral key state changes. 444 445```bash 446> ba ephemeralkey callback enable 447Done 448 449> ba ephemeralkey set W10X12 5000 49155 450Done 451 452BorderAgent callback: Ephemeral key active, port:49155 453BorderAgent callback: Ephemeral key inactive 454``` 455 456### ba ephemeralkey callback disable 457 458Disables callback from Border Agent for ephemeral key state changes. 459 460```bash 461> ba ephemeralkey callback disable 462Done 463``` 464 465### ba counters 466 467Get the border agent counter values. 468 469Note that it requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE` to output the ePSKc counters. 470 471```bash 472> ba counters 473epskcActivation: 2 474epskcApiDeactivation: 1 475epskcTimeoutDeactivation: 1 476epskcMaxAttemptDeactivation: 0 477epskcDisconnectDeactivation: 0 478epskcInvalidBaStateError: 1 479epskcInvalidArgsError: 1 480epskcStartSecureSessionError: 0 481epskcSecureSessionSuccess: 0 482epskcSecureSessionFailure: 0 483epskcCommissionerPetition: 0 484pskcSecureSessionSuccess: 0 485pskcSecureSessionFailure: 0 486pskcCommissionerPetition: 0 487mgmtActiveGet: 0 488mgmtPendingGet: 0 489Done 490``` 491 492### bufferinfo 493 494Show the current message buffer information. 495 496- The `total` shows total number of message buffers in pool. 497- The `free` shows the number of free message buffers. 498- The `max-used` shows the maximum number of used buffers at the same time since OT stack initialization or last `bufferinfo reset`. 499- This is then followed by info about different queues used by OpenThread stack, each line representing info about a queue. 500 - The first number shows number messages in the queue. 501 - The second number shows number of buffers used by all messages in the queue. 502 - The third number shows total number of bytes of all messages in the queue. 503 504```bash 505> bufferinfo 506total: 40 507free: 40 508max-used: 5 5096lo send: 0 0 0 5106lo reas: 0 0 0 511ip6: 0 0 0 512mpl: 0 0 0 513mle: 0 0 0 514coap: 0 0 0 515coap secure: 0 0 0 516application coap: 0 0 0 517Done 518``` 519 520### bufferinfo reset 521 522Reset the message buffer counter tracking maximum number buffers in use at the same time. 523 524```bash 525> bufferinfo reset 526Done 527``` 528 529### ccathreshold 530 531Get the CCA threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4. 532 533```bash 534> ccathreshold 535-75 dBm 536Done 537``` 538 539### ccathreshold \<ccathreshold\> 540 541Set the CCA threshold measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4. 542 543```bash 544> ccathreshold -62 545Done 546``` 547 548### channel 549 550Get the IEEE 802.15.4 Channel value. 551 552```bash 553> channel 55411 555Done 556``` 557 558### channel \<channel\> 559 560Set the IEEE 802.15.4 Channel value. 561 562```bash 563> channel 11 564Done 565``` 566 567### channel manager 568 569Get channel manager state. 570 571`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` is required. 572 573```bash 574channel: 11 575auto: 1 576delay: 120 577interval: 10800 578supported: { 11-26} 579favored: { 11-26} 580Done 581``` 582 583### channel manager change \<channel\> 584 585Initiate a channel change with the channel manager. 586 587`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` is required. 588 589```bash 590> channel manager change 11 591channel manager change 11 592Done 593``` 594 595### channel manager select \<skip quality check (boolean)\> 596 597Request a channel selection with the channel manager. 598 599`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 600 601```bash 602> channel manager select 1 603channel manager select 1 604Done 605``` 606 607### channel manager auto \<enable (boolean)\> 608 609Enable/disable the auto-channel-selection functionality. 610 611`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 612 613```bash 614> channel manager auto 1 615channel manager auto 1 616Done 617``` 618 619### channel manager delay \<delay\> 620 621Set the channel change delay (in seconds). 622 623`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 624 625```bash 626> channel manager delay 120 627channel manager delay 120 628Done 629``` 630 631### channel manager interval \<interval\> 632 633Set the auto-channel-selection interval (in seconds). 634 635`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 636 637```bash 638> channel manager interval 10800 639channel manager interval 10800 640Done 641``` 642 643### channel manager supported \<mask\> 644 645Set the supported channel mask for the auto-channel-selection. 646 647`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 648 649```bash 650> channel manager supported 0x7fffc00 651channel manager supported 0x7fffc00 652Done 653``` 654 655### channel manager favored \<mask\> 656 657Set the favored channel mask for the auto-channel-selection. 658 659`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 660 661```bash 662> channel manager favored 0x7fffc00 663channel manager favored 0x7fffc00 664Done 665``` 666 667### channel monitor 668 669Get current channel monitor state and channel occupancy. 670 671`OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required. 672 673```bash 674> channel monitor 675channel monitor 676enabled: 1 677interval: 41000 678threshold: -75 679window: 960 680count: 10552 681occupancies: 682ch 11 (0x0cb7) 4.96% busy 683ch 12 (0x2e2b) 18.03% busy 684ch 13 (0x2f54) 18.48% busy 685ch 14 (0x0fef) 6.22% busy 686ch 15 (0x1536) 8.28% busy 687ch 16 (0x1746) 9.09% busy 688ch 17 (0x0b8b) 4.50% busy 689ch 18 (0x60a7) 37.75% busy 690ch 19 (0x0810) 3.14% busy 691ch 20 (0x0c2a) 4.75% busy 692ch 21 (0x08dc) 3.46% busy 693ch 22 (0x101d) 6.29% busy 694ch 23 (0x0092) 0.22% busy 695ch 24 (0x0028) 0.06% busy 696ch 25 (0x0063) 0.15% busy 697ch 26 (0x058c) 2.16% busy 698 699Done 700``` 701 702### channel monitor start 703 704Start the channel monitor. 705 706`OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required. 707 708```bash 709> channel monitor start 710channel monitor start 711Done 712``` 713 714### channel monitor stop 715 716Stop the channel monitor. 717 718`OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required. 719 720```bash 721> channel monitor stop 722channel monitor stop 723Done 724``` 725 726### channel preferred 727 728Get preferred channel mask. 729 730```bash 731> channel preferred 7320x7fff800 733Done 734``` 735 736### channel supported 737 738Get supported channel mask. 739 740```bash 741> channel supported 7420x7fff800 743Done 744``` 745 746### child list 747 748List attached Child IDs. 749 750```bash 751> child list 7521 2 3 6 7 8 753Done 754``` 755 756### child table 757 758Print table of attached children. 759 760```bash 761> child table 762| ID | RLOC16 | Timeout | Age | LQ In | C_VN |R|D|N|Ver|CSL|QMsgCnt|Suprvsn| Extended MAC | 763+-----+--------+------------+------------+-------+------+-+-+-+---+---+-------+-------+------------------+ 764| 1 | 0xc801 | 240 | 24 | 3 | 131 |1|0|0| 3| 0 | 0 | 129 | 4ecede68435358ac | 765| 2 | 0xc802 | 240 | 2 | 3 | 131 |0|0|0| 3| 1 | 0 | 0 | a672a601d2ce37d8 | 766Done 767``` 768 769### child \<id\> 770 771Print diagnostic information for an attached Thread Child. The `id` may be a Child ID or an RLOC16. 772 773```bash 774> child 1 775Child ID: 1 776Rloc: 9c01 777Ext Addr: e2b3540590b0fd87 778Mode: rn 779CSL Synchronized: 1 780Net Data: 184 781Timeout: 100 782Age: 0 783Link Quality In: 3 784RSSI: -20 785Supervision Interval: 129 786Done 787``` 788 789### childip 790 791Get the list of IP addresses stored for MTD children. 792 793```bash 794> childip 7953401: fdde:ad00:beef:0:3037:3e03:8c5f:bc0c 796Done 797``` 798 799### childip max 800 801Get the maximum number of IP addresses that each MTD child may register with this device as parent. 802 803```bash 804> childip max 8054 806Done 807``` 808 809### childip max \<count\> 810 811Set the maximum number of IP addresses that each MTD child may register with this device as parent. 0 to clear the setting and restore the default. 812 813`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 814 815```bash 816> childip max 2 817Done 818``` 819 820### childmax 821 822Get the Thread maximum number of allowed children. 823 824```bash 825> childmax 8265 827Done 828``` 829 830### childmax \<count\> 831 832Set the Thread maximum number of allowed children. 833 834```bash 835> childmax 2 836Done 837``` 838 839### childsupervision interval 840 841Get the Child Supervision interval value on the child. 842 843Child 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. 844 845```bash 846> childsupervision interval 84730 848Done 849``` 850 851### childsupervision interval \<interval\> 852 853Set the Child Supervision interval value on the child. 854 855```bash 856> childsupervision interval 30 857Done 858``` 859 860### childsupervision checktimeout 861 862Get the Child Supervision Check Timeout value on the child. 863 864If 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). 865 866```bash 867> childsupervision checktimeout 86830 869Done 870``` 871 872### childsupervision checktimeout \<timeout\> 873 874Set the Child Supervision Check Timeout value on the child. 875 876```bash 877> childsupervision checktimeout 30 878Done 879``` 880 881### childsupervision failcounter 882 883Get the current value of supervision check timeout failure counter. 884 885The counter tracks the number of supervision check failures on the child. It is incremented when the child does not hear from its parent within the specified check timeout interval. 886 887```bash 888> childsupervision failcounter 8890 890Done 891``` 892 893### childsupervision failcounter reset 894 895Reset the supervision check timeout failure counter to zero. 896 897```bash 898> childsupervision failcounter reset 899Done 900``` 901 902### childtimeout 903 904Get the Thread Child Timeout value. 905 906```bash 907> childtimeout 908300 909Done 910``` 911 912### childtimeout \<timeout\> 913 914Set the Thread Child Timeout value. 915 916```bash 917> childtimeout 300 918Done 919``` 920 921### coex 922 923Get the coex status. 924 925`OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE` is required. 926 927```bash 928> coex 929Enabled 930Done 931``` 932 933### coex disable 934 935Disable coex. 936 937`OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE` is required. 938 939```bash 940> coex disable 941Done 942``` 943 944### coex enable 945 946Enable coex. 947 948`OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE` is required. 949 950```bash 951> coex enable 952Done 953``` 954 955### coex metrics 956 957Show coex metrics. 958 959`OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE` is required. 960 961```bash 962> coex metrics 963Stopped: false 964Grant Glitch: 0 965Transmit metrics 966 Request: 0 967 Grant Immediate: 0 968 Grant Wait: 0 969 Grant Wait Activated: 0 970 Grant Wait Timeout: 0 971 Grant Deactivated During Request: 0 972 Delayed Grant: 0 973 Average Request To Grant Time: 0 974Receive metrics 975 Request: 0 976 Grant Immediate: 0 977 Grant Wait: 0 978 Grant Wait Activated: 0 979 Grant Wait Timeout: 0 980 Grant Deactivated During Request: 0 981 Delayed Grant: 0 982 Average Request To Grant Time: 0 983 Grant None: 0 984Done 985``` 986 987### contextreusedelay 988 989Get the CONTEXT_ID_REUSE_DELAY value. 990 991```bash 992> contextreusedelay 99311 994Done 995``` 996 997### contextreusedelay \<delay\> 998 999Set the CONTEXT_ID_REUSE_DELAY value. 1000 1001```bash 1002> contextreusedelay 11 1003Done 1004``` 1005 1006### counters 1007 1008Get the supported counter names. 1009 1010```bash 1011> counters 1012br 1013ip 1014mac 1015mle 1016Done 1017``` 1018 1019### counters \<countername\> 1020 1021Get the counter value. 1022 1023Note: 1024 1025- `OPENTHREAD_CONFIG_UPTIME_ENABLE` is required for MLE role time tracking in `counters mle` 1026- `OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE` is required for `counters br` 1027 1028```bash 1029> counters mac 1030TxTotal: 10 1031 TxUnicast: 3 1032 TxBroadcast: 7 1033 TxAckRequested: 3 1034 TxAcked: 3 1035 TxNoAckRequested: 7 1036 TxData: 10 1037 TxDataPoll: 0 1038 TxBeacon: 0 1039 TxBeaconRequest: 0 1040 TxOther: 0 1041 TxRetry: 0 1042 TxErrCca: 0 1043 TxErrBusyChannel: 0 1044RxTotal: 2 1045 RxUnicast: 1 1046 RxBroadcast: 1 1047 RxData: 2 1048 RxDataPoll: 0 1049 RxBeacon: 0 1050 RxBeaconRequest: 0 1051 RxOther: 0 1052 RxAddressFiltered: 0 1053 RxDestAddrFiltered: 0 1054 RxDuplicated: 0 1055 RxErrNoFrame: 0 1056 RxErrNoUnknownNeighbor: 0 1057 RxErrInvalidSrcAddr: 0 1058 RxErrSec: 0 1059 RxErrFcs: 0 1060 RxErrOther: 0 1061Done 1062> counters mle 1063Role Disabled: 0 1064Role Detached: 1 1065Role Child: 0 1066Role Router: 0 1067Role Leader: 1 1068Attach Attempts: 1 1069Partition Id Changes: 1 1070Better Partition Attach Attempts: 0 1071Parent Changes: 0 1072Time Disabled Milli: 10026 1073Time Detached Milli: 6852 1074Time Child Milli: 0 1075Time Router Milli: 0 1076Time Leader Milli: 16195 1077Time Tracked Milli: 33073 1078Done 1079> counters ip 1080TxSuccess: 10 1081TxFailed: 0 1082RxSuccess: 5 1083RxFailed: 0 1084Done 1085> counters br 1086Inbound Unicast: Packets 4 Bytes 320 1087Inbound Multicast: Packets 0 Bytes 0 1088Outbound Unicast: Packets 2 Bytes 160 1089Outbound Multicast: Packets 0 Bytes 0 1090RA Rx: 4 1091RA TxSuccess: 2 1092RA TxFailed: 0 1093RS Rx: 0 1094RS TxSuccess: 2 1095RS TxFailed: 0 1096Done 1097``` 1098 1099### counters \<countername\> reset 1100 1101Reset the counter value. 1102 1103```bash 1104> counters mac reset 1105Done 1106> counters mle reset 1107Done 1108> counters ip reset 1109Done 1110``` 1111 1112### csl 1113 1114Get the CSL configuration. 1115 1116CSL period is shown in microseconds. 1117 1118```bash 1119> csl 1120Channel: 11 1121Period: 160000us 1122Timeout: 1000s 1123Done 1124``` 1125 1126### csl channel \<channel\> 1127 1128Set CSL channel. 1129 1130```bash 1131> csl channel 20 1132Done 1133``` 1134 1135### csl period \<period\> 1136 1137Set CSL period in microseconds. Disable CSL by setting this parameter to `0`. 1138 1139The CSL period MUST be a multiple 160 microseconds which is 802.15.4 "ten symbols time". 1140 1141```bash 1142> csl period 30000000 1143Done 1144``` 1145 1146### csl timeout \<timeout\> 1147 1148Set the CSL timeout in seconds. 1149 1150```bash 1151> csl timeout 10 1152Done 1153``` 1154 1155### debug 1156 1157Executes a series of CLI commands to gather information about the device and thread network. This is intended for debugging. 1158 1159The output will display each executed CLI command preceded by "\$", followed by the corresponding command's generated output. 1160 1161The generated output encompasses the following information: 1162 1163- Version 1164- Current state 1165- RLOC16, extended MAC address 1166- Unicast and multicast IPv6 address list 1167- Channel 1168- PAN ID and extended PAN ID 1169- Network Data 1170- Partition ID 1171- Leader Data 1172 1173If the device is operating as FTD: 1174 1175- Child and neighbor table 1176- Router table and next hop Info 1177- Address cache table 1178- Registered MTD child IPv6 address 1179- Device properties 1180 1181If the device supports and acts as an SRP client: 1182 1183- SRP client state 1184- SRP client services and host info 1185 1186If the device supports and acts as an SRP sever: 1187 1188- SRP server state and address mode 1189- SRP server registered hosts and services 1190 1191If the device supports TREL: 1192 1193- TREL status and peer table 1194 1195If the device supports and acts as a border router: 1196 1197- BR state 1198- BR prefixes (OMR, on-link, NAT64) 1199- Discovered prefix table 1200 1201### delaytimermin 1202 1203Get the minimal delay timer (in seconds). 1204 1205```bash 1206> delaytimermin 120730 1208Done 1209``` 1210 1211### delaytimermin \<delaytimermin\> 1212 1213Set the minimal delay timer (in seconds). 1214 1215```bash 1216> delaytimermin 60 1217Done 1218``` 1219 1220### detach 1221 1222Start 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. 1223 1224```bash 1225> detach 1226Finished detaching 1227Done 1228``` 1229 1230### detach async 1231 1232Start the graceful detach process similar to the `detach` command without blocking and waiting for the callback indicating that detach is finished. 1233 1234```bash 1235> detach async 1236Done 1237``` 1238 1239### deviceprops 1240 1241Get the current device properties. 1242 1243```bash 1244> deviceprops 1245PowerSupply : external 1246IsBorderRouter : yes 1247SupportsCcm : no 1248IsUnstable : no 1249WeightAdjustment : 0 1250Done 1251``` 1252 1253### deviceprops \<power-supply\> \<is-br\> \<supports-ccm\> \<is-unstable\> \<weight-adjustment\> 1254 1255Set the device properties which are then used to determine and set the Leader Weight. 1256 1257- power-supply: `battery`, `external`, `external-stable`, or `external-unstable`. 1258- weight-adjustment: Valid range is from -16 to +16. Clamped if not within the range. 1259 1260```bash 1261> deviceprops battery 0 0 0 -5 1262Done 1263 1264> deviceprops 1265PowerSupply : battery 1266IsBorderRouter : no 1267SupportsCcm : no 1268IsUnstable : no 1269WeightAdjustment : -5 1270Done 1271 1272> leaderweight 127351 1274Done 1275``` 1276 1277### discover \[channel\] 1278 1279Perform an MLE Discovery operation. 1280 1281- channel: The channel to discover on. If no channel is provided, the discovery will cover all valid channels. 1282 1283```bash 1284> discover 1285| J | Network Name | Extended PAN | PAN | MAC Address | Ch | dBm | LQI | 1286+---+------------------+------------------+------+------------------+----+-----+-----+ 1287| 0 | OpenThread | dead00beef00cafe | ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 | 1288Done 1289``` 1290 1291### dns config 1292 1293Get the default query config used by DNS client. 1294 1295The config includes 1296 1297- Server IPv6 address and port 1298- Response timeout in msec (wait time to rx response) 1299- Maximum tx attempts before reporting failure 1300- Boolean flag to indicate whether the server can resolve the query recursively or not. 1301- Service resolution mode which specifies which records to query. Possible options are: 1302 - `srv` : Query for SRV record only. 1303 - `txt` : Query for TXT record only. 1304 - `srv_txt` : Query for both SRV and TXT records in the same message. 1305 - `srv_txt_sep`: Query in parallel for SRV and TXT using separate messages. 1306 - `srv_txt_opt`: Query for TXT/SRV together first, if it fails then query separately. 1307- Whether to allow/disallow NAT64 address translation during address resolution (requires `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE`) 1308- Transport protocol UDP or TCP (requires `OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE`) 1309 1310```bash 1311> dns config 1312Server: [fd00:0:0:0:0:0:0:1]:1234 1313ResponseTimeout: 5000 ms 1314MaxTxAttempts: 2 1315RecursionDesired: no 1316ServiceMode: srv_txt_opt 1317Nat64Mode: allow 1318TransportProtocol: udp 1319Done 1320> 1321``` 1322 1323### dns config \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] \[service mode] \[protocol] 1324 1325Set the default query config. 1326 1327Service mode specifies which records to query. Possible options are: 1328 1329- `def` : Use default option. 1330- `srv` : Query for SRV record only. 1331- `txt` : Query for TXT record only. 1332- `srv_txt` : Query for both SRV and TXT records in the same message. 1333- `srv_txt_sep`: Query in parallel for SRV and TXT using separate messages. 1334- `srv_txt_opt`: Query for TXT/SRV together first, if it fails then query separately. 1335 1336To set protocol effectively to tcp `OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE` is required. 1337 1338```bash 1339> dns config fd00::1 1234 5000 2 0 srv_txt_sep tcp 1340Done 1341 1342> dns config 1343Server: [fd00:0:0:0:0:0:0:1]:1234 1344ResponseTimeout: 5000 ms 1345MaxTxAttempts: 2 1346RecursionDesired: no 1347ServiceMode: srv_txt_sep 1348Nat64Mode: allow 1349TransportProtocol: tcp 1350Done 1351``` 1352 1353We 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. 1354 1355```bash 1356> dns config fd00::2 1357Done 1358 1359> dns config 1360Server: [fd00:0:0:0:0:0:0:2]:53 1361ResponseTimeout: 6000 ms 1362MaxTxAttempts: 3 1363RecursionDesired: yes 1364Nat64Mode: allow 1365TransportProtocol: udp 1366Done 1367``` 1368 1369This final example shows how only 'recursion desired' and the service mode are set, and all other parameters are set to their defaults: 1370 1371```bash 1372> dns config :: 0 0 0 1 srv_txt_sep 1373Done 1374 1375> dns config 1376Server: [2001:4860:4860:0:0:0:0:8888]:53 1377ResponseTimeout: 6000 ms 1378MaxTxAttempts: 3 1379RecursionDesired: yes 1380ServiceMode: srv_txt_sep 1381Nat64Mode: allow 1382TransportProtocol: udp 1383Done 1384``` 1385 1386### dns resolve \<hostname\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] \[transport protocol\] 1387 1388Send DNS Query to obtain IPv6 address for given hostname. 1389 1390The 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`). 1391 1392To use tcp, `OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE` is required. 1393 1394```bash 1395> dns resolve ipv6.google.com 1396> DNS response for ipv6.google.com - 2a00:1450:401b:801:0:0:0:200e TTL: 300 1397``` 1398 1399The 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. 1400 1401> Note: The command will return `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. 1402 1403```bash 1404> dns resolve example.com 8.8.8.8 1405Synthesized IPv6 DNS server address: fdde:ad00:beef:2:0:0:808:808 1406DNS response for example.com. - fd4c:9574:3720:2:0:0:5db8:d822 TTL:20456 1407Done 1408``` 1409 1410### dns resolve4 \<hostname\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1411 1412Send DNS query to obtain IPv4 address for a given hostname and provide the NAT64 synthesized IPv6 addresses for the IPv4 addresses from the query response. 1413 1414Requires `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE`. 1415 1416The 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`). 1417 1418This command requires a NAT64 prefix to be configured and present in Thread Network Data. 1419 1420For example, if a NAT64 prefix of `2001:db8:122:344::/96` is used within the Thread mesh, the outputted IPv6 address corresponds to an IPv4 address of `142.250.191.78` for the `ipv4.google.com` host: 1421 1422```bash 1423> dns resolve4 ipv4.google.com 1424> DNS response for ipv4.google.com - 2001:db8:122:344:0:0:8efa:bf4e TTL: 20456 1425``` 1426 1427### dns browse \<service-name\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1428 1429Send a browse (service instance enumeration) DNS query to get the list of services for given service-name. 1430 1431The 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`). 1432 1433```bash 1434> dns browse _service._udp.example.com 1435DNS browse response for _service._udp.example.com. 1436inst1 1437inst2 1438inst3 1439Done 1440``` 1441 1442The detailed service info (port number, weight, host name, TXT data, host addresses) is outputted only when provided by server/resolver in the browse response (in additional Data Section). This is a SHOULD and not a MUST requirement, and servers/resolvers are not required to provide this. 1443 1444The recommended behavior, which is supported by the OpenThread DNS-SD resolver, is to only provide the additional data when there is a single instance in the response. However, users should assume that the browse response may only contain the list of matching service instances and not any detail service info. To resolve a service instance, users can use the `dns service` or `dns servicehost` commands. 1445 1446```bash 1447> dns browse _service._udp.example.com 1448DNS browse response for _service._udp.example.com. 1449inst1 1450 Port:1234, Priority:1, Weight:2, TTL:7200 1451 Host:host.example.com. 1452 HostAddress:fd00:0:0:0:0:0:0:abcd TTL:7200 1453 TXT:[a=6531, b=6c12] TTL:7300 1454Done 1455``` 1456 1457```bash 1458> dns browse _airplay._tcp.default.service.arpa 1459DNS browse response for _airplay._tcp.default.service.arpa. 1460Gabe's Mac mini 1461 Port:7000, Priority:0, Weight:0, TTL:10 1462 Host:Gabes-Mac-mini.default.service.arpa. 1463 HostAddress:fd97:739d:386a:1:1c2e:d83c:fcbe:9cf4 TTL:10 1464Done 1465``` 1466 1467> Note: The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. When testing DNS-SD discovery proxy, the zone is not `local` and instead should be `default.service.arpa`. 1468 1469### dns service \<service-instance-label\> \<service-name\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1470 1471Send 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). 1472 1473The 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`). 1474 1475> Note: The DNS server IP can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. The command will return `InvalidState` when the DNS server IP is an IPv4 address but the preferred NAT64 prefix is unavailable. 1476 1477### dns servicehost \<service-instance-label\> \<service-name\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1478 1479Send a service instance resolution DNS query for a given service instance with a potential follow-up address resolution for the host name discovered for the service instance (if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query). 1480 1481Service instance label is provided first, followed by the service name (note that service instance label can contain dot '.' character). 1482 1483The 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`). 1484 1485### dns server upstream \[enable|disable\] 1486 1487Enable/Disable the upstream DNS feature. If no argument is provided, it prints whether the upstream DNS feature is enabled. 1488 1489`OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE` is required. 1490 1491Enable the upstream DNS feature. 1492 1493``` 1494> dns server upstream enable 1495Done 1496``` 1497 1498Get whether the upstream DNS feature is enabled. 1499 1500``` 1501> dns server upstream 1502Enabled 1503Done 1504``` 1505 1506### dns compression \[enable|disable\] 1507 1508Enable/Disable the "DNS name compression" mode. 1509 1510By 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. 1511 1512This is intended for testing only and available under `REFERENCE_DEVICE` config. 1513 1514Get the current "DNS name compression" mode. 1515 1516``` 1517> dns compression 1518Enabled 1519``` 1520 1521Set the "DNS name compression" mode. 1522 1523``` 1524> dns compression disable 1525Done 1526> 1527> 1528> dns compression 1529Disabled 1530Done 1531``` 1532 1533### domainname 1534 1535Get the Thread Domain Name for Thread 1.2 device. 1536 1537```bash 1538> domainname 1539Thread 1540Done 1541``` 1542 1543### domainname \<name\> 1544 1545Set the Thread Domain Name for Thread 1.2 device. 1546 1547```bash 1548> domainname Test\ Thread 1549Done 1550``` 1551 1552### dua iid 1553 1554Get the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device. 1555 1556```bash 1557> dua iid 15580004000300020001 1559Done 1560``` 1561 1562### dua iid \<iid\> 1563 1564Set the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device. 1565 1566```bash 1567> dua iid 0004000300020001 1568Done 1569``` 1570 1571### dua iid clear 1572 1573Clear the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device. 1574 1575```bash 1576> dua iid clear 1577Done 1578``` 1579 1580### eidcache 1581 1582Print the EID-to-RLOC cache entries. 1583 1584```bash 1585> eidcache 1586fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d 2000 cache canEvict=1 transTime=0 eid=fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d 1587fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7f fffe retry canEvict=1 timeout=10 retryDelay=30 1588Done 1589``` 1590 1591### eui64 1592 1593Get the factory-assigned IEEE EUI-64. 1594 1595```bash 1596> eui64 15970615aae900124b00 1598Done 1599``` 1600 1601### extaddr 1602 1603Get the IEEE 802.15.4 Extended Address. 1604 1605```bash 1606> extaddr 1607dead00beef00cafe 1608Done 1609``` 1610 1611### extaddr \<extaddr\> 1612 1613Set the IEEE 802.15.4 Extended Address. 1614 1615```bash 1616> extaddr dead00beef00cafe 1617dead00beef00cafe 1618Done 1619``` 1620 1621### extpanid 1622 1623Get the Thread Extended PAN ID value. 1624 1625**NOTE** The current commissioning credential becomes stale after changing this value. Use [pskc](#pskc--p-keypassphrase) to reset. 1626 1627```bash 1628> extpanid 1629dead00beef00cafe 1630Done 1631``` 1632 1633### extpanid \<extpanid\> 1634 1635Set the Thread Extended PAN ID value. 1636 1637```bash 1638> extpanid dead00beef00cafe 1639Done 1640``` 1641 1642### factoryreset 1643 1644Delete all stored settings, and signal a platform reset. 1645 1646```bash 1647> factoryreset 1648``` 1649 1650### fake 1651 1652Send fake Thread messages. 1653 1654Note: Only for certification test. 1655 1656#### fake /a/an \<dst-ipaddr\> \<target\> \<meshLocalIid\> 1657 1658```bash 1659> fake /a/an fdde:ad00:beef:0:0:ff:fe00:a800 fd00:7d03:7d03:7d03:55f2:bb6a:7a43:a03b 1111222233334444 1660Done 1661``` 1662 1663### fem 1664 1665Get external FEM parameters. 1666 1667```bash 1668> fem 1669LNA gain 11 dBm 1670Done 1671``` 1672 1673### fem lnagain 1674 1675Get the Rx LNA gain in dBm of the external FEM. 1676 1677```bash 1678> fem lnagain 167911 1680Done 1681``` 1682 1683### fem lnagain \<LNA gain\> 1684 1685Set the Rx LNA gain in dBm of the external FEM. 1686 1687```bash 1688> fem lnagain 8 1689Done 1690``` 1691 1692### ifconfig 1693 1694Show the status of the IPv6 interface. 1695 1696```bash 1697> ifconfig 1698down 1699Done 1700``` 1701 1702### ifconfig up 1703 1704Bring up the IPv6 interface. 1705 1706```bash 1707> ifconfig up 1708Done 1709``` 1710 1711### ifconfig down 1712 1713Bring down the IPv6 interface. 1714 1715```bash 1716> ifconfig down 1717Done 1718``` 1719 1720### instanceid 1721 1722Show OpenThread instance identifier. 1723 1724```bash 1725> instanceid 1726468697314 1727Done 1728``` 1729 1730### ipaddr 1731 1732List all IPv6 addresses assigned to the Thread interface. 1733 1734```bash 1735> ipaddr 1736fdde:ad00:beef:0:0:ff:fe00:0 1737fdde:ad00:beef:0:558:f56b:d688:799 1738fe80:0:0:0:f3d9:2a82:c8d8:fe43 1739Done 1740``` 1741 1742Use `-v` to get more verbose information about the address: 1743 1744- `origin`: can be `thread`, `slaac`, `dhcp6`, or `manual`, and indicates the origin of the address 1745- `plen`: prefix length (in bits) 1746- `preferred`: preferred flag (boolean) 1747- `valid`: valid flag (boolean) 1748 1749```bash 1750> ipaddr -v 1751fd5e:18fa:f4a5:b8:0:ff:fe00:fc00 origin:thread plen:64 preferred:0 valid:1 1752fd5e:18fa:f4a5:b8:0:ff:fe00:dc00 origin:thread plen:64 preferred:0 valid:1 1753fd5e:18fa:f4a5:b8:f8e:5d95:87a0:e82c origin:thread plen:64 preferred:0 valid:1 1754fe80:0:0:0:4891:b191:e277:8826 origin:thread plen:64 preferred:1 valid:1 1755Done 1756``` 1757 1758### ipaddr add \<ipaddr\> 1759 1760Add an IPv6 address to the Thread interface. 1761 1762```bash 1763> ipaddr add 2001::dead:beef:cafe 1764Done 1765``` 1766 1767### ipaddr del \<ipaddr\> 1768 1769Delete an IPv6 address from the Thread interface. 1770 1771```bash 1772> ipaddr del 2001::dead:beef:cafe 1773Done 1774``` 1775 1776### ipaddr linklocal 1777 1778Print Thread link-local IPv6 address. 1779 1780```bash 1781> ipaddr linklocal 1782fe80:0:0:0:f3d9:2a82:c8d8:fe43 1783Done 1784``` 1785 1786### ipaddr mleid 1787 1788Print Thread Mesh Local EID address. 1789 1790```bash 1791> ipaddr mleid 1792fdde:ad00:beef:0:558:f56b:d688:799 1793Done 1794``` 1795 1796### ipaddr rloc 1797 1798Print Thread Routing Locator (RLOC) address. 1799 1800```bash 1801> ipaddr rloc 1802fdde:ad00:beef:0:0:ff:fe00:0 1803Done 1804``` 1805 1806### ipmaddr 1807 1808List all IPv6 multicast addresses subscribed to the Thread interface. 1809 1810```bash 1811> ipmaddr 1812ff05:0:0:0:0:0:0:1 1813ff33:40:fdde:ad00:beef:0:0:1 1814ff32:40:fdde:ad00:beef:0:0:1 1815Done 1816``` 1817 1818### ipmaddr add \<ipaddr\> 1819 1820Subscribe the Thread interface to the IPv6 multicast address. 1821 1822```bash 1823> ipmaddr add ff05::1 1824Done 1825``` 1826 1827### ipmaddr del \<ipaddr\> 1828 1829Unsubscribe the Thread interface to the IPv6 multicast address. 1830 1831```bash 1832> ipmaddr del ff05::1 1833Done 1834``` 1835 1836### ipmaddr llatn 1837 1838Get the Link-Local All Thread Nodes multicast address. 1839 1840``` 1841> ipmaddr llatn 1842ff32:40:fdde:ad00:beef:0:0:1 1843Done 1844``` 1845 1846### ipmaddr rlatn 1847 1848Get the Realm-Local All Thread Nodes multicast address. 1849 1850``` 1851> ipmaddr rlatn 1852ff33:40:fdde:ad00:beef:0:0:1 1853Done 1854``` 1855 1856### joinerport \<port\> 1857 1858Set the Joiner port. 1859 1860```bash 1861> joinerport 1000 1862Done 1863``` 1864 1865### keysequence counter 1866 1867Get the Thread Key Sequence Counter. 1868 1869```bash 1870> keysequence counter 187110 1872Done 1873``` 1874 1875### keysequence counter \<counter\> 1876 1877Set the Thread Key Sequence Counter. 1878 1879This command is reserved for testing and demo purposes only. Changing Key Sequence Counter will render a production application non-compliant with the Thread Specification. 1880 1881```bash 1882> keysequence counter 10 1883Done 1884``` 1885 1886### keysequence guardtime 1887 1888Get Thread Key Switch Guard Time (in hours) 1889 1890```bash 1891> keysequence guardtime 18920 1893Done 1894``` 1895 1896### keysequence guardtime \<guardtime\> 1897 1898Set Thread Key Switch Guard Time (in hours). 1899 1900This command is reserved for testing and demo purposes only. Changing Key Switch Guard Time will render a production application non-compliant with the Thread Specification. 1901 1902```bash 1903> keysequence guardtime 0 1904Done 1905``` 1906 1907### leaderdata 1908 1909Show the Thread Leader Data. 1910 1911```bash 1912> leaderdata 1913Partition ID: 1077744240 1914Weighting: 64 1915Data Version: 109 1916Stable Data Version: 211 1917Leader Router ID: 60 1918Done 1919``` 1920 1921### leaderweight 1922 1923Get the Thread Leader Weight. 1924 1925```bash 1926> leaderweight 1927128 1928Done 1929``` 1930 1931### leaderweight \<weight\> 1932 1933Set the Thread Leader Weight. 1934 1935```bash 1936> leaderweight 128 1937Done 1938``` 1939 1940### linkmetrics config \[async\] \<ipaddr\> enhanced-ack clear 1941 1942Send a Link Metrics Management Request to clear an Enhanced-ACK Based Probing. 1943 1944- async: Use the non-blocking mode. 1945- ipaddr: Peer address (SHOULD be link local address of the neighboring device). 1946 1947```bash 1948> linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack clear 1949Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1950Status: Success 1951Done 1952 1953> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack clear 1954Done 1955> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1956Status: Success 1957``` 1958 1959### linkmetrics config \[async\] \<ipaddr\> enhanced-ack register \<qmr\> \[r\] 1960 1961Send a Link Metrics Management Request to register an Enhanced-ACK Based Probing. 1962 1963- async: Use the non-blocking mode. 1964- ipaddr: Peer address. 1965- qmr: This specifies what metrics to query. At most two options are allowed to select (per spec 4.11.3.4.4.6). 1966 - q: Layer 2 LQI. 1967 - m: Link Margin. 1968 - r: RSSI. 1969- r: This is optional and only used for reference devices. When this option is specified, Type/Average Enum of each Type Id Flags would be set to `reserved`. This is used to verify the Probing Subject correctly handles invalid Type Id Flags. This is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. 1970 1971```bash 1972> linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm 1973Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1974Status: Success 1975Done 1976 1977> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm 1978Done 1979> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1980Status: Success 1981 1982> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm r 1983Done 1984> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1985Status: Cannot support new series 1986``` 1987 1988### linkmetrics config \[async\] \<ipaddr\> forward \<seriesid\> \<ldraX\> \<pqmr\> 1989 1990Send a Link Metrics Management Request to configure a Forward Tracking Series. 1991 1992- async: Use the non-blocking mode. 1993- ipaddr: Peer address. 1994- seriesid: The Series ID. 1995- ldraX: This specifies which frames are to be accounted. 1996 - l: MLE Link Probe. 1997 - d: MAC Data. 1998 - r: MAC Data Request. 1999 - a: MAC Ack. 2000 - X: This represents none of the above flags, i.e., to stop accounting and remove the series. This can only be used without any other flags. 2001- pqmr: This specifies what metrics to query. 2002 - p: Layer 2 Number of PDUs received. 2003 - q: Layer 2 LQI. 2004 - m: Link Margin. 2005 - r: RSSI. 2006 2007```bash 2008> linkmetrics config fe80:0:0:0:3092:f334:1455:1ad2 forward 1 dra pqmr 2009Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 2010Status: SUCCESS 2011Done 2012 2013> linkmetrics config async fe80:0:0:0:3092:f334:1455:1ad2 forward 1 dra pqmr 2014Done 2015> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 2016Status: SUCCESS 2017``` 2018 2019### linkmetrics probe \<ipaddr\> \<seriesid\> \<length\> 2020 2021Send a MLE Link Probe message to the peer. 2022 2023- ipaddr: Peer address. 2024- seriesid: The Series ID for which this Probe message targets at. 2025- length: The length of the Probe message, valid range: [0, 64]. 2026 2027```bash 2028> linkmetrics probe fe80:0:0:0:3092:f334:1455:1ad2 1 10 2029Done 2030``` 2031 2032### linkmetrics request \[async\] \<ipaddr\> single \<pqmr\> 2033 2034Perform a Link Metrics query (Single Probe). 2035 2036- async: Use the non-blocking mode. 2037- ipaddr: Peer address. 2038- pqmr: This specifies what metrics to query. 2039 - p: Layer 2 Number of PDUs received. 2040 - q: Layer 2 LQI. 2041 - m: Link Margin. 2042 - r: RSSI. 2043 2044```bash 2045> linkmetrics request fe80:0:0:0:3092:f334:1455:1ad2 single qmr 2046Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2 2047 2048 - LQI: 76 (Exponential Moving Average) 2049 - Margin: 82 (dB) (Exponential Moving Average) 2050 - RSSI: -18 (dBm) (Exponential Moving Average) 2051Done 2052 2053> linkmetrics request async fe80:0:0:0:3092:f334:1455:1ad2 single qmr 2054Done 2055> Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2 2056 2057 - LQI: 76 (Exponential Moving Average) 2058 - Margin: 82 (dB) (Exponential Moving Average) 2059 - RSSI: -18 (dBm) (Exponential Moving Average) 2060``` 2061 2062### linkmetrics request \[async\] \<ipaddr\> forward \<seriesid\> 2063 2064Perform a Link Metrics query (Forward Tracking Series). 2065 2066- sync: Use the blocking mode. 2067- ipaddr: Peer address. 2068- seriesid: The Series ID. 2069 2070```bash 2071> linkmetrics request fe80:0:0:0:3092:f334:1455:1ad2 forward 1 2072Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2 2073 2074 - PDU Counter: 2 (Count/Summation) 2075 - LQI: 76 (Exponential Moving Average) 2076 - Margin: 82 (dB) (Exponential Moving Average) 2077 - RSSI: -18 (dBm) (Exponential Moving Average) 2078Done 2079 2080> linkmetrics request async fe80:0:0:0:3092:f334:1455:1ad2 forward 1 2081Done 2082> Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2 2083 2084 - PDU Counter: 2 (Count/Summation) 2085 - LQI: 76 (Exponential Moving Average) 2086 - Margin: 82 (dB) (Exponential Moving Average) 2087 - RSSI: -18 (dBm) (Exponential Moving Average) 2088``` 2089 2090### linkmetricsmgr disable 2091 2092Disable the Link Metrics Manager. 2093 2094`OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE` is required. 2095 2096```bash 2097> linkmetricsmgr disable 2098Done 2099``` 2100 2101### linkmetricsmgr enable 2102 2103Enable the Link Metrics Manager. 2104 2105`OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE` is required. 2106 2107```bash 2108> linkmetricsmgr enable 2109Done 2110``` 2111 2112### linkmetricsmgr show 2113 2114Display the Link Metrics data of all subjects. The subjects are identified by its extended address. 2115 2116`OPENTHREAD_CONFIG_LINK_METRICS_MANAGER_ENABLE` is required. 2117 2118```bash 2119 2120> linkmetricsmgr show 2121ExtAddr:827aa7f7f63e1234, LinkMargin:80, Rssi:-20 2122Done 2123``` 2124 2125### locate 2126 2127Gets the current state (`In Progress` or `Idle`) of anycast locator. 2128 2129`OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is required. 2130 2131```bash 2132> locate 2133Idle 2134Done 2135 2136> locate fdde:ad00:beef:0:0:ff:fe00:fc10 2137 2138> locate 2139In Progress 2140Done 2141``` 2142 2143### locate \<anycastaddr\> 2144 2145Locate the closest destination of an anycast address (i.e., find the destination's mesh local EID and RLOC16). 2146 2147`OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is required. 2148 2149The closest destination is determined based on the the current routing table and path costs within the Thread mesh. 2150 2151Locate the leader using its anycast address: 2152 2153```bash 2154> locate fdde:ad00:beef:0:0:ff:fe00:fc00 2155fdde:ad00:beef:0:d9d3:9000:16b:d03b 0xc800 2156Done 2157``` 2158 2159Locate the closest destination of a service anycast address: 2160 2161```bash 2162 2163> srp server enable 2164Done 2165 2166> netdata show 2167Prefixes: 2168Routes: 2169Services: 217044970 5d c002 s c800 217144970 5d c002 s cc00 2172Done 2173 2174> locate fdde:ad00:beef:0:0:ff:fe00:fc10 2175fdde:ad00:beef:0:a477:dc98:a4e4:71ea 0xcc00 2176done 2177``` 2178 2179### log filename \<filename\> 2180 2181- Note: Simulation Only, ie: `OPENTHREAD_EXAMPLES_SIMULATION` 2182- Requires `OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART` 2183 2184Specifies filename to capture otPlatLog() messages, useful when debugging automated test scripts on Linux when logging disrupts the automated test scripts. 2185 2186### log level 2187 2188Get the log level. 2189 2190```bash 2191> log level 21921 2193Done 2194``` 2195 2196### log level \<level\> 2197 2198Set the log level. 2199 2200```bash 2201> log level 4 2202Done 2203``` 2204 2205### meshdiag topology \[ip6-addrs\] \[children\] 2206 2207Discover network topology (list of routers and their connections). 2208 2209This command requires `OPENTHREAD_CONFIG_MESH_DIAG_ENABLE` and `OPENTHREAD_FTD`. 2210 2211Parameters are optional and indicate additional items to discover. Can be added in any order. 2212 2213- `ip6-addrs` to discover the list of IPv6 addresses of every router. 2214- `children` to discover the child table of every router. 2215 2216Output lists all discovered routers. Information per router: 2217 2218- Router ID 2219- RLOC16 2220- Extended MAC address 2221- Thread Version (if known). 2222- Whether the router is this device is itself (`me`) 2223- Whether the router is the parent of this device when device is a child (`parent`) 2224- Whether the router is `leader` 2225- Whether the router acts as a border router providing external connectivity (`br`) 2226- List of routers to which this router has a link: 2227 - `3-links`: Router IDs to which this router has a incoming link with link quality 3 2228 - `2-links`: Router IDs to which this router has a incoming link with link quality 2 2229 - `1-links`: Router IDs to which this router has a incoming link with link quality 1 2230 - If a list if empty, it is omitted in the out. 2231- If `ip6-addrs`, list of IPv6 addresses of the router 2232- If `children`, list of all children of the router. Information per child: 2233 - RLOC16 2234 - Incoming Link Quality from perspective of parent to child (zero indicates unknown) 2235 - Child Device mode (`r` rx-on-when-idle, `d` Full Thread Device, `n` Full Network Data, `-` no flags set) 2236 - Whether the child is this device itself (`me`) 2237 - Whether the child acts as a border router providing external connectivity (`br`) 2238 2239Discover network topology: 2240 2241```bash 2242> meshdiag topology 2243id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - me - leader 2244 3-links:{ 46 } 2245id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4 2246 3-links:{ 02 51 57 } 2247id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4 2248 3-links:{ 51 57 } 2249id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4 2250 3-links:{ 33 57 } 2251 2-links:{ 46 } 2252id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4 2253 3-links:{ 46 51 } 2254 1-links:{ 33 } 2255Done 2256``` 2257 2258Discover network topology with router's IPv6 addresses and children: 2259 2260```bash 2261> meshdiag topology children ip6-addrs 2262id:62 rloc16:0xf800 ext-addr:ce349873897233a5 ver:4 - me - br 2263 3-links:{ 46 } 2264 ip6-addrs: 2265 fdde:ad00:beef:0:0:ff:fe00:f800 2266 fdde:ad00:beef:0:211d:39e9:6b2e:4ad1 2267 fe80:0:0:0:cc34:9873:8972:33a5 2268 children: none 2269id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - leader - br 2270 3-links:{ 46 51 } 2271 ip6-addrs: 2272 fdde:ad00:beef:0:0:ff:fe00:fc00 2273 fdde:ad00:beef:0:0:ff:fe00:800 2274 fdde:ad00:beef:0:8a36:a3eb:47ae:a9b0 2275 fe80:0:0:0:88a5:7d2c:603f:e16c 2276 children: 2277 rloc16:0x0803 lq:3, mode:rn 2278 rloc16:0x0804 lq:3, mode:rdn 2279id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4 2280 3-links:{ 57 } 2281 ip6-addrs: 2282 fdde:ad00:beef:0:0:ff:fe00:8400 2283 fdde:ad00:beef:0:824:a126:cf19:a9f4 2284 fe80:0:0:0:d0e5:11a1:46b9:e54d 2285 children: none 2286id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4 2287 3-links:{ 02 46 57 } 2288 ip6-addrs: 2289 fdde:ad00:beef:0:0:ff:fe00:cc00 2290 fdde:ad00:beef:0:2986:bba3:12d0:1dd2 2291 fe80:0:0:0:98ab:43ab:abf0:5352 2292 children: none 2293id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4 2294 3-links:{ 33 51 } 2295 ip6-addrs: 2296 fdde:ad00:beef:0:0:ff:fe00:e400 2297 fdde:ad00:beef:0:87d0:550:bc18:9920 2298 fe80:0:0:0:d8e9:c4c0:e9da:55ff 2299 children: 2300 rloc16:0xe402 lq:3, mode:rn - br 2301 rloc16:0xe403 lq:3, mode:rn 2302id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4 2303 3-links:{ 02 51 62 } 2304 ip6-addrs: 2305 fdde:ad00:beef:0:0:ff:fe00:b800 2306 fdde:ad00:beef:0:df4d:2994:d85c:c337 2307 fe80:0:0:0:fc10:9d27:7e01:75cc 2308 children: none 2309Done 2310``` 2311 2312Discover network topology with children: 2313 2314```bash 2315> meshdiag topology children 2316id:02 rloc16:0x0800 ext-addr:8aa57d2c603fe16c ver:4 - parent - leader - br 2317 3-links:{ 46 51 } 2318 children: 2319 rloc16:0x0803 lq:0, mode:rn 2320 rloc16:0x0804 lq:0, mode:rdn - me 2321id:46 rloc16:0xb800 ext-addr:fe109d277e0175cc ver:4 2322 3-links:{ 02 51 62 } 2323 children: none 2324id:33 rloc16:0x8400 ext-addr:d2e511a146b9e54d ver:4 2325 3-links:{ 57 } 2326 children: none 2327id:51 rloc16:0xcc00 ext-addr:9aab43ababf05352 ver:4 2328 3-links:{ 02 46 57 } 2329 children: none 2330id:57 rloc16:0xe400 ext-addr:dae9c4c0e9da55ff ver:4 2331 3-links:{ 33 51 } 2332 children: 2333 rloc16:0xe402 lq:3, mode:rn - br 2334 rloc16:0xe403 lq:3, mode:rn 2335id:62 rloc16:0xf800 ext-addr:ce349873897233a5 ver:4 - br 2336 3-links:{ 46 } 2337 children: none 2338``` 2339 2340### meshdiag childtable \<router-rloc16\> 2341 2342Start a query for child table of a router with a given RLOC16. 2343 2344Output lists all child entries. Information per child: 2345 2346- RLOC16 2347- Extended MAC address 2348- Thread Version 2349- Timeout (in seconds) 2350- Age (seconds since last heard) 2351- Supervision interval (in seconds) 2352- Number of queued messages (in case the child is sleepy) 2353- Device Mode 2354- RSS (average and last) and link margin 2355- Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC) 2356- Connection time (seconds since link establishment {dd}d.{hh}:{mm}:{ss} format) 2357- CSL info 2358 - If synchronized 2359 - Period (in unit of 10-symbols-time) 2360 - Timeout (in seconds) 2361 - Channel 2362 2363```bash 2364> meshdiag childtable 0x6400 2365rloc16:0x6402 ext-addr:8e6f4d323bbed1fe ver:4 2366 timeout:120 age:36 supvn:129 q-msg:0 2367 rx-on:yes type:ftd full-net:yes 2368 rss - ave:-20 last:-20 margin:80 2369 err-rate - frame:11.51% msg:0.76% 2370 conn-time:00:11:07 2371 csl - sync:no period:0 timeout:0 channel:0 2372rloc16:0x6403 ext-addr:ee24e64ecf8c079a ver:4 2373 timeout:120 age:19 supvn:129 q-msg:0 2374 rx-on:no type:mtd full-net:no 2375 rss - ave:-20 last:-20 margin:80 2376 err-rate - frame:0.73% msg:0.00% 2377 conn-time:01:08:53 2378 csl - sync:no period:0 timeout:0 channel:0 2379Done 2380``` 2381 2382### meshdiag childip6 \<parent-rloc16\> 2383 2384Send a query to a parent to retrieve the IPv6 addresses of all its MTD children. 2385 2386```bash 2387> meshdiag childip6 0xdc00 2388child-rloc16: 0xdc02 2389 fdde:ad00:beef:0:ded8:cd58:b73:2c21 2390 fd00:2:0:0:c24a:456:3b6b:c597 2391 fd00:1:0:0:120b:95fe:3ecc:d238 2392child-rloc16: 0xdc03 2393 fdde:ad00:beef:0:3aa6:b8bf:e7d6:eefe 2394 fd00:2:0:0:8ff8:a188:7436:6720 2395 fd00:1:0:0:1fcf:5495:790a:370f 2396Done 2397``` 2398 2399### meshdiag routerneighbortable \<router-rloc16\> 2400 2401Start a query for router neighbor table of a router with a given RLOC16. 2402 2403Output lists all router neighbor entries. Information per entry: 2404 2405- RLOC16 2406- Extended MAC address 2407- Thread Version 2408- RSS (average and last) and link margin 2409- Error rates, frame tx (at MAC layer), IPv6 message tx (above MAC) 2410- Connection time (seconds since link establishment {dd}d.{hh}:{mm}:{ss} format) 2411 2412```bash 2413> meshdiag routerneighbortable 0x7400 2414rloc16:0x9c00 ext-addr:764788cf6e57a4d2 ver:4 2415 rss - ave:-20 last:-20 margin:80 2416 err-rate - frame:1.38% msg:0.00% 2417 conn-time:01:54:02 2418rloc16:0x7c00 ext-addr:4ed24fceec9bf6d3 ver:4 2419 rss - ave:-20 last:-20 margin:80 2420 err-rate - frame:0.72% msg:0.00% 2421 conn-time:00:11:27 2422Done 2423``` 2424 2425### mliid \<iid\> 2426 2427Set the Mesh Local IID. 2428 2429It must be used before Thread stack is enabled. 2430 2431Only for testing/reference device. 2432 2433```bash 2434> mliid 1122334455667788 2435Done 2436``` 2437 2438### mlr reg \<ipaddr\> ... [timeout] 2439 2440Register Multicast Listeners to Primary Backbone Router, with an optional `timeout` (in seconds). 2441 2442Omit `timeout` to use the default MLR timeout on the Primary Backbone Router. 2443 2444Use `timeout = 0` to deregister Multicast Listeners. 2445 2446NOTE: Only for Thread 1.2 Commissioner FTD device. 2447 2448```bash 2449> mlr reg ff04::1 2450status 0, 0 failed 2451Done 2452> mlr reg ff04::1 ff04::2 ff02::1 2453status 2, 1 failed 2454ff02:0:0:0:0:0:0:1 2455Done 2456> mlr reg ff04::1 ff04::2 1000 2457status 0, 0 failed 2458Done 2459> mlr reg ff04::1 ff04::2 0 2460status 0, 0 failed 2461Done 2462``` 2463 2464### mode 2465 2466Get the Thread Device Mode value. 2467 2468- -: no flags set (rx-off-when-idle, minimal Thread device, stable network data) 2469- r: rx-on-when-idle 2470- d: Full Thread Device 2471- n: Full Network Data 2472 2473```bash 2474> mode 2475rdn 2476Done 2477``` 2478 2479### mode [rdn] 2480 2481Set the Thread Device Mode value. 2482 2483- -: no flags set (rx-off-when-idle, minimal Thread device, stable network data) 2484- r: rx-on-when-idle 2485- d: Full Thread Device 2486- n: Full Network Data 2487 2488```bash 2489> mode rdn 2490Done 2491``` 2492 2493```bash 2494> mode - 2495Done 2496``` 2497 2498### multiradio 2499 2500Get the list of supported radio links by the device. 2501 2502This command is always available, even when only a single radio is supported by the device. 2503 2504```bash 2505> multiradio 2506[15.4, TREL] 2507Done 2508``` 2509 2510### multiradio neighbor list 2511 2512Get the list of neighbors and their supported radios and their preference. 2513 2514This command is only available when device supports more than one radio link. 2515 2516```bash 2517> multiradio neighbor list 2518ExtAddr:3a65bc38dbe4a5be, RLOC16:0xcc00, Radios:[15.4(255), TREL(255)] 2519ExtAddr:17df23452ee4a4be, RLOC16:0x1300, Radios:[15.4(255)] 2520Done 2521``` 2522 2523### multiradio neighbor \<ext address\> 2524 2525Get the radio info for specific neighbor with a given extended address. 2526 2527This command is only available when device supports more than one radio link. 2528 2529```bash 2530> multiradio neighbor 3a65bc38dbe4a5be 2531[15.4(255), TREL(255)] 2532Done 2533``` 2534 2535### nat64 cidr 2536 2537Gets the IPv4 configured CIDR in the NAT64 translator. 2538 2539`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is required. 2540 2541```bash 2542> nat64 cidr 2543192.168.255.0/24 2544Done 2545``` 2546 2547### nat64 cidr \<IPv4 address\> 2548 2549Sets the IPv4 CIDR in the NAT64 translator. 2550 2551Note: 2552 2553- `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is required. 2554- A valid CIDR must have a non-zero prefix length. 2555- When updating the CIDR, NAT64 translator will be reset and all existing sessions will be expired. 2556 2557```bash 2558> nat64 cidr 192.168.100.0/24 2559Done 2560``` 2561 2562### nat64 disable 2563 2564Disable NAT64 functions, including the translator and the prefix publishing. 2565 2566This command will reset the mapping table in the translator (if NAT64 translator is enabled in the build). 2567 2568`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` or `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` are required. 2569 2570```bash 2571> nat64 disable 2572Done 2573``` 2574 2575### nat64 enable 2576 2577Enable NAT64 functions, including the translator and the prefix publishing. 2578 2579This command can be called anytime. 2580 2581`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` or `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` are required. 2582 2583```bash 2584> nat64 enable 2585Done 2586``` 2587 2588### nat64 state 2589 2590Gets the state of NAT64 functions. 2591 2592Possible results for prefix manager are (`OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is required): 2593 2594- `Disabled`: NAT64 prefix manager is disabled. 2595- `NotRunning`: NAT64 prefix manager is enabled, but is not running, probably because the routing manager is disabled. 2596- `Idle`: NAT64 prefix manager is enabled and is running, but is not publishing a NAT64 prefix. Usually when there is another border router publishing a NAT64 prefix with higher priority. 2597- `Active`: NAT64 prefix manager is enabled, running and publishing a NAT64 prefix. 2598 2599Possible results for NAT64 translator are (`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is required): 2600 2601- `Disabled`: NAT64 translator is disabled. 2602- `NotRunning`: NAT64 translator is enabled, but is not translating packets, probably because it is not configured with a NAT64 prefix or a CIDR for NAT64. 2603- `Active`: NAT64 translator is enabled and is translating packets. 2604 2605`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` or `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` are required. 2606 2607```bash 2608> nat64 state 2609PrefixManager: NotRunning 2610Translator: NotRunning 2611Done 2612 2613> nat64 state 2614PrefixManager: Idle 2615Translator: NotRunning 2616Done 2617 2618> nat64 state 2619PrefixManager: Active 2620Translator: Active 2621Done 2622``` 2623 2624### nat64 mappings 2625 2626Get the NAT64 translator mappings. 2627 2628`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is required. 2629 2630```bash 2631> nat64 mappings 2632| | Address | | 4 to 6 | 6 to 4 | 2633+----------+---------------------------+--------+--------------+--------------+ 2634| ID | IPv6 | IPv4 | Expiry | Pkts | Bytes | Pkts | Bytes | 2635+----------+------------+--------------+--------+------+-------+------+-------+ 2636| 00021cb9 | fdc7::df79 | 192.168.64.2 | 7196s | 6 | 456 | 11 | 1928 | 2637| | TCP | 0 | 0 | 0 | 0 | 2638| | UDP | 1 | 136 | 16 | 1608 | 2639| | ICMP | 5 | 320 | 5 | 320 | 2640``` 2641 2642### nat64 counters 2643 2644Get the NAT64 translator packet and error counters. 2645 2646`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is required. 2647 2648```bash 2649> nat64 counters 2650| | 4 to 6 | 6 to 4 | 2651+---------------+-------------------------+-------------------------+ 2652| Protocol | Pkts | Bytes | Pkts | Bytes | 2653+---------------+----------+--------------+----------+--------------+ 2654| Total | 11 | 704 | 11 | 704 | 2655| TCP | 0 | 0 | 0 | 0 | 2656| UDP | 0 | 0 | 0 | 0 | 2657| ICMP | 11 | 704 | 11 | 704 | 2658| Errors | Pkts | Pkts | 2659+---------------+-------------------------+-------------------------+ 2660| Total | 8 | 4 | 2661| Illegal Pkt | 0 | 0 | 2662| Unsup Proto | 0 | 0 | 2663| No Mapping | 2 | 0 | 2664Done 2665``` 2666 2667### neighbor linkquality 2668 2669Print link quality info for all neighbors. 2670 2671```bash 2672> neighbor linkquality 2673| RLOC16 | Extended MAC | Frame Error | Msg Error | Avg RSS | Last RSS | Age | 2674+--------+------------------+-------------+-----------+---------+----------+-------+ 2675| 0xe800 | 9e2fa4e1b84f92db | 0.00 % | 0.00 % | -46 | -48 | 1 | 2676| 0xc001 | 0ad7ed6beaa6016d | 4.67 % | 0.08 % | -68 | -72 | 10 | 2677Done 2678``` 2679 2680### neighbor list 2681 2682List RLOC16 of neighbors. 2683 2684```bash 2685> neighbor list 26860xcc01 0xc800 0xf000 2687Done 2688``` 2689 2690### neighbor table 2691 2692Print table of neighbors. 2693 2694```bash 2695> neighbor table 2696| Role | RLOC16 | Age | Avg RSSI | Last RSSI |R|D|N| Extended MAC | 2697+------+--------+-----+----------+-----------+-+-+-+------------------+ 2698| C | 0xcc01 | 96 | -46 | -46 |1|1|1| 1eb9ba8a6522636b | 2699| R | 0xc800 | 2 | -29 | -29 |1|1|1| 9a91556102c39ddb | 2700| R | 0xf000 | 3 | -28 | -28 |1|1|1| 0ad7ed6beaa6016d | 2701Done 2702``` 2703 2704### neighbor conntime 2705 2706Print connection time and age of neighbors. 2707 2708The table provides the following info per neighbor: 2709 2710- RLOC16 2711- Extended MAC address 2712- Age (seconds since last heard from neighbor) 2713- Connection time (seconds since link establishment with neighbor) 2714 2715Duration 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>`. 2716 2717```bash 2718> neighbor conntime 2719| RLOC16 | Extended MAC | Last Heard (Age) | Connection Time | 2720+--------+------------------+------------------+------------------+ 2721| 0x8401 | 1a28be396a14a318 | 00:00:13 | 00:07:59 | 2722| 0x5c00 | 723ebf0d9eba3264 | 00:00:03 | 00:11:27 | 2723| 0xe800 | ce53628a1e3f5b3c | 00:00:02 | 00:00:15 | 2724Done 2725``` 2726 2727### neighbor conntime list 2728 2729Print connection time and age of neighbors. 2730 2731This 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. 2732 2733```bash 2734> neighbor conntime list 27350x8401 1a28be396a14a318 age:63 conn-time:644 27360x5c00 723ebf0d9eba3264 age:23 conn-time:852 27370xe800 ce53628a1e3f5b3c age:23 conn-time:180 2738Done 2739``` 2740 2741### netstat 2742 2743List all UDP sockets. 2744 2745```bash 2746> netstat 2747| Local Address | Peer Address | 2748+-------------------------------------------------+-------------------------------------------------+ 2749| [0:0:0:0:0:0:0:0]:49153 | [0:0:0:0:0:0:0:0]:0 | 2750| [0:0:0:0:0:0:0:0]:49152 | [0:0:0:0:0:0:0:0]:0 | 2751| [0:0:0:0:0:0:0:0]:61631 | [0:0:0:0:0:0:0:0]:0 | 2752| [0:0:0:0:0:0:0:0]:19788 | [0:0:0:0:0:0:0:0]:0 | 2753Done 2754``` 2755 2756### networkdiagnostic get \<addr\> \<type\> .. 2757 2758Send network diagnostic request to retrieve tlv of \<type\>s. 2759 2760If \<addr\> is unicast address, `Diagnostic Get` will be sent. if \<addr\> is multicast address, `Diagnostic Query` will be sent. 2761 2762```bash 2763> networkdiagnostic get fdde:ad00:beef:0:0:ff:fe00:fc00 0 1 6 2764> DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c000608640b0f674074c503 2765Ext Address: '0e336e1c41494e1c' 2766Rloc16: 0x0c00 2767Leader Data: 2768 PartitionId: 0x640b0f67 2769 Weighting: 64 2770 DataVersion: 116 2771 StableDataVersion: 197 2772 LeaderRouterId: 0x03 2773Done 2774 2775> networkdiagnostic get ff02::1 0 1 2776> DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c00 2777Ext Address: '0e336e1c41494e1c' 2778Rloc16: 0x0c00 2779Done 2780DIAG_GET.rsp/ans: 00083efcdb7e3f9eb0f201021800 2781Ext Address: '3efcdb7e3f9eb0f2' 2782Rloc16: 0x1800 2783Done 2784``` 2785 2786### networkdiagnostic reset \<addr\> \<type\> .. 2787 2788Send network diagnostic request to reset \<addr\>'s tlv of \<type\>s. Currently only `MAC Counters`(9) is supported. 2789 2790```bash 2791> diagnostic reset fd00:db8::ff:fe00:0 9 2792Done 2793``` 2794 2795### networkidtimeout 2796 2797Get the NETWORK_ID_TIMEOUT parameter used in the Router role. 2798 2799```bash 2800> networkidtimeout 2801120 2802Done 2803``` 2804 2805### networkidtimeout \<timeout\> 2806 2807Set the NETWORK_ID_TIMEOUT parameter used in the Router role. 2808 2809```bash 2810> networkidtimeout 120 2811Done 2812``` 2813 2814### networkkey 2815 2816Get the Thread Network Key value. 2817 2818```bash 2819> networkkey 282000112233445566778899aabbccddeeff 2821Done 2822``` 2823 2824### networkkey \<key\> 2825 2826Set the Thread Network Key value. 2827 2828```bash 2829> networkkey 00112233445566778899aabbccddeeff 2830Done 2831``` 2832 2833### networkname 2834 2835Get the Thread Network Name. 2836 2837```bash 2838> networkname 2839OpenThread 2840Done 2841``` 2842 2843### networkname \<name\> 2844 2845Set the Thread Network Name. 2846 2847**NOTE** The current commissioning credential becomes stale after changing this value. Use [pskc](#pskc--p-keypassphrase) to reset. 2848 2849```bash 2850> networkname OpenThread 2851Done 2852``` 2853 2854### networktime 2855 2856Get the Thread network time and the time sync parameters. 2857 2858```bash 2859> networktime 2860Network Time: 21084154us (synchronized) 2861Time Sync Period: 100s 2862XTAL Threshold: 300ppm 2863Done 2864``` 2865 2866### networktime \<timesyncperiod\> \<xtalthreshold\> 2867 2868Set time sync parameters 2869 2870- timesyncperiod: The time synchronization period, in seconds. 2871- xtalthreshold: The XTAL accuracy threshold for a device to become Router-Capable device, in PPM. 2872 2873```bash 2874> networktime 100 300 2875Done 2876``` 2877 2878### nexthop 2879 2880Output the table of allocated Router IDs and the current next hop (as Router ID) and path cost for each ID. 2881 2882```bash 2883> nexthop 2884| ID |NxtHop| Cost | 2885+------+------+------+ 2886| 9 | 9 | 1 | 2887| 25 | 25 | 0 | 2888| 30 | 30 | 1 | 2889| 46 | - | - | 2890| 50 | 30 | 3 | 2891| 60 | 30 | 2 | 2892Done 2893``` 2894 2895### nexthop \<rloc16\> 2896 2897Get the next hop (as RLOC16) and path cost towards a given RLOC16 destination. 2898 2899```bash 2900> nexthop 0xc000 29010xc000 cost:0 2902Done 2903 2904nexthop 0x8001 29050x2000 cost:3 2906Done 2907``` 2908 2909### panid 2910 2911Get the IEEE 802.15.4 PAN ID value. 2912 2913```bash 2914> panid 29150xdead 2916Done 2917``` 2918 2919### panid \<panid\> 2920 2921Set the IEEE 802.15.4 PAN ID value. 2922 2923```bash 2924> panid 0xdead 2925Done 2926``` 2927 2928### parent 2929 2930Get the diagnostic information for a Thread Router as parent. 2931 2932Note: 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. 2933 2934```bash 2935> parent 2936Ext Addr: be1857c6c21dce55 2937Rloc: 5c00 2938Link Quality In: 3 2939Link Quality Out: 3 2940Age: 20 2941Version: 4 2942Done 2943``` 2944 2945Note: When `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE` is enabled, this command will return two extra lines with information relevant for CSL Receiver operation. 2946 2947```bash 2948CSL clock accuracy: 20 2949CSL uncertainty: 5 2950``` 2951 2952### parentpriority 2953 2954Get the assigned parent priority value, -2 means not assigned. 2955 2956```bash 2957> parentpriority 29581 2959Done 2960``` 2961 2962### parentpriority \<parentpriority\> 2963 2964Set the assigned parent priority value: 1, 0, -1 or -2. 2965 2966```bash 2967> parentpriority 1 2968Done 2969``` 2970 2971### partitionid 2972 2973Get the Thread Network Partition ID. 2974 2975```bash 2976> partitionid 29774294967295 2978Done 2979``` 2980 2981### partitionid preferred 2982 2983Get the preferred Thread Leader Partition ID. 2984 2985`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 2986 2987```bash 2988> partitionid preferred 29894294967295 2990Done 2991``` 2992 2993### partitionid preferred \<partitionid\> 2994 2995Set the preferred Thread Leader Partition ID. 2996 2997`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 2998 2999```bash 3000> partitionid preferred 0xffffffff 3001Done 3002``` 3003 3004### ping \[async\] \[-I source\] \[-m] \<ipaddr\> \[size\] \[count\] \[interval\] \[hoplimit\] \[timeout\] 3005 3006Send an ICMPv6 Echo Request. 3007 3008- async: Use the non-blocking mode. New commands are allowed before the ping process terminates. 3009- source: The source IPv6 address of the echo request. 3010- -m: multicast loop, which allows looping back pings to multicast addresses that the device itself is subscribed to. 3011- size: The number of data bytes to be sent. 3012- count: The number of ICMPv6 Echo Requests to be sent. 3013- interval: The interval between two consecutive ICMPv6 Echo Requests in seconds. The value may have fractional form, for example `0.5`. 3014- hoplimit: The hoplimit of ICMPv6 Echo Request to be sent. 3015- timeout: Time in seconds to wait for the final ICMPv6 Echo Reply after sending out the request. The value may have fractional form, for example `3.5`. 3016 3017```bash 3018> ping fd00:db8:0:0:76b:6a05:3ae9:a61a 3019> 16 bytes from fd00:db8:0:0:76b:6a05:3ae9:a61a: icmp_seq=5 hlim=64 time=0ms 30201 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 0/0.0/0 ms. 3021Done 3022 3023> ping -I fd00:db8:0:0:76b:6a05:3ae9:a61a ff02::1 100 1 1 1 3024> 108 bytes from fd00:db8:0:0:f605:fb4b:d429:d59a: icmp_seq=4 hlim=64 time=7ms 30251 packets transmitted, 1 packets received. Round-trip min/avg/max = 7/7.0/7 ms. 3026Done 3027``` 3028 3029The address can be an IPv4 address, which will be synthesized to an IPv6 address using the preferred NAT64 prefix from the network data. 3030 3031> Note: The command will return `InvalidState` when the preferred NAT64 prefix is unavailable. 3032 3033```bash 3034> ping 172.17.0.1 3035Pinging synthesized IPv6 address: fdde:ad00:beef:2:0:0:ac11:1 3036> 16 bytes from fdde:ad00:beef:2:0:0:ac11:1: icmp_seq=5 hlim=64 time=0ms 30371 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 0/0.0/0 ms. 3038Done 3039``` 3040 3041### ping stop 3042 3043Stop sending ICMPv6 Echo Requests. 3044 3045```bash 3046> ping stop 3047Done 3048``` 3049 3050### platform 3051 3052Print the current platform 3053 3054```bash 3055> platform 3056NRF52840 3057Done 3058``` 3059 3060### pollperiod 3061 3062Get the customized data poll period of sleepy end device (milliseconds). Only for certification test. 3063 3064```bash 3065> pollperiod 30660 3067Done 3068``` 3069 3070### pollperiod \<pollperiod\> 3071 3072Set the customized data poll period for sleepy end device (milliseconds >= 10ms). Only for certification test. 3073 3074```bash 3075> pollperiod 10 3076Done 3077``` 3078 3079### pskc 3080 3081Get pskc in hex format. 3082 3083```bash 3084> pskc 308500000000000000000000000000000000 3086Done 3087``` 3088 3089### pskc [-p] \<key\>|\<passphrase\> 3090 3091With `-p` generate pskc from \<passphrase\> (UTF-8 encoded) together with **current** network name and extended PAN ID, otherwise set pskc as \<key\> (hex format). 3092 3093```bash 3094> pskc 67c0c203aa0b042bfb5381c47aef4d9e 3095Done 3096> pskc -p 123456 3097Done 3098``` 3099 3100### pskcref 3101 3102Get pskc key reference. 3103 3104`OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is required. 3105 3106```bash 3107> pskcref 31080x80000000 3109Done 3110``` 3111 3112### pskcref \<keyref\> 3113 3114Set pskc key reference as \<keyref\>. 3115 3116`OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is required. 3117 3118```bash 3119> pskcref 0x20017 3120Done 3121``` 3122 3123### preferrouterid \<routerid\> 3124 3125Prefer a Router ID when solicit router id from Leader. 3126 3127```bash 3128> preferrouterid 16 3129Done 3130``` 3131 3132### prefix 3133 3134Get the prefix list in the local Network Data. Note: For the Thread 1.2 border router with backbone capability, the local Domain Prefix would be listed as well (with flag `D`), with preceding `-` if backbone functionality is disabled. 3135 3136```bash 3137> prefix 31382001:dead:beef:cafe::/64 paros med 3139- fd00:7d03:7d03:7d03::/64 prosD med 3140Done 3141``` 3142 3143### prefix add \<prefix\> [padcrosnD][prf] 3144 3145Add a valid prefix to the Network Data. 3146 3147Note: The Domain Prefix flag (`D`) is only available for Thread 1.2. 3148 3149- p: Preferred flag 3150- a: Stateless IPv6 Address Autoconfiguration flag 3151- d: DHCPv6 IPv6 Address Configuration flag 3152- c: DHCPv6 Other Configuration flag 3153- r: Default Route flag 3154- o: On Mesh flag 3155- s: Stable flag 3156- n: Nd Dns flag 3157- D: Domain Prefix flag 3158- prf: Default router preference, which may be 'high', 'med', or 'low'. 3159 3160```bash 3161> prefix add 2001:dead:beef:cafe::/64 paros med 3162Done 3163 3164> prefix add fd00:7d03:7d03:7d03::/64 prosD med 3165Done 3166``` 3167 3168### prefix meshlocal 3169 3170Get the mesh local prefix. 3171 3172```bash 3173> prefix meshlocal 3174fdde:ad00:beef:0::/64 3175Done 3176``` 3177 3178### prefix meshlocal <prefix> 3179 3180Set the mesh local prefix. 3181 3182```bash 3183> prefix meshlocal fdde:ad00:beef:0::/64 3184Done 3185``` 3186 3187### prefix remove \<prefix\> 3188 3189Invalidate a prefix in the Network Data. 3190 3191```bash 3192> prefix remove 2001:dead:beef:cafe::/64 3193Done 3194``` 3195 3196### promiscuous 3197 3198Get radio promiscuous property. 3199 3200```bash 3201> promiscuous 3202Disabled 3203Done 3204``` 3205 3206### promiscuous enable 3207 3208Enable radio promiscuous operation and print raw packet content. 3209 3210```bash 3211> promiscuous enable 3212Done 3213``` 3214 3215### promiscuous disable 3216 3217Disable radio promiscuous operation. 3218 3219```bash 3220> promiscuous disable 3221Done 3222``` 3223 3224### radio enable 3225 3226Enable radio. 3227 3228```bash 3229> radio enable 3230Done 3231``` 3232 3233### radio disable 3234 3235Disable radio. 3236 3237```bash 3238> radio disable 3239Done 3240``` 3241 3242### radio stats 3243 3244`OPENTHREAD_CONFIG_RADIO_STATS_ENABLE` is required. This feature is only available on FTD and MTD. 3245 3246The radio statistics shows the time when the radio is in sleep/tx/rx state. The command will show the time of these states since last reset in unit of microseconds. It will also show the percentage of the time. 3247 3248```bash 3249> radio stats 3250Radio Statistics: 3251Total Time: 67.756s 3252Tx Time: 0.022944s (0.03%) 3253Rx Time: 1.482353s (2.18%) 3254Sleep Time: 66.251128s (97.77%) 3255Disabled Time: 0.000080s (0.00%) 3256Done 3257``` 3258 3259### radio stats clear 3260 3261`OPENTHREAD_CONFIG_RADIO_STATS_ENABLE` is required. This feature is only available on FTD and MTD. 3262 3263This command resets the radio statistics. It sets all the time to 0. 3264 3265```bash 3266> radio stats clear 3267Done 3268``` 3269 3270### radiofilter 3271 3272`OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` is required. 3273 3274The radio filter is mainly intended for testing. It can be used to temporarily block all tx/rx on the IEEE 802.15.4 radio. 3275 3276When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any frame and/or potentially send ack). Also the frame transmission requests return immediately without sending the frame over the air (return "no ack" error if ack is requested, otherwise return success). 3277 3278Get radio filter status (enabled or disabled). 3279 3280```bash 3281> radiofilter 3282Disabled 3283Done 3284``` 3285 3286### radiofilter enable 3287 3288`OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` is required. 3289 3290Enable radio radio filter. 3291 3292```bash 3293> radiofilter enable 3294Done 3295``` 3296 3297### radiofilter disable 3298 3299`OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` is required. 3300 3301Disable radio radio filter. 3302 3303```bash 3304> radiofilter disable 3305Done 3306``` 3307 3308### rcp 3309 3310RCP-related commands. 3311 3312### region 3313 3314Set the radio region, this can affect the transmit power limit. 3315 3316```bash 3317> region US 3318Done 3319> region 3320US 3321Done 3322``` 3323 3324### rcp version 3325 3326Print RCP version string. 3327 3328```bash 3329> rcp version 3330OPENTHREAD/20191113-00825-g82053cc9d-dirty; SIMULATION; Jun 4 2020 17:53:16 3331Done 3332``` 3333 3334### releaserouterid \<routerid\> 3335 3336Release a Router ID that has been allocated by the device in the Leader role. 3337 3338```bash 3339> releaserouterid 16 3340Done 3341``` 3342 3343### reset 3344 3345Signal a platform reset. 3346 3347```bash 3348> reset 3349``` 3350 3351### reset bootloader 3352 3353Signal a platform reset to bootloader mode, if supported. 3354 3355Requires `OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE`. 3356 3357```bash 3358> reset bootloader 3359Done 3360``` 3361 3362### rloc16 3363 3364Get the Thread RLOC16 value. 3365 3366```bash 3367> rloc16 33680xdead 3369Done 3370``` 3371 3372### route 3373 3374Get the external route list in the local Network Data. 3375 3376```bash 3377> route 33782001:dead:beef:cafe::/64 s med 3379Done 3380``` 3381 3382### route add \<prefix\> [sna][prf] 3383 3384Add a valid external route to the Network Data. 3385 3386- s: Stable flag 3387- n: NAT64 flag 3388- a: Advertising PIO (AP) flag 3389- prf: Default Router Preference, which may be: 'high', 'med', or 'low'. 3390 3391```bash 3392> route add 2001:dead:beef:cafe::/64 s med 3393Done 3394``` 3395 3396### route remove \<prefix\> 3397 3398Invalidate a external route in the Network Data. 3399 3400```bash 3401> route remove 2001:dead:beef:cafe::/64 3402Done 3403``` 3404 3405### router list 3406 3407List allocated Router IDs. 3408 3409```bash 3410> router list 34118 24 50 3412Done 3413``` 3414 3415### router table 3416 3417Print table of routers. 3418 3419```bash 3420> router table 3421| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC | Link | 3422+----+--------+----------+-----------+-------+--------+-----+------------------+------+ 3423| 22 | 0x5800 | 63 | 0 | 0 | 0 | 0 | 0aeb8196c9f61658 | 0 | 3424| 49 | 0xc400 | 63 | 0 | 3 | 3 | 0 | faa1c03908e2dbf2 | 1 | 3425Done 3426``` 3427 3428### router \<id\> 3429 3430Print diagnostic information for a Thread Router. The `id` may be a Router ID or an RLOC16. 3431 3432```bash 3433> router 50 3434Alloc: 1 3435Router ID: 50 3436Rloc: c800 3437Next Hop: c800 3438Link: 1 3439Ext Addr: e2b3540590b0fd87 3440Cost: 0 3441Link Quality In: 3 3442Link Quality Out: 3 3443Age: 3 3444Done 3445``` 3446 3447```bash 3448> router 0xc800 3449Alloc: 1 3450Router ID: 50 3451Rloc: c800 3452Next Hop: c800 3453Link: 1 3454Ext Addr: e2b3540590b0fd87 3455Cost: 0 3456Link Quality In: 3 3457Link Quality Out: 3 3458Age: 7 3459Done 3460``` 3461 3462### routerdowngradethreshold 3463 3464Get the ROUTER_DOWNGRADE_THRESHOLD value. 3465 3466```bash 3467> routerdowngradethreshold 346823 3469Done 3470``` 3471 3472### routerdowngradethreshold \<threshold\> 3473 3474Set the ROUTER_DOWNGRADE_THRESHOLD value. 3475 3476```bash 3477> routerdowngradethreshold 23 3478Done 3479``` 3480 3481### routereligible 3482 3483Indicates whether the router role is enabled or disabled. 3484 3485```bash 3486> routereligible 3487Enabled 3488Done 3489``` 3490 3491### routereligible enable 3492 3493Enable the router role. 3494 3495```bash 3496> routereligible enable 3497Done 3498``` 3499 3500### routereligible disable 3501 3502Disable the router role. 3503 3504```bash 3505> routereligible disable 3506Done 3507``` 3508 3509### routerselectionjitter 3510 3511Get the ROUTER_SELECTION_JITTER value. 3512 3513```bash 3514> routerselectionjitter 3515120 3516Done 3517``` 3518 3519### routerselectionjitter \<jitter\> 3520 3521Set the ROUTER_SELECTION_JITTER value. 3522 3523```bash 3524> routerselectionjitter 120 3525Done 3526``` 3527 3528### routerupgradethreshold 3529 3530Get the ROUTER_UPGRADE_THRESHOLD value. 3531 3532```bash 3533> routerupgradethreshold 353416 3535Done 3536``` 3537 3538### routerupgradethreshold \<threshold\> 3539 3540Set the ROUTER_UPGRADE_THRESHOLD value. 3541 3542```bash 3543> routerupgradethreshold 16 3544Done 3545``` 3546 3547### childrouterlinks 3548 3549Get the MLE_CHILD_ROUTER_LINKS value. 3550 3551```bash 3552> childrouterlinks 355316 3554Done 3555``` 3556 3557### childrouterlinks \<number_of_links\> 3558 3559Set the MLE_CHILD_ROUTER_LINKS value. 3560 3561```bash 3562> childrouterlinks 16 3563Done 3564``` 3565 3566### scan \[channel\] 3567 3568Perform an IEEE 802.15.4 Active Scan. 3569 3570- channel: The channel to scan on. If no channel is provided, the active scan will cover all valid channels. 3571 3572```bash 3573> scan 3574| PAN | MAC Address | Ch | dBm | LQI | 3575+------+------------------+----+-----+-----+ 3576| ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 | 3577Done 3578``` 3579 3580### scan energy \[duration\] \[channel\] 3581 3582Perform an IEEE 802.15.4 Energy Scan. 3583 3584- duration: The time in milliseconds to spend scanning each channel. 3585 3586```bash 3587> scan energy 10 3588| Ch | RSSI | 3589+----+------+ 3590| 11 | -59 | 3591| 12 | -62 | 3592| 13 | -67 | 3593| 14 | -61 | 3594| 15 | -87 | 3595| 16 | -86 | 3596| 17 | -86 | 3597| 18 | -52 | 3598| 19 | -58 | 3599| 20 | -82 | 3600| 21 | -76 | 3601| 22 | -82 | 3602| 23 | -74 | 3603| 24 | -81 | 3604| 25 | -88 | 3605| 26 | -71 | 3606Done 3607``` 3608 3609```bash 3610> scan energy 10 20 3611| Ch | RSSI | 3612+----+------+ 3613| 20 | -82 | 3614Done 3615``` 3616 3617### service 3618 3619Module for controlling service registration in Network Data. Each change in service registration must be sent to leader by `netdata register` command before taking effect. 3620 3621### service add \<enterpriseNumber\> \<serviceData\> [\<serverData\>] 3622 3623Add service to the Network Data. 3624 3625- enterpriseNumber: IANA enterprise number 3626- serviceData: hex-encoded binary service data 3627- serverData: hex-encoded binary server data (empty if not provided) 3628 3629```bash 3630> service add 44970 112233 aabbcc 3631Done 3632> netdata register 3633Done 3634``` 3635 3636### service remove \<enterpriseNumber\> \<serviceData\> 3637 3638Remove service from Network Data. 3639 3640- enterpriseNumber: IANA enterprise number 3641- serviceData: hext-encoded binary service data 3642 3643```bash 3644> service remove 44970 112233 3645Done 3646> netdata register 3647Done 3648``` 3649 3650### singleton 3651 3652Return true when there are no other nodes in the network, otherwise return false. 3653 3654```bash 3655> singleton 3656true or false 3657Done 3658``` 3659 3660### sntp query \[SNTP server IP\] \[SNTP server port\] 3661 3662Send SNTP Query to obtain current unix epoch time (from 1st January 1970). The latter two parameters have following default values: 3663 3664- NTP server IP: 2001:4860:4806:8:: (Google IPv6 NTP Server) 3665- NTP server port: 123 3666 3667```bash 3668> sntp query 3669> SNTP response - Unix time: 1540894725 (era: 0) 3670``` 3671 3672You can use NAT64 of OpenThread Border Router to reach e.g. Google IPv4 NTP Server: 3673 3674```bash 3675> sntp query 64:ff9b::d8ef:2308 3676> SNTP response - Unix time: 1540898611 (era: 0) 3677``` 3678 3679### state 3680 3681Return state of current state. 3682 3683```bash 3684> state 3685offline, disabled, detached, child, router or leader 3686Done 3687``` 3688 3689### state leader 3690 3691Become a leader and start a new partition 3692 3693If the device is not attached, this command will force the device to start as the leader of the network. This use case is only intended for testing and demo purposes, and using the API while the device is detached can make a production application non-compliant with the Thread Specification. 3694 3695If the device is already attached, this API can be used to try to take over as the leader, creating a new partition. For this to work, the local leader weight (`leaderweight`) must be larger than the weight of the current leader (from `leaderdata`). If it is not, error `NotCapable` is outputted to indicate to the caller that they need to adjust the weight. 3696 3697Taking over the leader role in this way is only allowed when triggered by an explicit user action. Using this API without such user action can make a production application non-compliant with the Thread Specification. 3698 3699```bash 3700> leaderdata 3701Partition ID: 1886755069 3702Weighting: 65 3703Data Version: 178 3704Stable Data Version: 48 3705Leader Router ID: 59 3706Done 3707 3708> leaderweight 370964 3710Done 3711 3712> state leader 3713Error 27: NotCapable 3714 3715> leaderweight 66 3716Done 3717 3718> state leader 3719Done 3720``` 3721 3722### state <state> 3723 3724Try to switch to state `detached`, `child`, `router`. 3725 3726```bash 3727> state detached 3728Done 3729``` 3730 3731### test tmforiginfilter \[enable|disable\] 3732 3733Enable/disable filter that drops UDP messages sent to the TMF port from untrusted origin. Also get the current state of the filter if no argument is specified. 3734 3735Note: This filter is enabled by default. 3736 3737This command is intended for testing only. `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required for all `test` sub-commands. 3738 3739Get the current state of the filter. 3740 3741``` 3742> test tmforiginfilter 3743Enabled 3744``` 3745 3746Enable or disable the filter. 3747 3748``` 3749> test tmforiginfilter enable 3750Done 3751> 3752> test tmforiginfilter 3753Enabled 3754> 3755> test tmforiginfilter disable 3756Done 3757> 3758> test tmforiginfilter 3759Disabled 3760> 3761``` 3762 3763### thread start 3764 3765Enable Thread protocol operation and attach to a Thread network. 3766 3767```bash 3768> thread start 3769Done 3770``` 3771 3772### thread stop 3773 3774Disable Thread protocol operation and detach from a Thread network. 3775 3776```bash 3777> thread stop 3778Done 3779``` 3780 3781### thread version 3782 3783Get the Thread Version number. 3784 3785```bash 3786> thread version 37872 3788Done 3789``` 3790 3791### timeinqueue 3792 3793Print the tx queue time-in-queue histogram. 3794 3795Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`. 3796 3797The 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. 3798 3799Each table row shows min and max time-in-queue (in milliseconds) followed by number of messages with time-in-queue within the specified min-max range. The histogram information is collected since the OpenThread instance was initialized or since the last time statistics collection was reset by the `timeinqueue reset` command. 3800 3801The collected statistics can be reset by `timeinqueue reset`. 3802 3803```bash 3804> timeinqueue 3805| Min | Max |Msg Count| 3806+------+------+---------+ 3807| 0 | 9 | 1537 | 3808| 10 | 19 | 156 | 3809| 20 | 29 | 57 | 3810| 30 | 39 | 108 | 3811| 40 | 49 | 60 | 3812| 50 | 59 | 76 | 3813| 60 | 69 | 88 | 3814| 70 | 79 | 51 | 3815| 80 | 89 | 86 | 3816| 90 | 99 | 45 | 3817| 100 | 109 | 43 | 3818| 110 | 119 | 44 | 3819| 120 | 129 | 38 | 3820| 130 | 139 | 44 | 3821| 140 | 149 | 35 | 3822| 150 | 159 | 41 | 3823| 160 | 169 | 34 | 3824| 170 | 179 | 13 | 3825| 180 | 189 | 24 | 3826| 190 | 199 | 3 | 3827| 200 | 209 | 0 | 3828| 210 | 219 | 0 | 3829| 220 | 229 | 2 | 3830| 230 | 239 | 0 | 3831| 240 | 249 | 0 | 3832| 250 | 259 | 0 | 3833| 260 | 269 | 0 | 3834| 270 | 279 | 0 | 3835| 280 | 289 | 0 | 3836| 290 | 299 | 1 | 3837| 300 | 309 | 0 | 3838| 310 | 319 | 0 | 3839| 320 | 329 | 0 | 3840| 330 | 339 | 0 | 3841| 340 | 349 | 0 | 3842| 350 | 359 | 0 | 3843| 360 | 369 | 0 | 3844| 370 | 379 | 0 | 3845| 380 | 389 | 0 | 3846| 390 | 399 | 0 | 3847| 400 | 409 | 0 | 3848| 410 | 419 | 0 | 3849| 420 | 429 | 0 | 3850| 430 | 439 | 0 | 3851| 440 | 449 | 0 | 3852| 450 | 459 | 0 | 3853| 460 | 469 | 0 | 3854| 470 | 479 | 0 | 3855| 480 | 489 | 0 | 3856| 490 | inf | 0 | 3857Done 3858``` 3859 3860### timeinqueue max 3861 3862Print the maximum observed time-in-queue in milliseconds. 3863 3864Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`. 3865 3866The 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. 3867 3868```bash 3869> timeinqueue max 3870291 3871``` 3872 3873### timeinqueue reset 3874 3875Reset the TX queue time-in-queue statistics. 3876 3877```bash 3878> timeinqueue reset 3879Done 3880``` 3881 3882### trel 3883 3884Indicate whether TREL radio operation is enabled or not. 3885 3886`OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE` is required for all `trel` sub-commands. 3887 3888```bash 3889> trel 3890Enabled 3891Done 3892``` 3893 3894### trel enable 3895 3896Enable TREL operation. 3897 3898```bash 3899> trel enable 3900Done 3901``` 3902 3903### trel disable 3904 3905Disable TREL operation. 3906 3907```bash 3908> trel disable 3909Done 3910``` 3911 3912### trel filter 3913 3914Indicate whether TREL filter mode is enabled or not 3915 3916When filter mode is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly intended for use during testing. 3917 3918```bash 3919> trel filter 3920Disabled 3921Done 3922``` 3923 3924### trel filter enable 3925 3926Enable TREL filter mode. 3927 3928```bash 3929> trel filter enable 3930Done 3931``` 3932 3933### trel filter disable 3934 3935Disable TREL filter mode. 3936 3937```bash 3938> trel filter disable 3939Done 3940``` 3941 3942### trel peers [list] 3943 3944Get the TREL peer table in table format or as a list. 3945 3946```bash 3947> trel peers 3948| No | Ext MAC Address | Ext PAN Id | IPv6 Socket Address | 3949+-----+------------------+------------------+--------------------------------------------------+ 3950| 1 | 5e5785ba3a63adb9 | f0d9c001f00d2e43 | [fe80:0:0:0:cc79:2a29:d311:1aea]:9202 | 3951| 2 | ce792a29d3111aea | dead00beef00cafe | [fe80:0:0:0:5c57:85ba:3a63:adb9]:9203 | 3952Done 3953 3954> trel peers list 3955001 ExtAddr:5e5785ba3a63adb9 ExtPanId:f0d9c001f00d2e43 SockAddr:[fe80:0:0:0:cc79:2a29:d311:1aea]:9202 3956002 ExtAddr:ce792a29d3111aea ExtPanId:dead00beef00cafe SockAddr:[fe80:0:0:0:5c57:85ba:3a63:adb9]:9203 3957Done 3958``` 3959 3960### trel port 3961 3962Get the TREL UDP port number. 3963 3964```bash 3965> trel port 396649154 3967Done 3968``` 3969 3970### tvcheck enable 3971 3972Enable thread version check when upgrading to router or leader. 3973 3974Note: Thread version check is enabled by default. 3975 3976`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 3977 3978```bash 3979> tvcheck enable 3980Done 3981``` 3982 3983### tvcheck disable 3984 3985Disable thread version check when upgrading to router or leader. 3986 3987Note: Thread version check is enabled by default. 3988 3989`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 3990 3991```bash 3992> tvcheck disable 3993Done 3994``` 3995 3996### txpower 3997 3998Get the transmit power in dBm. 3999 4000```bash 4001> txpower 4002-10 dBm 4003Done 4004``` 4005 4006### txpower \<txpower\> 4007 4008Set the transmit power in dBm. 4009 4010```bash 4011> txpower -10 4012Done 4013``` 4014 4015### unsecureport add \<port\> 4016 4017Add a port to the allowed unsecured port list. 4018 4019```bash 4020> unsecureport add 1234 4021Done 4022``` 4023 4024### unsecureport remove \<port\> 4025 4026Remove a port from the allowed unsecured port list. 4027 4028```bash 4029> unsecureport remove 1234 4030Done 4031``` 4032 4033### unsecureport remove all 4034 4035Remove all ports from the allowed unsecured port list. 4036 4037```bash 4038> unsecureport remove all 4039Done 4040``` 4041 4042### unsecureport get 4043 4044Print all ports from the allowed unsecured port list. 4045 4046```bash 4047> unsecureport get 40481234 4049Done 4050``` 4051 4052### uptime 4053 4054This command requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. 4055 4056Print the OpenThread stack uptime (duration since OpenThread stack initialization). 4057 4058```bash 4059> uptime 406012:46:35.469 4061Done 4062> 4063``` 4064 4065### uptime ms 4066 4067This command requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. 4068 4069Print the OpenThread stack uptime in msec. 4070 4071```bash 4072> uptime ms 4073426238 4074Done 4075> 4076``` 4077 4078### vendor name 4079 4080Get the vendor name. 4081 4082```bash 4083> vendor name 4084nest 4085Done 4086``` 4087 4088Set the vendor name (requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`). 4089 4090```bash 4091> vendor name nest 4092Done 4093``` 4094 4095### vendor model 4096 4097Get the vendor model. 4098 4099```bash 4100> vendor model 4101Hub Max 4102Done 4103``` 4104 4105Set the vendor model (requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`). 4106 4107```bash 4108> vendor model Hub\ Max 4109Done 4110``` 4111 4112### vendor swversion 4113 4114Get the vendor SW version. 4115 4116```bash 4117> vendor swversion 4118Marble3.5.1 4119Done 4120``` 4121 4122Set the vendor SW version (requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`). 4123 4124```bash 4125> vendor swversion Marble3.5.1 4126Done 4127``` 4128 4129### verhoeff calculate 4130 4131Calculates the Verhoeff checksum for a given decimal string. 4132 4133Requires `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE`. 4134 4135The input string MUST consist of characters in `['0'-'9']`. 4136 4137```bash 4138> verhoeff calculate 30731842 41391 4140Done 4141``` 4142 4143### verhoeff validate 4144 4145Validates the Verhoeff checksum for a given decimal string. 4146 4147Requires `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE`. 4148 4149The input string MUST consist of characters in `['0'-'9']`. The last digit is treated as checksum. 4150 4151```bash 4152> verhoeff validate 307318421 4153Done 4154> verhoeff validate 307318425 4155Error 1: Failed 4156``` 4157 4158### version 4159 4160Print the build version information. 4161 4162```bash 4163> version 4164OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09 4165Done 4166``` 4167 4168### version api 4169 4170Print API version number. 4171 4172```bash 4173> version api 417428 4175Done 4176``` 4177 4178### mac retries direct 4179 4180Get the number of direct TX retries on the MAC layer. 4181 4182```bash 4183> mac retries direct 41843 4185Done 4186``` 4187 4188### mac retries direct \<number\> 4189 4190Set the number of direct TX retries on the MAC layer. 4191 4192```bash 4193> mac retries direct 5 4194Done 4195``` 4196 4197### mac retries indirect 4198 4199Get the number of indirect TX retries on the MAC layer. 4200 4201```bash 4202> mac retries indirect 42033 4204Done 4205``` 4206 4207### mac retries indirect \<number\> 4208 4209Set the number of indirect TX retries on the MAC layer. 4210 4211```bash 4212> mac retries indirect 5 4213Done 4214``` 4215 4216### mac send \<op\> 4217 4218Instruct an Rx-Off-When-Idle device to send a mac frame to its parent. The mac frame could be either a mac data request or an empty mac data frame. Use `datarequest` to send a mac data request and `data` to send an empty mac data. This feature is for certification, it can only be used when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. 4219 4220```bash 4221> mac send datarequest 4222Done 4223``` 4224 4225```bash 4226> mac send emptydata 4227Done 4228``` 4229 4230### macfilter 4231 4232List the macfilter status, including address and received signal strength filter settings. 4233 4234```bash 4235> macfilter 4236Address Mode: Allowlist 42370f6127e33af6b403 : rss -95 (lqi 1) 42380f6127e33af6b402 4239RssIn List: 42400f6127e33af6b403 : rss -95 (lqi 1) 4241Default rss: -50 (lqi 3) 4242Done 4243``` 4244 4245### macfilter addr 4246 4247List the address filter status. 4248 4249```bash 4250> macfilter addr 4251Allowlist 42520f6127e33af6b403 : rss -95 (lqi 1) 42530f6127e33af6b402 4254Done 4255``` 4256 4257### macfilter addr disable 4258 4259Disable address filter mode. 4260 4261```bash 4262> macfilter addr disable 4263Done 4264``` 4265 4266### macfilter addr allowlist 4267 4268Enable allowlist address filter mode. 4269 4270```bash 4271> macfilter addr allowlist 4272Done 4273``` 4274 4275### macfilter addr denylist 4276 4277Enable denylist address filter mode. 4278 4279```bash 4280> macfilter addr denylist 4281Done 4282``` 4283 4284### macfilter addr add \<extaddr\> \[rss\] 4285 4286Add an IEEE 802.15.4 Extended Address to the address filter, and fixed the received signal strength for the messages from the address if rss is specified. 4287 4288```bash 4289> macfilter addr add 0f6127e33af6b403 -95 4290Done 4291``` 4292 4293```bash 4294> macfilter addr add 0f6127e33af6b402 4295Done 4296``` 4297 4298### macfilter addr remove \<extaddr\> 4299 4300Remove the IEEE802.15.4 Extended Address from the address filter. 4301 4302```bash 4303> macfilter addr remove 0f6127e33af6b402 4304Done 4305``` 4306 4307### macfilter addr clear 4308 4309Clear all the IEEE802.15.4 Extended Addresses from the address filter. 4310 4311```bash 4312> macfilter addr clear 4313Done 4314``` 4315 4316### macfilter rss 4317 4318List the rss filter status 4319 4320```bash 4321> macfilter rss 43220f6127e33af6b403 : rss -95 (lqi 1) 4323Default rss: -50 (lqi 3) 4324Done 4325``` 4326 4327### macfilter rss add \<extaddr\> \<rss\> 4328 4329Set the received signal strength for the messages from the IEEE802.15.4 Extended Address. If extaddr is \*, default received signal strength for all received messages would be set. 4330 4331```bash 4332> macfilter rss add * -50 4333Done 4334``` 4335 4336```bash 4337> macfilter rss add 0f6127e33af6b404 -85 4338Done 4339``` 4340 4341### macfilter rss add-lqi \<extaddr\> \<lqi\> 4342 4343Set the received link quality for the messages from the IEEE802.15.4 Extended Address. Valid lqi range [0,3] If extaddr is \*, default received link quality for all received messages would be set. Equivalent with 'filter rss add' with similar usage 4344 4345```bash 4346> macfilter rss add-lqi * 3 4347Done 4348``` 4349 4350```bash 4351> macfilter rss add-lqi 0f6127e33af6b404 2 4352Done 4353``` 4354 4355### macfilter rss remove \<extaddr\> 4356 4357Removes the received signal strength or received link quality setting on the Extended Address. If extaddr is \*, default received signal strength or link quality for all received messages would be unset. 4358 4359```bash 4360> macfilter rss remove * 4361Done 4362``` 4363 4364```bash 4365> macfilter rss remove 0f6127e33af6b404 4366Done 4367``` 4368 4369### macfilter rss clear 4370 4371Clear all the received signal strength or received link quality settings. 4372 4373```bash 4374> macfilter rss clear 4375Done 4376``` 4377 4378### diag 4379 4380Factory Diagnostics module is enabled only when building OpenThread with `OPENTHREAD_CONFIG_DIAG_ENABLE=1` option. Go [diagnostics module][diag] for more information. 4381 4382[diag]: ../../src/core/diags/README.md 4383