@@ -290,3 +290,76 @@ As the *end-device* we are going to use an Arduino Nano Matter configured as **S
290290
291291![ Silicon Labs board package] ( assets/silabs-pckg.png )
292292
293+ - Go to ** File > Examples > Matter > matter_on_off_outlet** and flash the example to the Nano Matter.
294+
295+ ![ Smart outlet example] ( assets/outlet-ex.png )
296+
297+ - Once flashed, open the serial terminal and reset the board. Take note of the ** manual pairing code** :
298+
299+ ![ End-device Matter credentials] ( assets/pair-code.png )
300+
301+ For example:
302+
303+ ``` bash
304+ 34970112332
305+ ```
306+
307+ ### Getting Thread Network Credentials
308+
309+ Connect through USB to the Nano ESP32 and run the following command from the Arduino IDE Serial Monitor:
310+
311+ ` dataset active -x ` : this command will display the active Thread network dataset as a hexadecimal string.
312+
313+ ![ Thread network dataset string] ( assets/esp32-code.png )
314+
315+ For example:
316+
317+ ``` bash
318+ 0e080000000000010000000300000f35060004001fffe00208dead00beef00cafe0708fd000db800a00000051000112233445566778899aabbccddeeff030e4f70656e5468726561642d455350010212340410104810e2315100afd6bc9215a6bfac530c0402a0f7f8
319+ ```
320+
321+ ### Matter Commissioning
322+
323+ Commissioning refers to the process of setting up and integrating a new device into the Matter network.
324+
325+ In this case, commissioning will occur via ** Bluetooth** , where the laptop or PC with CHIP Tool installed will communicate with the end device using a Bluetooth connection.
326+
327+ - Open the terminal on the system where ** CHIP Tool** is running, and execute the following command:
328+
329+ ``` bash
330+ ./out/debug/chip-tool pairing code-thread < node-id> hex:< thread-network-dataset> < end-device-pairing-code>
331+ ```
332+
333+ 1 . Replace <node-id > with the unique identifier for the device you are pairing (you can choose it freely according to your preference).
334+ 2 . Replace <thread-network-dataset > with the hexadecimal string representing the Thread network dataset.
335+ 3 . Replace <end-device-pairing-code > with the manual pairing code for the end device.
336+
337+ Here is an example using the previously gathered parameters:
338+
339+ ``` bash
340+ ./out/debug/chip-tool pairing code-thread 1 hex:0e080000000000010000000300000f35060004001fffe00208dead00beef00cafe0708fd000db800a00000051000112233445566778899aabbccddeeff030e4f70656e5468726561642d455350010212340410104810e2315100afd6bc9215a6bfac530c0402a0f7f8 34970112332
341+ ```
342+
343+ If commissioning phase works fine, on the end-device serial monitor you will get the following:
344+
345+ ![ Nano Matter commissioned] ( assets/nano-matter-term.png )
346+
347+ Now we are ready to control the Smart Outlet from the CHIP Tool system.
348+
349+ ### Final Result (Testing)
350+
351+ To control the Smart Outlet use the following command format:
352+
353+ ``` bash
354+ ./out/debug/chip-tool < cluster-name> < command> < node-id> < endpoint-id>
355+ # formatted command
356+ ./out/debug/chip-tool onoff toggle 1 0x03
357+ ```
358+
359+ - ` onoff ` : This specifies that the command pertains to the On/Off cluster, which controls the power state (on/off) of the device.
360+
361+ - ` toggle ` : This command switches the current state of the device.
362+
363+ - ` 1 ` : This is the Node ID of the device receiving the command.
364+
365+ - ` 0x03 ` : This is the endpoint ID of the device (fixed to 0x03 for Silicon Labs device).
0 commit comments