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