Grzegorz Ferenc | 4f64f50 | 2021-06-28 21:01:58 +0200 | [diff] [blame] | 1 | # Using CLI in nRF Connect examples |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 2 | |
Grzegorz Ferenc | 8a4f2f1 | 2021-08-16 15:53:49 +0200 | [diff] [blame] | 3 | Some Matter examples for the development kits from Nordic Semiconductor include |
| 4 | a command-line interface that allows access to application logs and |
| 5 | [Zephyr shell](https://docs.zephyrproject.org/1.13.0/subsystems/shell.html). |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 6 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 7 | <hr> |
| 8 | |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 9 | ## Accessing the CLI console |
| 10 | |
| 11 | To access the CLI console, use a serial terminal emulator of your choice, like |
| 12 | Minicom or GNU Screen. Use the baud rate set to `115200`. |
| 13 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 14 | ### Example: Starting the CLI console with Minicom |
| 15 | |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 16 | For example, to start using the CLI console with Minicom, run the following |
Andrei Litvin | a76f75e | 2022-04-13 08:34:42 -1000 | [diff] [blame] | 17 | command with `/dev/ttyACM0` replaced with the device node name of your |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 18 | development kit: |
| 19 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 20 | ``` |
| 21 | minicom -D /dev/ttyACM0 -b 115200 |
| 22 | ``` |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 23 | |
Łukasz Duda | 4b61b4f | 2021-03-04 21:44:51 +0100 | [diff] [blame] | 24 | When you reboot the kit, you will see the boot logs in the console, similar to |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 25 | the following messages: |
| 26 | |
| 27 | ```shell |
| 28 | uart:~$ |
| 29 | I: nRF5 802154 radio initialized |
| 30 | I: 8 Sectors of 4096 bytes |
| 31 | I: alloc wra: 0, ff0 |
| 32 | I: data wra: 0, 0 |
| 33 | *** Booting Zephyr OS build v2.4.0-ncs1 *** |
| 34 | I: Init CHIP stack |
| 35 | ... |
| 36 | ``` |
| 37 | |
| 38 | This means that the console is working correctly and you can start using shell |
| 39 | commands. For example, issuing the `kernel threads` command will print |
| 40 | information about all running threads: |
| 41 | |
| 42 | ```shell |
| 43 | uart:~$ kernel threads |
| 44 | Scheduler: 277 since last call |
| 45 | Threads: |
| 46 | 0x20006518 CHIP |
| 47 | options: 0x0, priority: -1 timeout: 536896912 |
| 48 | state: pending |
| 49 | stack size 8192, unused 7256, usage 936 / 8192 (11 %) |
| 50 | |
| 51 | 0x20004ab0 SDC RX |
| 52 | options: 0x0, priority: -10 timeout: 536890152 |
| 53 | state: pending |
| 54 | stack size 1024, unused 848, usage 176 / 1024 (17 %) |
| 55 | ... |
| 56 | ``` |
| 57 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 58 | <hr> |
| 59 | |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 60 | ## Listing all commands |
| 61 | |
| 62 | To list all available commands, use the Tab key, which is normally used for the |
| 63 | command completion feature. |
| 64 | |
| 65 | Pressing the Tab key in an empty command line prints the list of available |
| 66 | commands: |
| 67 | |
| 68 | ```shell |
| 69 | uart:~$ |
| 70 | clear date device flash |
| 71 | help history kernel nrf_clock_control |
| 72 | ot resize shell |
| 73 | ``` |
| 74 | |
| 75 | Pressing the Tab key with a command entered in the command line cycles through |
| 76 | available options for the given command. |
| 77 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 78 | <hr> |
| 79 | |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 80 | ## Using OpenThread commands |
| 81 | |
| 82 | [OpenThread commands](https://github.com/openthread/openthread/blob/master/src/cli/README.md) |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 83 | are accessible from the shell, but they must preceded by `ot`. For example: |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 84 | |
| 85 | ```shell |
Markus Becker | 228b35d | 2023-04-24 16:15:39 +0200 | [diff] [blame] | 86 | uart:~$ ot networkkey |
Damian Królik | ee937e6 | 2020-12-07 15:46:30 +0100 | [diff] [blame] | 87 | 00112233445566778899aabbccddeeff |
| 88 | Done |
| 89 | ``` |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 90 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 91 | <hr> |
| 92 | |
Grzegorz Ferenc | bae3e7d | 2021-10-19 15:49:45 +0200 | [diff] [blame] | 93 | ## Using Matter-specific commands |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 94 | |
Grzegorz Ferenc | bae3e7d | 2021-10-19 15:49:45 +0200 | [diff] [blame] | 95 | The nRF Connect examples let you use several Matter-specific CLI commands. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 96 | |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 97 | These commands are not available by default and to enable using them, set the |
| 98 | `CONFIG_CHIP_LIB_SHELL=y` Kconfig option in the `prj.conf` file of the given |
| 99 | example. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 100 | |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 101 | Every invoked command must be preceded by the `matter` prefix. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 102 | |
Grzegorz Ferenc | bae3e7d | 2021-10-19 15:49:45 +0200 | [diff] [blame] | 103 | See the following subsections for the description of each Matter-specific |
| 104 | command. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 105 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 106 | ### `device` command group |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 107 | |
| 108 | Handles a group of commands that are used to manage the device. You must use |
| 109 | this command together with one of the additional subcommands listed below. |
| 110 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 111 | #### `factoryreset` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 112 | |
| 113 | Performs device factory reset that is hardware reset preceded by erasing of the |
Grzegorz Ferenc | bae3e7d | 2021-10-19 15:49:45 +0200 | [diff] [blame] | 114 | whole Matter settings stored in a non-volatile memory. |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 115 | |
| 116 | ```shell |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 117 | uart:~$ matter device factoryreset |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 118 | Performing factory reset ... |
| 119 | ``` |
| 120 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 121 | ### `onboardingcodes` command group |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 122 | |
| 123 | Handles a group of commands that are used to view information about device |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 124 | onboarding codes. The `onboardingcodes` command takes one required parameter for |
| 125 | the rendezvous type, then an optional parameter for printing a specific type of |
| 126 | onboarding code. |
| 127 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 128 | The full format of the command is as follows: |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 129 | |
| 130 | ``` |
| 131 | onboardingcodes none|softap|ble|onnetwork [qrcode|qrcodeurl|manualpairingcode] |
| 132 | ``` |
| 133 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 134 | #### `none` subcommand |
| 135 | |
| 136 | Prints all onboarding codes. For example: |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 137 | |
| 138 | ```shell |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 139 | uart:~$ matter onboardingcodes none |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 140 | QRCode: MT:W0GU2OTB00KA0648G00 |
Hrishikesh Dhayagude | 4cdecc9 | 2022-07-19 21:55:16 +0530 | [diff] [blame] | 141 | QRCodeUrl: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AW0GU2OTB00KA0648G00 |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 142 | ManualPairingCode: 34970112332 |
| 143 | ``` |
| 144 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 145 | #### `none qrcode` subcommand |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 146 | |
| 147 | Prints the device |
| 148 | [onboarding QR code payload](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/nrfconnect_android_commissioning.md#preparing-accessory-device). |
| 149 | Takes no arguments. |
| 150 | |
| 151 | ```shell |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 152 | uart:~$ matter onboardingcodes none qrcode |
Damian Królik | 955679e | 2021-06-07 19:05:24 +0200 | [diff] [blame] | 153 | MT:W0GU2OTB00KA0648G00 |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 154 | ``` |
| 155 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 156 | #### `none qrcodeurl` subcommand |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 157 | |
| 158 | Prints the URL to view the |
| 159 | [device onboarding QR code](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/nrfconnect_android_commissioning.md#preparing-accessory-device) |
| 160 | in a web browser. Takes no arguments. |
| 161 | |
| 162 | ```shell |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 163 | uart:~$ matter onboardingcodes none qrcodeurl |
Hrishikesh Dhayagude | 4cdecc9 | 2022-07-19 21:55:16 +0530 | [diff] [blame] | 164 | https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AW0GU2OTB00KA0648G00 |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 165 | ``` |
| 166 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 167 | #### `none manualpairingcode` subcommand |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 168 | |
| 169 | Prints the pairing code for the manual onboarding of a device. Takes no |
| 170 | arguments. |
| 171 | |
| 172 | ```shell |
xBill | 912302d | 2022-01-05 00:07:15 +0900 | [diff] [blame] | 173 | uart:~$ matter onboardingcodes none manualpairingcode |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 174 | 34970112332 |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 175 | ``` |
| 176 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 177 | ### `config` command group |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 178 | |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 179 | Handles a group of commands that are used to view device configuration |
| 180 | information. You can use this command without any subcommand to print all |
| 181 | available configuration data or to add a specific subcommand. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 182 | |
| 183 | ```shell |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 184 | uart:~$ matter config |
C Freeman | 482e6fd | 2022-02-09 15:50:07 -0500 | [diff] [blame] | 185 | VendorId: 65521 (0xFFF1) |
| 186 | ProductId: 32768 (0x8000) |
Markus Becker | ec95ba7 | 2021-11-25 15:25:51 +0100 | [diff] [blame] | 187 | HardwareVersion: 1 (0x1) |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 188 | FabricId: |
| 189 | PinCode: 020202021 |
| 190 | Discriminator: f00 |
| 191 | DeviceId: |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 192 | ``` |
| 193 | |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 194 | The `config` command can also take the subcommands listed below. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 195 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 196 | #### `pincode` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 197 | |
| 198 | Prints the PIN code for device setup. Takes no arguments. |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 199 | |
| 200 | ```shell |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 201 | uart:~$ matter config pincode |
| 202 | 020202021 |
| 203 | ``` |
| 204 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 205 | #### `discriminator` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 206 | |
| 207 | Prints the device setup discriminator. Takes no arguments. |
| 208 | |
| 209 | ```shell |
| 210 | uart:~$ matter config discriminator |
| 211 | f00 |
| 212 | ``` |
| 213 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 214 | #### `vendorid` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 215 | |
| 216 | Prints the vendor ID of the device. Takes no arguments. |
| 217 | |
| 218 | ```shell |
| 219 | uart:~$ matter config vendorid |
C Freeman | 482e6fd | 2022-02-09 15:50:07 -0500 | [diff] [blame] | 220 | 65521 (0xFFFF1) |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 221 | ``` |
| 222 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 223 | #### `productid` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 224 | |
| 225 | Prints the product ID of the device. Takes no arguments. |
| 226 | |
| 227 | ```shell |
| 228 | uart:~$ matter config productid |
C Freeman | 482e6fd | 2022-02-09 15:50:07 -0500 | [diff] [blame] | 229 | 32768 (0x8000) |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 230 | ``` |
| 231 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 232 | #### `hardwarever` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 233 | |
Markus Becker | ec95ba7 | 2021-11-25 15:25:51 +0100 | [diff] [blame] | 234 | Prints the hardware version of the device. Takes no arguments. |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 235 | |
| 236 | ```shell |
Markus Becker | ec95ba7 | 2021-11-25 15:25:51 +0100 | [diff] [blame] | 237 | uart:~$ matter config hardwarever |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 238 | 1 (0x1) |
| 239 | ``` |
| 240 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 241 | #### `deviceid` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 242 | |
| 243 | Prints the device identifier. Takes no arguments. |
| 244 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 245 | #### `fabricid` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 246 | |
| 247 | Prints the fabric identifier. Takes no arguments. |
| 248 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 249 | ### `ble` command group |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 250 | |
| 251 | Handles a group of commands that are used to control the device Bluetooth LE |
| 252 | transport state. You must use this command together with one of the additional |
| 253 | subcommands listed below. |
| 254 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 255 | #### `help` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 256 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 257 | Prints help information about the `ble` command group. |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 258 | |
| 259 | ```shell |
| 260 | uart:~$ matter ble help |
| 261 | help Usage: ble <subcommand> |
| 262 | adv Enable or disable advertisement. Usage: ble adv <start|stop|state> |
| 263 | ``` |
| 264 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 265 | #### `adv start` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 266 | |
| 267 | Enables Bluetooth LE advertising. |
| 268 | |
| 269 | ```shell |
| 270 | uart:~$ matter ble adv start |
| 271 | Starting BLE advertising |
| 272 | ``` |
| 273 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 274 | #### `adv stop` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 275 | |
| 276 | Disables Bluetooth LE advertising. |
| 277 | |
| 278 | ```shell |
| 279 | uart:~$ matter ble adv stop |
| 280 | Stopping BLE advertising |
| 281 | ``` |
| 282 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 283 | #### `adv status` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 284 | |
| 285 | Prints the information about the current Bluetooth LE advertising status. |
| 286 | |
| 287 | ```shell |
| 288 | uart:~$ matter ble adv state |
| 289 | BLE advertising is disabled |
| 290 | |
| 291 | ``` |
| 292 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 293 | ### `nfc` command group |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 294 | |
| 295 | Handles a group of commands that are used to control the device NFC tag |
| 296 | emulation state. You must use this command together with one of the additional |
| 297 | subcommands listed below. |
| 298 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 299 | #### `start` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 300 | |
| 301 | Starts the NFC tag emulation. |
| 302 | |
| 303 | ```shell |
| 304 | uart:~$ matter nfc start |
| 305 | NFC tag emulation started |
| 306 | ``` |
| 307 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 308 | #### `stop` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 309 | |
| 310 | Stops the NFC tag emulation. |
| 311 | |
| 312 | ```shell |
| 313 | uart:~$ matter nfc stop |
| 314 | NFC tag emulation stopped |
| 315 | ``` |
| 316 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 317 | #### `state` subcommand |
Kamil Kasperczyk | 2f0c691 | 2021-06-25 00:33:52 +0200 | [diff] [blame] | 318 | |
| 319 | Prints the information about the NFC tag emulation status. |
| 320 | |
| 321 | ```shell |
| 322 | uart:~$ matter nfc state |
| 323 | NFC tag emulation is disabled |
Kamil Kasperczyk | 07c3947 | 2021-04-17 01:06:26 +0200 | [diff] [blame] | 324 | ``` |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 325 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 326 | ### `dns` command group |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 327 | |
| 328 | Handles a group of commands that are used to trigger performing DNS queries. You |
| 329 | must use this command together with one of the additional subcommands listed |
| 330 | below. |
| 331 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 332 | #### `browse` subcommand |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 333 | |
| 334 | Browses for DNS services of `_matterc_udp` type and prints the received |
| 335 | response. Takes no argument. |
| 336 | |
| 337 | ```shell |
| 338 | uart:~$ matter dns browse |
| 339 | Browsing ... |
| 340 | DNS browse succeeded: |
| 341 | Hostname: 0E824F0CA6DE309C |
| 342 | Vendor ID: 9050 |
| 343 | Product ID: 20043 |
| 344 | Long discriminator: 3840 |
| 345 | Device type: 0 |
| 346 | Device name: |
| 347 | Commissioning mode: 0 |
| 348 | IP addresses: |
| 349 | fd08:b65e:db8e:f9c7:2cc2:2043:1366:3b31 |
| 350 | ``` |
| 351 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 352 | #### `resolve` subcommand |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 353 | |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 354 | Resolves the specified Matter node service given by the _fabric-id_ and |
| 355 | _node-id_. |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 356 | |
| 357 | ```shell |
Grzegorz Ferenc | 1837739 | 2023-03-16 13:26:34 +0100 | [diff] [blame] | 358 | uart:~$ matter dns resolve fabric-id node-id |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 359 | Resolving ... |
| 360 | DNS resolve for 000000014A77CBB3-0000000000BC5C01 succeeded: |
| 361 | IP address: fd08:b65e:db8e:f9c7:8052:1a8e:4dd4:e1f3 |
Aron Rosenberg | f4a6b28 | 2021-07-16 14:03:30 -0700 | [diff] [blame] | 362 | Port: 5540 |
Kamil Kasperczyk | 13888a6 | 2021-07-13 11:15:30 +0200 | [diff] [blame] | 363 | ``` |