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](#br) 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- [commissioner](README_COMMISSIONER.md) 38- [contextreusedelay](#contextreusedelay) 39- [counters](#counters) 40- [csl](#csl) 41- [dataset](README_DATASET.md) 42- [delaytimermin](#delaytimermin) 43- [diag](#diag) 44- [discover](#discover-channel) 45- [dns](#dns-config) 46- [domainname](#domainname) 47- [dua](#dua-iid) 48- [eidcache](#eidcache) 49- [eui64](#eui64) 50- [extaddr](#extaddr) 51- [extpanid](#extpanid) 52- [factoryreset](#factoryreset) 53- [fake](#fake) 54- [fem](#fem) 55- [history](README_HISTORY.md) 56- [ifconfig](#ifconfig) 57- [ipaddr](#ipaddr) 58- [ipmaddr](#ipmaddr) 59- [joiner](README_JOINER.md) 60- [joinerport](#joinerport-port) 61- [keysequence](#keysequence-counter) 62- [leaderdata](#leaderdata) 63- [leaderweight](#leaderweight) 64- [linkmetrics](#linkmetrics-mgmt-ipaddr-enhanced-ack-clear) 65- [locate](#locate) 66- [log](#log-filename-filename) 67- [mac](#mac-retries-direct) 68- [macfilter](#macfilter) 69- [mliid](#mliid-iid) 70- [mlr](#mlr-reg-ipaddr--timeout) 71- [mode](#mode) 72- [multiradio](#multiradio) 73- [neighbor](#neighbor-list) 74- [netdata](README_NETDATA.md) 75- [netstat](#netstat) 76- [networkdiagnostic](#networkdiagnostic-get-addr-type-) 77- [networkidtimeout](#networkidtimeout) 78- [networkkey](#networkkey) 79- [networkname](#networkname) 80- [networktime](#networktime) 81- [panid](#panid) 82- [parent](#parent) 83- [parentpriority](#parentpriority) 84- [partitionid](#partitionid) 85- [ping](#ping--i-source-ipaddr-size-count-interval-hoplimit-timeout) 86- [pollperiod](#pollperiod-pollperiod) 87- [preferrouterid](#preferrouterid-routerid) 88- [prefix](#prefix) 89- [promiscuous](#promiscuous) 90- [pskc](#pskc--p-keypassphrase) 91- [radiofilter](#radiofilter) 92- [rcp](#rcp) 93- [region](#region) 94- [releaserouterid](#releaserouterid-routerid) 95- [reset](#reset) 96- [rloc16](#rloc16) 97- [route](#route) 98- [router](#router-list) 99- [routerdowngradethreshold](#routerdowngradethreshold) 100- [routereligible](#routereligible) 101- [routerselectionjitter](#routerselectionjitter) 102- [routerupgradethreshold](#routerupgradethreshold) 103- [scan](#scan-channel) 104- [service](#service) 105- [singleton](#singleton) 106- [sntp](#sntp-query-sntp-server-ip-sntp-server-port) 107- [state](#state) 108- [srp](README_SRP.md) 109- [tcp](README_TCP.md) 110- [thread](#thread-start) 111- [trel](#trel) 112- [tvcheck](#tvcheck-enable) 113- [txpower](#txpower) 114- [udp](README_UDP.md) 115- [unsecureport](#unsecureport-add-port) 116- [uptime](#uptime) 117- [version](#version) 118 119## OpenThread Command Details 120 121### bbr 122 123Show current Primary Backbone Router information for Thread 1.2 device. 124 125```bash 126> bbr 127BBR Primary: 128server16: 0xE400 129seqno: 10 130delay: 120 secs 131timeout: 300 secs 132Done 133``` 134 135```bash 136> bbr 137BBR Primary: None 138Done 139``` 140 141### bbr mgmt dua \<status\|coap-code\> [meshLocalIid] 142 143Configure 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. 144 145Only for testing/reference device. 146 147known status value: 148 149- 0: ST_DUA_SUCCESS 150- 1: ST_DUA_REREGISTER 151- 2: ST_DUA_INVALID 152- 3: ST_DUA_DUPLICATE 153- 4: ST_DUA_NO_RESOURCES 154- 5: ST_DUA_BBR_NOT_PRIMARY 155- 6: ST_DUA_GENERAL_FAILURE 156- 160: COAP code 5.00 157 158```bash 159> bbr mgmt dua 1 2f7c235e5025a2fd 160Done 161> bbr mgmt dua 160 162Done 163``` 164 165### bbr mgmt mlr listener 166 167Show the Multicast Listeners. 168 169Only for testing/reference Backbone Router device. 170 171```bash 172> bbr mgmt mlr listener 173ff04:0:0:0:0:0:0:abcd 3534000 174ff04:0:0:0:0:0:0:eeee 3537610 175Done 176``` 177 178### bbr mgmt mlr listener add \<ipaddr\> \[\<timeout\>\] 179 180Add a Multicast Listener with a given IPv6 multicast address and timeout (in seconds). 181 182Only for testing/reference Backbone Router device. 183 184```bash 185> bbr mgmt mlr listener add ff04::1 186Done 187> bbr mgmt mlr listener add ff04::2 300 188Done 189> bbr mgmt mlr listener 190ff04:0:0:0:0:0:0:2 261 191ff04:0:0:0:0:0:0:1 3522 192Done 193``` 194 195### bbr mgmt mlr listener clear 196 197Removes all the Multicast Listeners. 198 199Only for testing/reference Backbone Router device. 200 201```bash 202> bbr mgmt mlr listener clear 203Done 204> bbr mgmt mlr listener 205Done 206``` 207 208### bbr mgmt mlr response \<status\> 209 210Configure the response status for the next MLR.req. 211 212Only for testing/reference device. 213 214Known status values: 215 216- 0: ST_MLR_SUCCESS 217- 2: ST_MLR_INVALID 218- 3: ST_MLR_NO_PERSISTENT 219- 4: ST_MLR_NO_RESOURCES 220- 5: ST_MLR_BBR_NOT_PRIMARY 221- 6: ST_MLR_GENERAL_FAILURE 222 223```bash 224> bbr mgmt mlr response 2 225Done 226``` 227 228### bbr state 229 230Show local Backbone state ([`Disabled`,`Primary`, `Secondary`]) for Thread 1.2 FTD. 231 232`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 233 234```bash 235> bbr state 236Disabled 237Done 238 239> bbr state 240Primary 241Done 242 243> bbr state 244Secondary 245Done 246``` 247 248### bbr enable 249 250Enable Backbone Router Service for Thread 1.2 FTD. `SRV_DATA.ntf` would be triggerred for attached device if there is no Backbone Router Service in Thread Network Data. 251 252`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 253 254```bash 255> bbr enable 256Done 257``` 258 259### bbr disable 260 261Disable Backbone Router Service for Thread 1.2 FTD. `SRV_DATA.ntf` would be triggerred if Backbone Router is Primary state. o `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 262 263```bash 264> bbr disable 265Done 266``` 267 268### bbr register 269 270Register Backbone Router Service for Thread 1.2 FTD. `SRV_DATA.ntf` would be triggerred for attached device. 271 272`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 273 274```bash 275> bbr register 276Done 277``` 278 279### bbr config 280 281Show local Backbone Router configuration for Thread 1.2 FTD. 282 283`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 284 285```bash 286> bbr config 287seqno: 10 288delay: 120 secs 289timeout: 300 secs 290Done 291``` 292 293### bbr config \[seqno \<seqno\>\] \[delay \<delay\>\] \[timeout \<timeout\>\] 294 295Configure 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. 296 297`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 298 299```bash 300> bbr config seqno 20 delay 30 301Done 302``` 303 304### bbr jitter 305 306Show jitter (in seconds) for Backbone Router registration for Thread 1.2 FTD. 307 308`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 309 310```bash 311> bbr jitter 31220 313Done 314``` 315 316### bbr jitter \<jitter\> 317 318Set jitter (in seconds) for Backbone Router registration for Thread 1.2 FTD. 319 320`OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is required. 321 322```bash 323> bbr jitter 10 324Done 325``` 326 327### ba 328 329Show current Border Agent information. 330 331### ba port 332 333Print border agent service port. 334 335```bash 336> ba port 33749152 338Done 339``` 340 341### ba state 342 343Print border agent state. 344 345```bash 346> ba state 347Started 348Done 349``` 350 351### br 352 353Enbale/disable the Border Routing functionality. 354 355```bash 356> br enable 357Done 358``` 359 360```bash 361> br disable 362Done 363``` 364 365### br omrprefix 366 367Get the randomly generated off-mesh-routable prefix of the Border Router. 368 369```bash 370> br omrprefix 371fdfc:1ff5:1512:5622::/64 372Done 373``` 374 375### br onlinkprefix 376 377Get the randomly generated on-link prefix of the Border Router. 378 379```bash 380> br onlinkprefix 381fd41:2650:a6f5:0::/64 382Done 383``` 384 385### br nat64prefix 386 387Get the local NAT64 prefix of the Border Router. 388 389`OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE` is required. 390 391```bash 392> br nat64prefix 393fd14:1078:b3d5:b0b0:0:0::/96 394Done 395``` 396 397### br rioprf 398 399Get the preference used when advertising Route Info Options (e.g., for discovered OMR prefixes) in emitted Router Advertisement message. 400 401```bash 402> br rioprf 403med 404Done 405``` 406 407### br rioprf \<prf\> 408 409Set the preference (which may be 'high', 'med', or 'low') to use when advertising Route Info Options (e.g., for discovered OMR prefixes) in emitted Router Advertisement message. 410 411```bash 412> br rioprf low 413Done 414``` 415 416### bufferinfo 417 418Show the current message buffer information. 419 420- The `total` shows total number of message buffers in pool. 421- The `free` shows the number of free message buffers. 422- This is then followed by info about different queues used by OpenThread stack, each line representing info about a queue. 423 - The first number shows number messages in the queue. 424 - The second number shows number of buffers used by all messages in the queue. 425 - The third number shows total number of bytes of all messages in the queue. 426 427```bash 428> bufferinfo 429total: 40 430free: 40 4316lo send: 0 0 0 4326lo reas: 0 0 0 433ip6: 0 0 0 434mpl: 0 0 0 435mle: 0 0 0 436coap: 0 0 0 437coap secure: 0 0 0 438application coap: 0 0 0 439Done 440``` 441 442### ccathreshold 443 444Get the CCA threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4. 445 446```bash 447> ccathreshold 448-75 dBm 449Done 450``` 451 452### ccathreshold \<ccathreshold\> 453 454Set the CCA threshold measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4. 455 456```bash 457> ccathreshold -62 458Done 459``` 460 461### channel 462 463Get the IEEE 802.15.4 Channel value. 464 465```bash 466> channel 46711 468Done 469``` 470 471### channel \<channel\> 472 473Set the IEEE 802.15.4 Channel value. 474 475```bash 476> channel 11 477Done 478``` 479 480### channel manager 481 482Get channel manager state. 483 484`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` is required. 485 486```bash 487channel: 11 488auto: 1 489delay: 120 490interval: 10800 491supported: { 11-26} 492favored: { 11-26} 493Done 494``` 495 496### channel manager change \<channel\> 497 498Initiate a channel change with the channel manager. 499 500`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` is required. 501 502```bash 503> channel manager change 11 504channel manager change 11 505Done 506``` 507 508### channel manager select \<skip quality check (boolean)\> 509 510Request a channel selection with the channel manager. 511 512`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 513 514```bash 515> channel manager select 1 516channel manager select 1 517Done 518``` 519 520### channel manager auto \<enable (boolean)\> 521 522Enable/disable the auto-channel-selection functionality. 523 524`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 525 526```bash 527> channel manager auto 1 528channel manager auto 1 529Done 530``` 531 532### channel manager delay \<delay\> 533 534Set the channel change delay (in seconds). 535 536`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 537 538```bash 539> channel manager delay 120 540channel manager delay 120 541Done 542``` 543 544### channel manager interval \<interval\> 545 546Set the auto-channel-selection interval (in seconds). 547 548`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 549 550```bash 551> channel manager interval 10800 552channel manager interval 10800 553Done 554``` 555 556### channel manager supported \<mask\> 557 558Set the supported channel mask for the auto-channel-selection. 559 560`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 561 562```bash 563> channel manager supported 0x7fffc00 564channel manager supported 0x7fffc00 565Done 566``` 567 568### channel manager favored \<mask\> 569 570Set the favored channel mask for the auto-channel-selection. 571 572`OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE` and `OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` are required. 573 574```bash 575> channel manager favored 0x7fffc00 576channel manager favored 0x7fffc00 577Done 578``` 579 580### channel monitor 581 582Get current channel monitor state and channel occupancy. 583 584`OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required. 585 586```bash 587> channel monitor 588channel monitor 589enabled: 1 590interval: 41000 591threshold: -75 592window: 960 593count: 10552 594occupancies: 595ch 11 (0x0cb7) 4.96% busy 596ch 12 (0x2e2b) 18.03% busy 597ch 13 (0x2f54) 18.48% busy 598ch 14 (0x0fef) 6.22% busy 599ch 15 (0x1536) 8.28% busy 600ch 16 (0x1746) 9.09% busy 601ch 17 (0x0b8b) 4.50% busy 602ch 18 (0x60a7) 37.75% busy 603ch 19 (0x0810) 3.14% busy 604ch 20 (0x0c2a) 4.75% busy 605ch 21 (0x08dc) 3.46% busy 606ch 22 (0x101d) 6.29% busy 607ch 23 (0x0092) 0.22% busy 608ch 24 (0x0028) 0.06% busy 609ch 25 (0x0063) 0.15% busy 610ch 26 (0x058c) 2.16% busy 611 612Done 613``` 614 615### channel monitor start 616 617Start the channel monitor. 618 619`OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required. 620 621```bash 622> channel monitor start 623channel monitor start 624Done 625``` 626 627### channel monitor stop 628 629Stop the channel monitor. 630 631`OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE` is required. 632 633```bash 634> channel monitor stop 635channel monitor stop 636Done 637``` 638 639### channel preferred 640 641Get preferred channel mask. 642 643```bash 644> channel preferred 6450x7fff800 646Done 647``` 648 649### channel supported 650 651Get supported channel mask. 652 653```bash 654> channel supported 6550x7fff800 656Done 657``` 658 659### child list 660 661List attached Child IDs. 662 663```bash 664> child list 6651 2 3 6 7 8 666Done 667``` 668 669### child table 670 671Print table of attached children. 672 673```bash 674> child table 675| ID | RLOC16 | Timeout | Age | LQ In | C_VN |R|D|N|Ver|CSL|QMsgCnt| Extended MAC | 676+-----+--------+------------+------------+-------+------+-+-+-+---+---+-------+------------------+ 677| 1 | 0xc801 | 240 | 24 | 3 | 131 |1|0|0| 3| 0 | 0 | 4ecede68435358ac | 678| 2 | 0xc802 | 240 | 2 | 3 | 131 |0|0|0| 3| 1 | 0 | a672a601d2ce37d8 | 679Done 680``` 681 682### child \<id\> 683 684Print diagnostic information for an attached Thread Child. The `id` may be a Child ID or an RLOC16. 685 686```bash 687> child 1 688Child ID: 1 689Rloc: 9c01 690Ext Addr: e2b3540590b0fd87 691Mode: rn 692Net Data: 184 693Timeout: 100 694Age: 0 695Link Quality In: 3 696RSSI: -20 697Done 698``` 699 700### childip 701 702Get the list of IP addresses stored for MTD children. 703 704```bash 705> childip 7063401: fdde:ad00:beef:0:3037:3e03:8c5f:bc0c 707Done 708``` 709 710### childip max 711 712Get the maximum number of IP addresses that each MTD child may register with this device as parent. 713 714```bash 715> childip max 7164 717Done 718``` 719 720### childip max \<count\> 721 722Set 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. 723 724`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 725 726```bash 727> childip max 2 728Done 729``` 730 731### childmax 732 733Get the Thread maximum number of allowed children. 734 735```bash 736> childmax 7375 738Done 739``` 740 741### childmax \<count\> 742 743Set the Thread maximum number of allowed children. 744 745```bash 746> childmax 2 747Done 748``` 749 750### childsupervision interval 751 752Get the Child Supervision Interval value. 753 754Child supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child within the supervision interval. If there is no transmission to the child within the supervision interval, OpenThread enqueues and sends a supervision message (a data message with empty payload) to the child. This command can only be used with FTD devices. 755 756```bash 757> childsupervision interval 75830 759Done 760``` 761 762### childsupervision interval \<interval\> 763 764Set the Child Supervision Interval value. This command can only be used with FTD devices. 765 766```bash 767> childsupervision interval 30 768Done 769``` 770 771### childsupervision checktimeout 772 773Get the Child Supervision Check Timeout value. 774 775If 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). 776 777```bash 778> childsupervision checktimeout 77930 780Done 781``` 782 783### childsupervision checktimeout \<timeout\> 784 785Set the Child Supervision Check Timeout value. 786 787```bash 788> childsupervision checktimeout 30 789Done 790``` 791 792### childtimeout 793 794Get the Thread Child Timeout value. 795 796```bash 797> childtimeout 798300 799Done 800``` 801 802### childtimeout \<timeout\> 803 804Set the Thread Child Timeout value. 805 806```bash 807> childtimeout 300 808Done 809``` 810 811### contextreusedelay 812 813Get the CONTEXT_ID_REUSE_DELAY value. 814 815```bash 816> contextreusedelay 81711 818Done 819``` 820 821### contextreusedelay \<delay\> 822 823Set the CONTEXT_ID_REUSE_DELAY value. 824 825```bash 826> contextreusedelay 11 827Done 828``` 829 830### counters 831 832Get the supported counter names. 833 834```bash 835> counters 836ip 837mac 838mle 839Done 840``` 841 842### counters \<countername\> 843 844Get the counter value. 845 846```bash 847> counters mac 848TxTotal: 10 849 TxUnicast: 3 850 TxBroadcast: 7 851 TxAckRequested: 3 852 TxAcked: 3 853 TxNoAckRequested: 7 854 TxData: 10 855 TxDataPoll: 0 856 TxBeacon: 0 857 TxBeaconRequest: 0 858 TxOther: 0 859 TxRetry: 0 860 TxErrCca: 0 861 TxErrBusyChannel: 0 862RxTotal: 2 863 RxUnicast: 1 864 RxBroadcast: 1 865 RxData: 2 866 RxDataPoll: 0 867 RxBeacon: 0 868 RxBeaconRequest: 0 869 RxOther: 0 870 RxAddressFiltered: 0 871 RxDestAddrFiltered: 0 872 RxDuplicated: 0 873 RxErrNoFrame: 0 874 RxErrNoUnknownNeighbor: 0 875 RxErrInvalidSrcAddr: 0 876 RxErrSec: 0 877 RxErrFcs: 0 878 RxErrOther: 0 879Done 880> counters mle 881Role Disabled: 0 882Role Detached: 1 883Role Child: 0 884Role Router: 0 885Role Leader: 1 886Attach Attempts: 1 887Partition Id Changes: 1 888Better Partition Attach Attempts: 0 889Parent Changes: 0 890Done 891> counters ip 892TxSuccess: 10 893TxFailed: 0 894RxSuccess: 5 895RxFailed: 0 896Done 897``` 898 899### counters \<countername\> reset 900 901Reset the counter value. 902 903```bash 904> counters mac reset 905Done 906> counters mle reset 907Done 908> counters ip reset 909Done 910``` 911 912### csl 913 914Get the CSL configuration. 915 916```bash 917> csl 918Channel: 11 919Period: 1000 (in units of 10 symbols), 160ms 920Timeout: 1000s 921Done 922``` 923 924### csl channel \<channel\> 925 926Set CSL channel. 927 928```bash 929> csl channel 20 930Done 931``` 932 933### csl period \<period\> 934 935Set CSL period in units of 10 symbols. Disable CSL by setting this parameter to `0`. 936 937```bash 938> csl period 3000 939Done 940``` 941 942### csl timeout \<timeout\> 943 944Set the CSL timeout in seconds. 945 946```bash 947> csl timeout 10 948Done 949``` 950 951### networktime 952 953Get the Thread network time and the time sync parameters. 954 955```bash 956> networktime 957Network Time: 21084154us (synchronized) 958Time Sync Period: 100s 959XTAL Threshold: 300ppm 960Done 961``` 962 963### networktime \<timesyncperiod\> \<xtalthreshold\> 964 965Set time sync parameters 966 967- timesyncperiod: The time synchronization period, in seconds. 968- xtalthreshold: The XTAL accuracy threshold for a device to become Router-Capable device, in PPM. 969 970```bash 971> networktime 100 300 972Done 973``` 974 975### delaytimermin 976 977Get the minimal delay timer (in seconds). 978 979```bash 980> delaytimermin 98130 982Done 983``` 984 985### delaytimermin \<delaytimermin\> 986 987Set the minimal delay timer (in seconds). 988 989```bash 990> delaytimermin 60 991Done 992``` 993 994### discover \[channel\] 995 996Perform an MLE Discovery operation. 997 998- channel: The channel to discover on. If no channel is provided, the discovery will cover all valid channels. 999 1000```bash 1001> discover 1002| J | Network Name | Extended PAN | PAN | MAC Address | Ch | dBm | LQI | 1003+---+------------------+------------------+------+------------------+----+-----+-----+ 1004| 0 | OpenThread | dead00beef00cafe | ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 | 1005Done 1006``` 1007 1008### dns config 1009 1010Get the default query config used by DNS client. 1011 1012The config includes the server IPv6 address and port, response timeout in msec (wait time to rx response), maximum tx attempts before reporting failure, boolean flag to indicate whether the server can resolve the query recursively or not. 1013 1014```bash 1015> dns config 1016Server: [fd00:0:0:0:0:0:0:1]:1234 1017ResponseTimeout: 5000 ms 1018MaxTxAttempts: 2 1019RecursionDesired: no 1020Done 1021> 1022``` 1023 1024### dns config \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1025 1026Set the default query config. 1027 1028```bash 1029> dns config fd00::1 1234 5000 2 0 1030Done 1031 1032> dns config 1033Server: [fd00:0:0:0:0:0:0:1]:1234 1034ResponseTimeout: 5000 ms 1035MaxTxAttempts: 2 1036RecursionDesired: no 1037Done 1038``` 1039 1040We 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. 1041 1042```bash 1043> dns config fd00::2 1044Done 1045 1046> dns config 1047Server: [fd00:0:0:0:0:0:0:2]:53 1048ResponseTimeout: 3000 ms 1049MaxTxAttempts: 3 1050RecursionDesired: yes 1051Done 1052``` 1053 1054### dns resolve \<hostname\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1055 1056Send DNS Query to obtain IPv6 address for given hostname. 1057 1058The 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`). 1059 1060```bash 1061> dns resolve ipv6.google.com 1062> DNS response for ipv6.google.com - 2a00:1450:401b:801:0:0:0:200e TTL: 300 1063``` 1064 1065### dns browse \<service-name\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1066 1067Send a browse (service instance enumeration) DNS query to get the list of services for given service-name. 1068 1069The 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`). 1070 1071```bash 1072> dns browse _service._udp.example.com 1073DNS browse response for _service._udp.example.com. 1074inst1 1075 Port:1234, Priority:1, Weight:2, TTL:7200 1076 Host:host.example.com. 1077 HostAddress:fd00:0:0:0:0:0:0:abcd TTL:7200 1078 TXT:[a=6531, b=6c12] TTL:7300 1079instance2 1080 Port:1234, Priority:1, Weight:2, TTL:7200 1081 Host:host.example.com. 1082 HostAddress:fd00:0:0:0:0:0:0:abcd TTL:7200 1083 TXT:[a=1234] TTL:7300 1084Done 1085``` 1086 1087### dns service \<service-instance-label\> \<service-name\> \[DNS server IP\] \[DNS server port\] \[response timeout (ms)\] \[max tx attempts\] \[recursion desired (boolean)\] 1088 1089Send 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). 1090 1091The 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`). 1092 1093### dns compression \[enable|disable\] 1094 1095Enable/Disable the "DNS name compression" mode. 1096 1097By 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. 1098 1099This is intended for testing only and available under `REFERENCE_DEVICE` config. 1100 1101Get the current "DNS name compression" mode. 1102 1103``` 1104> dns compression 1105Enabled 1106``` 1107 1108Set the "DNS name compression" mode. 1109 1110``` 1111> dns compression disable 1112Done 1113> 1114> 1115> dns compression 1116Disabled 1117Done 1118``` 1119 1120### domainname 1121 1122Get the Thread Domain Name for Thread 1.2 device. 1123 1124```bash 1125> domainname 1126Thread 1127Done 1128``` 1129 1130### domainname \<name\> 1131 1132Set the Thread Domain Name for Thread 1.2 device. 1133 1134```bash 1135> domainname Test\ Thread 1136Done 1137``` 1138 1139### dua iid 1140 1141Get the Interface Identifier mannually specified for Thread Domain Unicast Address on Thread 1.2 device. 1142 1143```bash 1144> dua iid 11450004000300020001 1146Done 1147``` 1148 1149### dua iid \<iid\> 1150 1151Set the Interface Identifier mannually specified for Thread Domain Unicast Address on Thread 1.2 device. 1152 1153```bash 1154> dua iid 0004000300020001 1155Done 1156``` 1157 1158### dua iid clear 1159 1160Clear the Interface Identifier mannually specified for Thread Domain Unicast Address on Thread 1.2 device. 1161 1162```bash 1163> dua iid clear 1164Done 1165``` 1166 1167### eidcache 1168 1169Print the EID-to-RLOC cache entries. 1170 1171```bash 1172> eidcache 1173fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d 2000 cache canEvict=1 transTime=0 eid=fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7d 1174fd49:caf4:a29f:dc0e:97fc:69dd:3c16:df7f fffe retry canEvict=1 timeout=10 retryDelay=30 1175Done 1176``` 1177 1178### eui64 1179 1180Get the factory-assigned IEEE EUI-64. 1181 1182```bash 1183> eui64 11840615aae900124b00 1185Done 1186``` 1187 1188### extaddr 1189 1190Get the IEEE 802.15.4 Extended Address. 1191 1192```bash 1193> extaddr 1194dead00beef00cafe 1195Done 1196``` 1197 1198### extaddr \<extaddr\> 1199 1200Set the IEEE 802.15.4 Extended Address. 1201 1202```bash 1203> extaddr dead00beef00cafe 1204dead00beef00cafe 1205Done 1206``` 1207 1208### extpanid 1209 1210Get the Thread Extended PAN ID value. 1211 1212**NOTE** The current commissioning credential becomes stale after changing this value. Use [pskc](#pskc--p-keypassphrase) to reset. 1213 1214```bash 1215> extpanid 1216dead00beef00cafe 1217Done 1218``` 1219 1220### extpanid \<extpanid\> 1221 1222Set the Thread Extended PAN ID value. 1223 1224```bash 1225> extpanid dead00beef00cafe 1226Done 1227``` 1228 1229### factoryreset 1230 1231Delete all stored settings, and signal a platform reset. 1232 1233```bash 1234> factoryreset 1235``` 1236 1237### fake 1238 1239Send fake Thread messages. 1240 1241Note: Only for certification test. 1242 1243#### fake /a/an \<dst-ipaddr\> \<target\> \<meshLocalIid\> 1244 1245```bash 1246> fake /a/an fdde:ad00:beef:0:0:ff:fe00:a800 fd00:7d03:7d03:7d03:55f2:bb6a:7a43:a03b 1111222233334444 1247Done 1248``` 1249 1250### fem 1251 1252Get external FEM parameters. 1253 1254```bash 1255> fem 1256LNA gain 11 dBm 1257Done 1258``` 1259 1260### fem lnagain 1261 1262Get the Rx LNA gain in dBm of the external FEM. 1263 1264```bash 1265> fem lnagain 126611 1267Done 1268``` 1269 1270### fem lnagain \<LNA gain\> 1271 1272Set the Rx LNA gain in dBm of the external FEM. 1273 1274```bash 1275> fem lnagain 8 1276Done 1277``` 1278 1279### ifconfig 1280 1281Show the status of the IPv6 interface. 1282 1283```bash 1284> ifconfig 1285down 1286Done 1287``` 1288 1289### ifconfig up 1290 1291Bring up the IPv6 interface. 1292 1293```bash 1294> ifconfig up 1295Done 1296``` 1297 1298### ifconfig down 1299 1300Bring down the IPv6 interface. 1301 1302```bash 1303> ifconfig down 1304Done 1305``` 1306 1307### ipaddr 1308 1309List all IPv6 addresses assigned to the Thread interface. 1310 1311```bash 1312> ipaddr 1313fdde:ad00:beef:0:0:ff:fe00:0 1314fdde:ad00:beef:0:558:f56b:d688:799 1315fe80:0:0:0:f3d9:2a82:c8d8:fe43 1316Done 1317``` 1318 1319Use `-v` to get more verbose informations about the address. 1320 1321```bash 1322> ipaddr -v 1323fdde:ad00:beef:0:0:ff:fe00:0 origin:thread 1324fdde:ad00:beef:0:558:f56b:d688:799 origin:thread 1325fe80:0:0:0:f3d9:2a82:c8d8:fe43 origin:thread 1326Done 1327``` 1328 1329### ipaddr add \<ipaddr\> 1330 1331Add an IPv6 address to the Thread interface. 1332 1333```bash 1334> ipaddr add 2001::dead:beef:cafe 1335Done 1336``` 1337 1338### ipaddr del \<ipaddr\> 1339 1340Delete an IPv6 address from the Thread interface. 1341 1342```bash 1343> ipaddr del 2001::dead:beef:cafe 1344Done 1345``` 1346 1347### ipaddr linklocal 1348 1349Print Thread link-local IPv6 address. 1350 1351```bash 1352> ipaddr linklocal 1353fe80:0:0:0:f3d9:2a82:c8d8:fe43 1354Done 1355``` 1356 1357### ipaddr mleid 1358 1359Print Thread Mesh Local EID address. 1360 1361```bash 1362> ipaddr mleid 1363fdde:ad00:beef:0:558:f56b:d688:799 1364Done 1365``` 1366 1367### ipaddr rloc 1368 1369Print Thread Routing Locator (RLOC) address. 1370 1371```bash 1372> ipaddr rloc 1373fdde:ad00:beef:0:0:ff:fe00:0 1374Done 1375``` 1376 1377### ipmaddr 1378 1379List all IPv6 multicast addresses subscribed to the Thread interface. 1380 1381```bash 1382> ipmaddr 1383ff05:0:0:0:0:0:0:1 1384ff33:40:fdde:ad00:beef:0:0:1 1385ff32:40:fdde:ad00:beef:0:0:1 1386Done 1387``` 1388 1389### ipmaddr add \<ipaddr\> 1390 1391Subscribe the Thread interface to the IPv6 multicast address. 1392 1393```bash 1394> ipmaddr add ff05::1 1395Done 1396``` 1397 1398### ipmaddr del \<ipaddr\> 1399 1400Unsubscribe the Thread interface to the IPv6 multicast address. 1401 1402```bash 1403> ipmaddr del ff05::1 1404Done 1405``` 1406 1407### ipmaddr llatn 1408 1409Get the Link-Local All Thread Nodes multicast address. 1410 1411``` 1412> ipmaddr llatn 1413ff32:40:fdde:ad00:beef:0:0:1 1414Done 1415``` 1416 1417### ipmaddr promiscuous 1418 1419Get multicast promiscuous mode. 1420 1421```bash 1422> ipmaddr promiscuous 1423Disabled 1424Done 1425``` 1426 1427### ipmaddr promiscuous enable 1428 1429Enable multicast promiscuous mode. 1430 1431```bash 1432> ipmaddr promiscuous enable 1433Done 1434``` 1435 1436### ipmaddr promiscuous disable 1437 1438Disable multicast promiscuous mode. 1439 1440```bash 1441> ipmaddr promiscuous disable 1442Done 1443``` 1444 1445### ipmaddr rlatn 1446 1447Get the Realm-Local All Thread Nodes multicast address. 1448 1449``` 1450> ipmaddr rlatn 1451ff33:40:fdde:ad00:beef:0:0:1 1452Done 1453``` 1454 1455### joinerport \<port\> 1456 1457Set the Joiner port. 1458 1459```bash 1460> joinerport 1000 1461Done 1462``` 1463 1464### keysequence counter 1465 1466Get the Thread Key Sequence Counter. 1467 1468```bash 1469> keysequence counter 147010 1471Done 1472``` 1473 1474### keysequence counter \<counter\> 1475 1476Set the Thread Key Sequence Counter. 1477 1478```bash 1479> keysequence counter 10 1480Done 1481``` 1482 1483### keysequence guardtime 1484 1485Get Thread Key Switch Guard Time (in hours) 1486 1487```bash 1488> keysequence guardtime 14890 1490Done 1491``` 1492 1493### keysequence guardtime \<guardtime\> 1494 1495Set Thread Key Switch Guard Time (in hours) 0 means Thread Key Switch imediately if key index match 1496 1497```bash 1498> keysequence guardtime 0 1499Done 1500``` 1501 1502### leaderdata 1503 1504Show the Thread Leader Data. 1505 1506```bash 1507> leaderdata 1508Partition ID: 1077744240 1509Weighting: 64 1510Data Version: 109 1511Stable Data Version: 211 1512Leader Router ID: 60 1513Done 1514``` 1515 1516### leaderweight 1517 1518Get the Thread Leader Weight. 1519 1520```bash 1521> leaderweight 1522128 1523Done 1524``` 1525 1526### leaderweight \<weight\> 1527 1528Set the Thread Leader Weight. 1529 1530```bash 1531> leaderweight 128 1532Done 1533``` 1534 1535### linkmetrics mgmt \<ipaddr\> enhanced-ack clear 1536 1537Send a Link Metrics Management Request to clear an Enhanced-ACK Based Probing. 1538 1539- ipaddr: Peer address (SHOULD be link local address of the neighboring device). 1540 1541```bash 1542> linkmetrics mgmt fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack clear 1543Done 1544> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1545Status: Success 1546``` 1547 1548### linkmetrics mgmt \<ipaddr\> enhanced-ack register [qmr][r] 1549 1550Send a Link Metrics Management Request to register an Enhanced-ACK Based Probing. 1551 1552- ipaddr: Peer address. 1553- qmr: This specifies what metrics to query. At most two options are allowed to select (per spec 4.11.3.4.4.6). 1554 - q: Layer 2 LQI. 1555 - m: Link Margin. 1556 - r: RSSI. 1557- 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. 1558 1559```bash 1560> linkmetrics mgmt fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm 1561Done 1562> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1563Status: Success 1564 1565> linkmetrics mgmt fe80:0:0:0:3092:f334:1455:1ad2 enhanced-ack register qm r 1566Done 1567> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1568Status: Cannot support new series 1569``` 1570 1571### linkmetrics mgmt \<ipaddr\> forward \<seriesid\> [ldraX][pqmr] 1572 1573Send a Link Metrics Management Request to configure a Forward Tracking Series. 1574 1575- ipaddr: Peer address. 1576- seriesid: The Series ID. 1577- ldraX: This specifies which frames are to be accounted. 1578 - l: MLE Link Probe. 1579 - d: MAC Data. 1580 - r: MAC Data Request. 1581 - a: MAC Ack. 1582 - 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. 1583- pqmr: This specifies what metrics to query. 1584 - p: Layer 2 Number of PDUs received. 1585 - q: Layer 2 LQI. 1586 - m: Link Margin. 1587 - r: RSSI. 1588 1589```bash 1590> linkmetrics mgmt fe80:0:0:0:3092:f334:1455:1ad2 forward 1 dra pqmr 1591Done 1592> Received Link Metrics Management Response from: fe80:0:0:0:3092:f334:1455:1ad2 1593Status: SUCCESS 1594``` 1595 1596### linkmetrics probe \<ipaddr\> \<seriesid\> \<length\> 1597 1598Send a MLE Link Probe message to the peer. 1599 1600- ipaddr: Peer address. 1601- seriesid: The Series ID for which this Probe message targets at. 1602- length: The length of the Probe message, valid range: [0, 64]. 1603 1604```bash 1605> linkmetrics probe fe80:0:0:0:3092:f334:1455:1ad2 1 10 1606Done 1607``` 1608 1609### linkmetrics query \<ipaddr\> single [pqmr] 1610 1611Perform a Link Metrics query (Single Probe). 1612 1613- ipaddr: Peer address. 1614- pqmr: This specifies what metrics to query. 1615- p: Layer 2 Number of PDUs received. 1616- q: Layer 2 LQI. 1617- m: Link Margin. 1618- r: RSSI. 1619 1620```bash 1621> linkmetrics query fe80:0:0:0:3092:f334:1455:1ad2 single qmr 1622Done 1623> Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2 1624 1625 - LQI: 76 (Exponential Moving Average) 1626 - Margin: 82 (dB) (Exponential Moving Average) 1627 - RSSI: -18 (dBm) (Exponential Moving Average) 1628``` 1629 1630### linkmetrics query \<ipaddr\> forward \<seriesid\> 1631 1632Perform a Link Metrics query (Forward Tracking Series). 1633 1634- ipaddr: Peer address. 1635- seriesid: The Series ID. 1636 1637```bash 1638> linkmetrics query fe80:0:0:0:3092:f334:1455:1ad2 forward 1 1639Done 1640> Received Link Metrics Report from: fe80:0:0:0:3092:f334:1455:1ad2 1641 1642 - PDU Counter: 2 (Count/Summation) 1643 - LQI: 76 (Exponential Moving Average) 1644 - Margin: 82 (dB) (Exponential Moving Average) 1645 - RSSI: -18 (dBm) (Exponential Moving Average) 1646``` 1647 1648### locate 1649 1650Gets the current state (`In Progress` or `Idle`) of anycast locator. 1651 1652`OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is required. 1653 1654```bash 1655> locate 1656Idle 1657Done 1658 1659> locate fdde:ad00:beef:0:0:ff:fe00:fc10 1660 1661> locate 1662In Progress 1663Done 1664``` 1665 1666### locate \<anycastaddr\> 1667 1668Locate the closest destination of an anycast address (i.e., find the destination's mesh local EID and RLOC16). 1669 1670`OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is required. 1671 1672The closest destination is determined based on the the current routing table and path costs within the Thread mesh. 1673 1674Locate the leader using its anycast address: 1675 1676```bash 1677> locate fdde:ad00:beef:0:0:ff:fe00:fc00 1678fdde:ad00:beef:0:d9d3:9000:16b:d03b 0xc800 1679Done 1680``` 1681 1682Locate the closest destination of a service anycast address: 1683 1684```bash 1685 1686> srp server enable 1687Done 1688 1689> netdata show 1690Prefixes: 1691Routes: 1692Services: 169344970 5d c002 s c800 169444970 5d c002 s cc00 1695Done 1696 1697> locate fdde:ad00:beef:0:0:ff:fe00:fc10 1698fdde:ad00:beef:0:a477:dc98:a4e4:71ea 0xcc00 1699done 1700``` 1701 1702### log filename \<filename\> 1703 1704- Note: Simulation Only, ie: `OPENTHREAD_EXAMPLES_SIMULATION` 1705- Requires `OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART` 1706 1707Specifies filename to capture otPlatLog() messages, useful when debugging automated test scripts on Linux when logging disrupts the automated test scripts. 1708 1709### log level 1710 1711Get the log level. 1712 1713```bash 1714> log level 17151 1716Done 1717``` 1718 1719### log level \<level\> 1720 1721Set the log level. 1722 1723```bash 1724> log level 4 1725Done 1726``` 1727 1728### mliid \<iid\> 1729 1730Set the Mesh Local IID. 1731 1732It must be used before Thread stack is enabled. 1733 1734Only for testing/reference device. 1735 1736```bash 1737> mliid 1122334455667788 1738Done 1739``` 1740 1741### mlr reg \<ipaddr\> ... [timeout] 1742 1743Register Multicast Listeners to Primary Backbone Router, with an optional `timeout` (in seconds). 1744 1745Omit `timeout` to use the default MLR timeout on the Primary Backbone Router. 1746 1747Use `timeout = 0` to deregister Multicast Listeners. 1748 1749NOTE: Only for Thread 1.2 Commissioner FTD device. 1750 1751```bash 1752> mlr reg ff04::1 1753status 0, 0 failed 1754Done 1755> mlr reg ff04::1 ff04::2 ff02::1 1756status 2, 1 failed 1757ff02:0:0:0:0:0:0:1 1758Done 1759> mlr reg ff04::1 ff04::2 1000 1760status 0, 0 failed 1761Done 1762> mlr reg ff04::1 ff04::2 0 1763status 0, 0 failed 1764Done 1765``` 1766 1767### mode 1768 1769Get the Thread Device Mode value. 1770 1771- -: no flags set (rx-off-when-idle, minimal Thread device, stable network data) 1772- r: rx-on-when-idle 1773- d: Full Thread Device 1774- n: Full Network Data 1775 1776```bash 1777> mode 1778rdn 1779Done 1780``` 1781 1782### mode [rdn] 1783 1784Set the Thread Device Mode value. 1785 1786- -: no flags set (rx-off-when-idle, minimal Thread device, stable network data) 1787- r: rx-on-when-idle 1788- d: Full Thread Device 1789- n: Full Network Data 1790 1791```bash 1792> mode rdn 1793Done 1794``` 1795 1796```bash 1797> mode - 1798Done 1799``` 1800 1801### multiradio 1802 1803Get the list of supported radio links by the device. 1804 1805This command is always available, even when only a single radio is supported by the device. 1806 1807```bash 1808> multiradio 1809[15.4, TREL] 1810Done 1811``` 1812 1813### multiradio neighbor list 1814 1815Get the list of neighbors and their supported radios and their preference. 1816 1817This command is only available when device supports more than one radio link. 1818 1819```bash 1820> multiradio neighbor list 1821ExtAddr:3a65bc38dbe4a5be, RLOC16:0xcc00, Radios:[15.4(255), TREL(255)] 1822ExtAddr:17df23452ee4a4be, RLOC16:0x1300, Radios:[15.4(255)] 1823Done 1824``` 1825 1826### multiradio neighbor \<ext address\> 1827 1828Get the radio info for specific neighbor with a given extended address. 1829 1830This command is only available when device supports more than one radio link. 1831 1832```bash 1833> multiradio neighbor 3a65bc38dbe4a5be 1834[15.4(255), TREL(255)] 1835Done 1836``` 1837 1838### neighbor list 1839 1840List RLOC16 of neighbors. 1841 1842```bash 1843> neighbor list 18440xcc01 0xc800 0xf000 1845Done 1846``` 1847 1848### neighbor table 1849 1850Print table of neighbors. 1851 1852```bash 1853> neighbor table 1854| Role | RLOC16 | Age | Avg RSSI | Last RSSI |R|D|N| Extended MAC | 1855+------+--------+-----+----------+-----------+-+-+-+------------------+ 1856| C | 0xcc01 | 96 | -46 | -46 |1|1|1| 1eb9ba8a6522636b | 1857| R | 0xc800 | 2 | -29 | -29 |1|1|1| 9a91556102c39ddb | 1858| R | 0xf000 | 3 | -28 | -28 |1|1|1| 0ad7ed6beaa6016d | 1859Done 1860``` 1861 1862### netstat 1863 1864List all UDP sockets. 1865 1866```bash 1867> netstat 1868| Local Address | Peer Address | 1869+-------------------------------------------------+-------------------------------------------------+ 1870| [0:0:0:0:0:0:0:0]:49153 | [0:0:0:0:0:0:0:0]:0 | 1871| [0:0:0:0:0:0:0:0]:49152 | [0:0:0:0:0:0:0:0]:0 | 1872| [0:0:0:0:0:0:0:0]:61631 | [0:0:0:0:0:0:0:0]:0 | 1873| [0:0:0:0:0:0:0:0]:19788 | [0:0:0:0:0:0:0:0]:0 | 1874Done 1875``` 1876 1877### networkdiagnostic get \<addr\> \<type\> .. 1878 1879Send network diagnostic request to retrieve tlv of \<type\>s. 1880 1881If \<addr\> is unicast address, `Diagnostic Get` will be sent. if \<addr\> is multicast address, `Diagnostic Query` will be sent. 1882 1883```bash 1884> networkdiagnostic get fdde:ad00:beef:0:0:ff:fe00:fc00 0 1 6 1885> DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c000608640b0f674074c503 1886Ext Address: '0e336e1c41494e1c' 1887Rloc16: 0x0c00 1888Leader Data: 1889 PartitionId: 0x640b0f67 1890 Weighting: 64 1891 DataVersion: 116 1892 StableDataVersion: 197 1893 LeaderRouterId: 0x03 1894Done 1895 1896> networkdiagnostic get ff02::1 0 1 1897> DIAG_GET.rsp/ans: 00080e336e1c41494e1c01020c00 1898Ext Address: '0e336e1c41494e1c' 1899Rloc16: 0x0c00 1900Done 1901DIAG_GET.rsp/ans: 00083efcdb7e3f9eb0f201021800 1902Ext Address: '3efcdb7e3f9eb0f2' 1903Rloc16: 0x1800 1904Done 1905``` 1906 1907### networkdiagnostic reset \<addr\> \<type\> .. 1908 1909Send network diagnostic request to reset \<addr\>'s tlv of \<type\>s. Currently only `MAC Counters`(9) is supported. 1910 1911```bash 1912> diagnostic reset fd00:db8::ff:fe00:0 9 1913Done 1914``` 1915 1916### networkidtimeout 1917 1918Get the NETWORK_ID_TIMEOUT parameter used in the Router role. 1919 1920```bash 1921> networkidtimeout 1922120 1923Done 1924``` 1925 1926### networkidtimeout \<timeout\> 1927 1928Set the NETWORK_ID_TIMEOUT parameter used in the Router role. 1929 1930```bash 1931> networkidtimeout 120 1932Done 1933``` 1934 1935### networkkey 1936 1937Get the Thread Network Key value. 1938 1939```bash 1940> networkkey 194100112233445566778899aabbccddeeff 1942Done 1943``` 1944 1945### networkkey \<key\> 1946 1947Set the Thread Network Key value. 1948 1949```bash 1950> networkkey 00112233445566778899aabbccddeeff 1951Done 1952``` 1953 1954### networkname 1955 1956Get the Thread Network Name. 1957 1958```bash 1959> networkname 1960OpenThread 1961Done 1962``` 1963 1964### networkname \<name\> 1965 1966Set the Thread Network Name. 1967 1968**NOTE** The current commissioning credential becomes stale after changing this value. Use [pskc](#pskc--p-keypassphrase) to reset. 1969 1970```bash 1971> networkname OpenThread 1972Done 1973``` 1974 1975### panid 1976 1977Get the IEEE 802.15.4 PAN ID value. 1978 1979```bash 1980> panid 19810xdead 1982Done 1983``` 1984 1985### panid \<panid\> 1986 1987Set the IEEE 802.15.4 PAN ID value. 1988 1989```bash 1990> panid 0xdead 1991Done 1992``` 1993 1994### parent 1995 1996Get the diagnostic information for a Thread Router as parent. 1997 1998Note: When operating as a Thread Router, 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. 1999 2000```bash 2001> parent 2002Ext Addr: be1857c6c21dce55 2003Rloc: 5c00 2004Link Quality In: 3 2005Link Quality Out: 3 2006Age: 20 2007Done 2008``` 2009 2010### parentpriority 2011 2012Get the assigned parent priority value, -2 means not assigned. 2013 2014```bash 2015> parentpriority 20161 2017Done 2018``` 2019 2020### parentpriority \<parentpriority\> 2021 2022Set the assigned parent priority value: 1, 0, -1 or -2. 2023 2024```bash 2025> parentpriority 1 2026Done 2027``` 2028 2029### partitionid 2030 2031Get the Thread Network Partition ID. 2032 2033```bash 2034> partitionid 20354294967295 2036Done 2037``` 2038 2039### partitionid preferred 2040 2041Get the preferred Thread Leader Partition ID. 2042 2043`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 2044 2045```bash 2046> partitionid preferred 20474294967295 2048Done 2049``` 2050 2051### partitionid preferred \<partitionid\> 2052 2053Set the preferred Thread Leader Partition ID. 2054 2055`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 2056 2057```bash 2058> partitionid preferred 0xffffffff 2059Done 2060``` 2061 2062### ping \[-I source\] \<ipaddr\> \[size\] \[count\] \[interval\] \[hoplimit\] \[timeout\] 2063 2064Send an ICMPv6 Echo Request. 2065 2066- source: The source IPv6 address of the echo request. 2067- size: The number of data bytes to be sent. 2068- count: The number of ICMPv6 Echo Requests to be sent. 2069- interval: The interval between two consecutive ICMPv6 Echo Requests in seconds. The value may have fractional form, for example `0.5`. 2070- hoplimit: The hoplimit of ICMPv6 Echo Request to be sent. 2071- 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`. 2072 2073```bash 2074> ping fd00:db8:0:0:76b:6a05:3ae9:a61a 2075> 16 bytes from fd00:db8:0:0:76b:6a05:3ae9:a61a: icmp_seq=5 hlim=64 time=0ms 20761 packets transmitted, 1 packets received. Packet loss = 0.0%. Round-trip min/avg/max = 0/0.0/0 ms. 2077Done 2078 2079> ping -I fd00:db8:0:0:76b:6a05:3ae9:a61a ff02::1 100 1 1 1 2080> 108 bytes from fd00:db8:0:0:f605:fb4b:d429:d59a: icmp_seq=4 hlim=64 time=7ms 20811 packets transmitted, 1 packets received. Round-trip min/avg/max = 7/7.0/7 ms. 2082Done 2083``` 2084 2085### ping stop 2086 2087Stop sending ICMPv6 Echo Requests. 2088 2089```bash 2090> ping stop 2091Done 2092``` 2093 2094### pollperiod 2095 2096Get the customized data poll period of sleepy end device (milliseconds). Only for certification test 2097 2098```bash 2099> pollperiod 21000 2101Done 2102``` 2103 2104### pollperiod \<pollperiod\> 2105 2106Set the customized data poll period for sleepy end device (milliseconds >= 10ms). Only for certification test 2107 2108```bash 2109> pollperiod 10 2110Done 2111``` 2112 2113### pskc [-p] \<key\>|\<passphrase\> 2114 2115With `-p` generate pskc from \<passphrase\> (UTF-8 encoded) together with **current** network name and extended PAN ID, otherwise set pskc as \<key\> (hex format). 2116 2117```bash 2118> pskc 67c0c203aa0b042bfb5381c47aef4d9e 2119Done 2120> pskc -p 123456 2121Done 2122``` 2123 2124### preferrouterid \<routerid\> 2125 2126Prefer a Router ID when solicit router id from Leader. 2127 2128```bash 2129> preferrouterid 16 2130Done 2131``` 2132 2133### prefix 2134 2135Get 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 preceeding `-` if backbone functionality is disabled. 2136 2137```bash 2138> prefix 21392001:dead:beef:cafe::/64 paros med 2140- fd00:7d03:7d03:7d03::/64 prosD med 2141Done 2142``` 2143 2144### prefix add \<prefix\> [padcrosnD][prf] 2145 2146Add a valid prefix to the Network Data. 2147 2148Note: The Domain Prefix flag (`D`) is only available for Thread 1.2. 2149 2150- p: Preferred flag 2151- a: Stateless IPv6 Address Autoconfiguration flag 2152- d: DHCPv6 IPv6 Address Configuration flag 2153- c: DHCPv6 Other Configuration flag 2154- r: Default Route flag 2155- o: On Mesh flag 2156- s: Stable flag 2157- n: Nd Dns flag 2158- D: Domain Prefix flag 2159- prf: Default router preference, which may be 'high', 'med', or 'low'. 2160 2161```bash 2162> prefix add 2001:dead:beef:cafe::/64 paros med 2163Done 2164 2165> prefix add fd00:7d03:7d03:7d03::/64 prosD med 2166Done 2167``` 2168 2169### prefix meshlocal 2170 2171Get the mesh local prefix. 2172 2173```bash 2174> prefix meshlocal 2175fdde:ad00:beef:0::/64 2176Done 2177``` 2178 2179### prefix meshlocal <prefix> 2180 2181Set the mesh local prefix. 2182 2183```bash 2184> prefix meshlocal fdde:ad00:beef:0::/64 2185Done 2186``` 2187 2188### prefix remove \<prefix\> 2189 2190Invalidate a prefix in the Network Data. 2191 2192```bash 2193> prefix remove 2001:dead:beef:cafe::/64 2194Done 2195``` 2196 2197### promiscuous 2198 2199Get radio promiscuous property. 2200 2201```bash 2202> promiscuous 2203Disabled 2204Done 2205``` 2206 2207### promiscuous enable 2208 2209Enable radio promiscuous operation and print raw packet content. 2210 2211```bash 2212> promiscuous enable 2213Done 2214``` 2215 2216### promiscuous disable 2217 2218Disable radio promiscuous operation. 2219 2220```bash 2221> promiscuous disable 2222Done 2223``` 2224 2225### radiofilter 2226 2227`OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` is required. 2228 2229The radio filter is mainly intended for testing. It can be used to temporarily block all tx/rx on the IEEE 802.15.4 radio. 2230 2231When 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). 2232 2233Get radio filter status (enabled or disabled). 2234 2235```bash 2236> radiofilter 2237Disabled 2238Done 2239``` 2240 2241### radiofilter enable 2242 2243`OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` is required. 2244 2245Enable radio radio filter. 2246 2247```bash 2248> radiofilter enable 2249Done 2250``` 2251 2252### radiofilter disable 2253 2254`OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` is required. 2255 2256Disable radio radio filter. 2257 2258```bash 2259> radiofilter disable 2260Done 2261``` 2262 2263### rcp 2264 2265RCP-related commands. 2266 2267### region 2268 2269Set the radio region, this can affect the transmit power limit. 2270 2271```bash 2272> region US 2273Done 2274> region 2275US 2276Done 2277``` 2278 2279### rcp version 2280 2281Print RCP version string. 2282 2283```bash 2284> rcp version 2285OPENTHREAD/20191113-00825-g82053cc9d-dirty; SIMULATION; Jun 4 2020 17:53:16 2286Done 2287``` 2288 2289### releaserouterid \<routerid\> 2290 2291Release a Router ID that has been allocated by the device in the Leader role. 2292 2293```bash 2294> releaserouterid 16 2295Done 2296``` 2297 2298### reset 2299 2300Signal a platform reset. 2301 2302```bash 2303> reset 2304``` 2305 2306### rloc16 2307 2308Get the Thread RLOC16 value. 2309 2310```bash 2311> rloc16 23120xdead 2313Done 2314``` 2315 2316### route 2317 2318Get the external route list in the local Network Data. 2319 2320```bash 2321> route 23222001:dead:beef:cafe::/64 s med 2323Done 2324``` 2325 2326### route add \<prefix\> [sn][prf] 2327 2328Add a valid external route to the Network Data. 2329 2330- s: Stable flag 2331- n: NAT64 flag 2332- prf: Default Router Preference, which may be: 'high', 'med', or 'low'. 2333 2334```bash 2335> route add 2001:dead:beef:cafe::/64 s med 2336Done 2337``` 2338 2339### route remove \<prefix\> 2340 2341Invalidate a external route in the Network Data. 2342 2343```bash 2344> route remove 2001:dead:beef:cafe::/64 2345Done 2346``` 2347 2348### router list 2349 2350List allocated Router IDs. 2351 2352```bash 2353> router list 23548 24 50 2355Done 2356``` 2357 2358### router table 2359 2360Print table of routers. 2361 2362```bash 2363> router table 2364| ID | RLOC16 | Next Hop | Path Cost | LQ In | LQ Out | Age | Extended MAC | Link | 2365+----+--------+----------+-----------+-------+--------+-----+------------------+------+ 2366| 22 | 0x5800 | 63 | 0 | 0 | 0 | 0 | 0aeb8196c9f61658 | 0 | 2367| 49 | 0xc400 | 63 | 0 | 3 | 3 | 0 | faa1c03908e2dbf2 | 1 | 2368Done 2369``` 2370 2371### router \<id\> 2372 2373Print diagnostic information for a Thread Router. The `id` may be a Router ID or an RLOC16. 2374 2375```bash 2376> router 50 2377Alloc: 1 2378Router ID: 50 2379Rloc: c800 2380Next Hop: c800 2381Link: 1 2382Ext Addr: e2b3540590b0fd87 2383Cost: 0 2384Link Quality In: 3 2385Link Quality Out: 3 2386Age: 3 2387Done 2388``` 2389 2390```bash 2391> router 0xc800 2392Alloc: 1 2393Router ID: 50 2394Rloc: c800 2395Next Hop: c800 2396Link: 1 2397Ext Addr: e2b3540590b0fd87 2398Cost: 0 2399Link Quality In: 3 2400Link Quality Out: 3 2401Age: 7 2402Done 2403``` 2404 2405### routerdowngradethreshold 2406 2407Get the ROUTER_DOWNGRADE_THRESHOLD value. 2408 2409```bash 2410> routerdowngradethreshold 241123 2412Done 2413``` 2414 2415### routerdowngradethreshold \<threshold\> 2416 2417Set the ROUTER_DOWNGRADE_THRESHOLD value. 2418 2419```bash 2420> routerdowngradethreshold 23 2421Done 2422``` 2423 2424### routereligible 2425 2426Indicates whether the router role is enabled or disabled. 2427 2428```bash 2429> routereligible 2430Enabled 2431Done 2432``` 2433 2434### routereligible enable 2435 2436Enable the router role. 2437 2438```bash 2439> routereligible enable 2440Done 2441``` 2442 2443### routereligible disable 2444 2445Disable the router role. 2446 2447```bash 2448> routereligible disable 2449Done 2450``` 2451 2452### routerselectionjitter 2453 2454Get the ROUTER_SELECTION_JITTER value. 2455 2456```bash 2457> routerselectionjitter 2458120 2459Done 2460``` 2461 2462### routerselectionjitter \<jitter\> 2463 2464Set the ROUTER_SELECTION_JITTER value. 2465 2466```bash 2467> routerselectionjitter 120 2468Done 2469``` 2470 2471### routerupgradethreshold 2472 2473Get the ROUTER_UPGRADE_THRESHOLD value. 2474 2475```bash 2476> routerupgradethreshold 247716 2478Done 2479``` 2480 2481### routerupgradethreshold \<threshold\> 2482 2483Set the ROUTER_UPGRADE_THRESHOLD value. 2484 2485```bash 2486> routerupgradethreshold 16 2487Done 2488``` 2489 2490### scan \[channel\] 2491 2492Perform an IEEE 802.15.4 Active Scan. 2493 2494- channel: The channel to scan on. If no channel is provided, the active scan will cover all valid channels. 2495 2496```bash 2497> scan 2498| PAN | MAC Address | Ch | dBm | LQI | 2499+------+------------------+----+-----+-----+ 2500| ffff | f1d92a82c8d8fe43 | 11 | -20 | 0 | 2501Done 2502``` 2503 2504### scan energy \[duration\] \[channel\] 2505 2506Perform an IEEE 802.15.4 Energy Scan. 2507 2508- duration: The time in milliseconds to spend scanning each channel. 2509 2510```bash 2511> scan energy 10 2512| Ch | RSSI | 2513+----+------+ 2514| 11 | -59 | 2515| 12 | -62 | 2516| 13 | -67 | 2517| 14 | -61 | 2518| 15 | -87 | 2519| 16 | -86 | 2520| 17 | -86 | 2521| 18 | -52 | 2522| 19 | -58 | 2523| 20 | -82 | 2524| 21 | -76 | 2525| 22 | -82 | 2526| 23 | -74 | 2527| 24 | -81 | 2528| 25 | -88 | 2529| 26 | -71 | 2530Done 2531``` 2532 2533```bash 2534> scan energy 10 20 2535| Ch | RSSI | 2536+----+------+ 2537| 20 | -82 | 2538Done 2539``` 2540 2541### service 2542 2543Module for controlling service registration in Network Data. Each change in service registration must be sent to leader by `netdata register` command before taking effect. 2544 2545### service add \<enterpriseNumber\> \<serviceData\> \<serverData\> 2546 2547Add service to the Network Data. 2548 2549- enterpriseNumber: IANA enterprise number 2550- serviceData: hex-encoded binary service data 2551- serverData: hex-encoded binary server data 2552 2553```bash 2554> service add 44970 112233 aabbcc 2555Done 2556> netdata register 2557Done 2558``` 2559 2560### service remove \<enterpriseNumber\> \<serviceData\> 2561 2562Remove service from Network Data. 2563 2564- enterpriseNumber: IANA enterprise number 2565- serviceData: hext-encoded binary service data 2566 2567```bash 2568> service remove 44970 112233 2569Done 2570> netdata register 2571Done 2572``` 2573 2574### singleton 2575 2576Return true when there are no other nodes in the network, otherwise return false. 2577 2578```bash 2579> singleton 2580true or false 2581Done 2582``` 2583 2584### sntp query \[SNTP server IP\] \[SNTP server port\] 2585 2586Send SNTP Query to obtain current unix epoch time (from 1st January 1970). The latter two parameters have following default values: 2587 2588- NTP server IP: 2001:4860:4806:8:: (Google IPv6 NTP Server) 2589- NTP server port: 123 2590 2591```bash 2592> sntp query 2593> SNTP response - Unix time: 1540894725 (era: 0) 2594``` 2595 2596You can use NAT64 of OpenThread Border Router to reach e.g. Google IPv4 NTP Server: 2597 2598```bash 2599> sntp query 64:ff9b::d8ef:2308 2600> SNTP response - Unix time: 1540898611 (era: 0) 2601``` 2602 2603### state 2604 2605Return state of current state. 2606 2607```bash 2608> state 2609offline, disabled, detached, child, router or leader 2610Done 2611``` 2612 2613### state <state> 2614 2615Try to switch to state `detached`, `child`, `router` or `leader`. 2616 2617```bash 2618> state leader 2619Done 2620``` 2621 2622### thread start 2623 2624Enable Thread protocol operation and attach to a Thread network. 2625 2626```bash 2627> thread start 2628Done 2629``` 2630 2631### thread stop 2632 2633Disable Thread protocol operation and detach from a Thread network. 2634 2635```bash 2636> thread stop 2637Done 2638``` 2639 2640### thread version 2641 2642Get the Thread Version number. 2643 2644```bash 2645> thread version 26462 2647Done 2648``` 2649 2650### trel 2651 2652Indicate whether TREL radio operation is enabled or not. 2653 2654`OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE` is required for all `trel` sub-commands. 2655 2656```bash 2657> trel 2658Enabled 2659Done 2660``` 2661 2662### trel enable 2663 2664Enable TREL operation. 2665 2666```bash 2667> trel enable 2668Done 2669``` 2670 2671### trel disable 2672 2673Disable TREL operation. 2674 2675```bash 2676> trel disable 2677Done 2678``` 2679 2680### trel filter 2681 2682Indicate whether TREL filter mode is enabled or not 2683 2684When filter mode is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly intended for use during testing. 2685 2686```bash 2687> trel filter 2688Disabled 2689Done 2690``` 2691 2692### trel filter enable 2693 2694Enable TREL filter mode. 2695 2696```bash 2697> trel filter enable 2698Done 2699``` 2700 2701### trel filter disable 2702 2703Disable TREL filter mode. 2704 2705```bash 2706> trel filter disable 2707Done 2708``` 2709 2710### trel peers [list] 2711 2712Get the TREL peer table in table format or as a list. 2713 2714```bash 2715> trel peers 2716| No | Ext MAC Address | Ext PAN Id | IPv6 Socket Address | 2717+-----+------------------+------------------+--------------------------------------------------+ 2718| 1 | 5e5785ba3a63adb9 | f0d9c001f00d2e43 | [fe80:0:0:0:cc79:2a29:d311:1aea]:9202 | 2719| 2 | ce792a29d3111aea | dead00beef00cafe | [fe80:0:0:0:5c57:85ba:3a63:adb9]:9203 | 2720Done 2721 2722> trel peers list 2723001 ExtAddr:5e5785ba3a63adb9 ExtPanId:f0d9c001f00d2e43 SockAddr:[fe80:0:0:0:cc79:2a29:d311:1aea]:9202 2724002 ExtAddr:ce792a29d3111aea ExtPanId:dead00beef00cafe SockAddr:[fe80:0:0:0:5c57:85ba:3a63:adb9]:9203 2725>>>>>>> [trel] implement new TREL model using DNS-SD 2726Done 2727``` 2728 2729### tvcheck enable 2730 2731Enable thread version check when upgrading to router or leader. 2732 2733Note: Thread version check is enabled by default. 2734 2735`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 2736 2737```bash 2738> tvcheck enable 2739Done 2740``` 2741 2742### tvcheck disable 2743 2744Enable thread version check when upgrading to router or leader. 2745 2746Note: Thread version check is enabled by default. 2747 2748`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is required. 2749 2750```bash 2751> tvcheck disable 2752Done 2753``` 2754 2755### txpower 2756 2757Get the transmit power in dBm. 2758 2759```bash 2760> txpower 2761-10 dBm 2762Done 2763``` 2764 2765### txpower \<txpower\> 2766 2767Set the transmit power in dBm. 2768 2769```bash 2770> txpower -10 2771Done 2772``` 2773 2774### unsecureport add \<port\> 2775 2776Add a port to the allowed unsecured port list. 2777 2778```bash 2779> unsecureport add 1234 2780Done 2781``` 2782 2783### unsecureport remove \<port\> 2784 2785Remove a port from the allowed unsecured port list. 2786 2787```bash 2788> unsecureport remove 1234 2789Done 2790``` 2791 2792### unsecureport remove all 2793 2794Remove all ports from the allowed unsecured port list. 2795 2796```bash 2797> unsecureport remove all 2798Done 2799``` 2800 2801### unsecureport get 2802 2803Print all ports from the allowed unsecured port list. 2804 2805```bash 2806> unsecureport get 28071234 2808Done 2809``` 2810 2811### uptime 2812 2813This command requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. 2814 2815Print the OpenThread stack uptime (duration since OpenThread stack initialization). 2816 2817```bash 2818> uptime 281912:46:35.469 2820Done 2821> 2822``` 2823 2824### uptime ms 2825 2826This command requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. 2827 2828Print the OpenThread stack uptime in msec. 2829 2830```bash 2831> uptime ms 2832426238 2833Done 2834> 2835``` 2836 2837### version 2838 2839Print the build version information. 2840 2841```bash 2842> version 2843OPENTHREAD/gf4f2f04; Jul 1 2016 17:00:09 2844Done 2845``` 2846 2847### version api 2848 2849Print API version number. 2850 2851```bash 2852> version api 285328 2854Done 2855``` 2856 2857### mac retries direct 2858 2859Get the number of direct TX retries on the MAC layer. 2860 2861```bash 2862> mac retries direct 28633 2864Done 2865``` 2866 2867### mac retries direct \<number\> 2868 2869Set the number of direct TX retries on the MAC layer. 2870 2871```bash 2872> mac retries direct 5 2873Done 2874``` 2875 2876### mac retries indirect 2877 2878Get the number of indirect TX retries on the MAC layer. 2879 2880```bash 2881> mac retries indirect 28823 2883Done 2884``` 2885 2886### mac retries indirect \<number\> 2887 2888Set the number of indirect TX retries on the MAC layer. 2889 2890```bash 2891> mac retries indirect 5 2892Done 2893``` 2894 2895### mac send \<op\> 2896 2897Instruct 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. 2898 2899```bash 2900> mac send datarequest 2901Done 2902``` 2903 2904```bash 2905> mac send emptydata 2906Done 2907``` 2908 2909### macfilter 2910 2911List the macfilter status, including address and received signal strength filter settings. 2912 2913```bash 2914> macfilter 2915Address Mode: Allowlist 29160f6127e33af6b403 : rss -95 (lqi 1) 29170f6127e33af6b402 2918RssIn List: 29190f6127e33af6b403 : rss -95 (lqi 1) 2920Default rss : -50 (lqi 3) 2921Done 2922``` 2923 2924### macfilter addr 2925 2926List the address filter status. 2927 2928```bash 2929> macfilter addr 2930Allowlist 29310f6127e33af6b403 : rss -95 (lqi 1) 29320f6127e33af6b402 2933Done 2934``` 2935 2936### macfilter addr disable 2937 2938Disable address filter mode. 2939 2940```bash 2941> macfilter addr disable 2942Done 2943``` 2944 2945### macfilter addr allowlist 2946 2947Enable allowlist address filter mode. 2948 2949```bash 2950> macfilter addr allowlist 2951Done 2952``` 2953 2954### macfilter addr denylist 2955 2956Enable denylist address filter mode. 2957 2958```bash 2959> macfilter addr denylist 2960Done 2961``` 2962 2963### macfilter addr add \<extaddr\> \[rss\] 2964 2965Add an IEEE 802.15.4 Extended Address to the address filter, and fixed the received singal strength for the messages from the address if rss is specified. 2966 2967```bash 2968> macfilter addr add 0f6127e33af6b403 -95 2969Done 2970``` 2971 2972```bash 2973> macfilter addr add 0f6127e33af6b402 2974Done 2975``` 2976 2977### macfilter addr remove \<extaddr\> 2978 2979Remove the IEEE802.15.4 Extended Address from the address filter. 2980 2981```bash 2982> macfilter addr remove 0f6127e33af6b402 2983Done 2984``` 2985 2986### macfilter addr clear 2987 2988Clear all the IEEE802.15.4 Extended Addresses from the address filter. 2989 2990```bash 2991> macfilter addr clear 2992Done 2993``` 2994 2995### macfilter rss 2996 2997List the rss filter status 2998 2999```bash 3000> macfilter rss 30010f6127e33af6b403 : rss -95 (lqi 1) 3002Default rss: -50 (lqi 3) 3003Done 3004``` 3005 3006### macfilter rss add \<extaddr\> \<rss\> 3007 3008Set 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. 3009 3010```bash 3011> macfilter rss add * -50 3012Done 3013``` 3014 3015```bash 3016> macfilter rss add 0f6127e33af6b404 -85 3017Done 3018``` 3019 3020### macfilter rss add-lqi \<extaddr\> \<lqi\> 3021 3022Set 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 3023 3024```bash 3025> macfilter rss add-lqi * 3 3026Done 3027``` 3028 3029```bash 3030> macfilter rss add 0f6127e33af6b404 2 3031Done 3032``` 3033 3034### macfilter rss remove \<extaddr\> 3035 3036Removes 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. 3037 3038```bash 3039> macfilter rss remove * 3040Done 3041``` 3042 3043```bash 3044> macfilter rss remove 0f6127e33af6b404 3045Done 3046``` 3047 3048### macfilter rss clear 3049 3050Clear all the received signal strength or received link quality settings. 3051 3052```bash 3053> macfilter rss clear 3054Done 3055``` 3056 3057### diag 3058 3059Factory Diagnostics module is enabled only when building OpenThread with `OPENTHREAD_CONFIG_DIAG_ENABLE=1` option. Go [diagnostics module][diag] for more information. 3060 3061[diag]: ../../src/core/diags/README.md 3062