From 0e6d37c2eee2b90f53cfb455c5553458bee0acf5 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Mon, 8 May 2023 13:11:12 +0530 Subject: [PATCH] examples: Minor doc fixes and added onboarding codes in generic_switch Closes https://github.com/espressif/esp-matter/issues/372 --- docs/en/faq.rst | 19 ++++++++++++------- examples/generic_switch/README.md | 29 ++++++++++++++++++++--------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docs/en/faq.rst b/docs/en/faq.rst index 34d945f0d..391d42027 100644 --- a/docs/en/faq.rst +++ b/docs/en/faq.rst @@ -229,13 +229,12 @@ However, if you want to continue using the BLE even after the commissioning proc ``CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING``. This will ensure that the memory allocated to the BLE functionality is not released after the commissioning process, and the free RAM won't go up. -A1.10 How to generate Matter Onboarding Codes, QR Code and Manual Pairing Code ------------------------------------------------------------------------------- +A1.10 How to generate Matter Onboarding Codes (QR Code and Manual Pairing Code) +------------------------------------------------------------------------------- -When creating a factory partition using ``mfg_tool.py``, both a QR code and manual pairing code will be generated. -However, generating the entire factory partition is necessary to obtain these codes. +When creating a factory partition using ``mfg_tool.py``, both the QR code and manual pairing codes are generated. -There are two methods for generating Matter onboarding codes: +Along with that, there are two more methods for generating Matter onboarding codes: - Python script: `generate_setup_payload.py `__. @@ -249,14 +248,20 @@ There are two methods for generating Matter onboarding codes: :: + // Generate the QR Code chip-tool payload generate-qrcode --discriminator 3131 --setup-pin-code 20201111 \ --vendor-id 0xFFF1 --product-id 0x8004 \ --version 0 --commissioning-mode 0 --rendezvous 2 - // Below command generates the 11 digit code, for generating 21 digit code provide - // --vendor-id and --product-id parameters as well + // Generates the short manual pairing code (11-digit). chip-tool payload generate-manualcode --discriminator 3131 --setup-pin-code 20201111 \ --version 0 --commissioning-mode 0 + // To generate a long manual pairing code (21-digit) that includes both the vendor ID and product ID, + // --commissioning-mode parameter must be set to either 1 or 2, indicating a non-standard commissioning flow. + chip-tool payload generate-manualcode --discriminator 3131 --setup-pin-code 20201111 \ + --vendor-id 0xFFF1 --product-id 0x8004 \ + --version 0 --commissioning-mode 1 + To create a QR code image, copy the QR code text and paste it into `CHIP: QR Code `__. diff --git a/examples/generic_switch/README.md b/examples/generic_switch/README.md index 654afe75e..08560ab29 100644 --- a/examples/generic_switch/README.md +++ b/examples/generic_switch/README.md @@ -15,29 +15,40 @@ See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/de The steps below should be followed in order to access the fixed-labels. - If monitoring the device using ``idf.py monitor``,press `` Ctrl + ]`` to stop the process. - The following command must be executed to flash the mfg partition: + ``` esptool.py -p [port-name] write_flash 0x10000 mfg_binaries/20202020_3841.bin ``` + - Execute the command ``idf.py monitor`` -- Commission the device with ``discriminator: 20202020``and `` passcode: 3841`` -- Command: -``` -chip-tool pairing ble-wifi 0x7283 [ssid] [password] 20202020 3841 -``` +- Commission the device with ``discriminator: 3841``and `` passcode: 20202020`` + + ``` + chip-tool pairing ble-wifi 0x7283 [ssid] [password] 20202020 3841 + ``` + +- Alternatively, below QR Code or Manual pairing code can be used for commissioning + - Manualcode : 34970012334 + - QRCode : [MT:Y.K90CEK012Z.548G00](https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT:Y.K90CEK012Z.548G00) + - To read the fixed-labels, use chip-tool. -- Command : -``` -chip-tool fixedlabel read label-list 0x7283 1 -``` + + ``` + chip-tool fixedlabel read label-list 0x7283 1 + ``` The example command given below should be executed to write to the label-list of User Label Cluster. + ``` chip-tool userlabel write label-list '[{"label":"room", "value":"bedroom 1"}, {"label":"orientation", "value":"east"}]' 0x7283 1 ``` + To read label-list of User Label Cluster execute the command given below. + ``` chip-tool userlabel read label-list 0x7283 1 ``` + ## 2. Post Commissioning Setup This should be followed by: Commission the generic switch device