diff --git a/docs/en/faq.rst b/docs/en/faq.rst index 191395c96..391d42027 100644 --- a/docs/en/faq.rst +++ b/docs/en/faq.rst @@ -228,3 +228,40 @@ and all the memory allocated to it is recovered. Here's the link to the However, if you want to continue using the BLE even after the commissioning process, you can disable the ``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) +------------------------------------------------------------------------------- + +When creating a factory partition using ``mfg_tool.py``, both the QR code and manual pairing codes are generated. + +Along with that, there are two more methods for generating Matter onboarding codes: + +- Python script: `generate_setup_payload.py `__. + + :: + + ./generate_setup_payload.py --discriminator 3131 --passcode 20201111 \ + --vendor-id 65521 --product-id 32768 \ + --commissioning-flow 0 --discovery-cap-bitmask 2 + +- chip-tool + + :: + + // 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 + + // 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