Hardware Required
• Raspberry Pi 4
• 2 x Silabs Thunderboard Sense 2 (TBS2 -- BRD4166A)
• A Ubuntu Linux development environment or a Virtual Machine used to build the Matter end device firmware.
Connections Required
• Ethernet or Wi-Fi for RasPi, Linux build machine
• Micro USB for TBS2/RasPi
• Micro USB for TBS2/Linux
Overview
Matter devices can participate in multiple ecosystems simultaneously. This feature, called multi-admin, is a much-desired feature in a smart home.
Multi-admin allows you to join the Matter device to several Matter fabrics and administer it by several different Matter administrators. First, you need to commission the Matter device to the first fabric. Before it is possible to commission a Matter device to a new fabric, the administrator from the first fabric must open the commissioning window for a new administrator from another fabric. This allows other ecosystems to commission the Matter node and make it part of their own Matter Fabric. The next step is commissioning the Matter device to the second fabric and testing.
Step 1: Prerequisites
You need to have:
• The RaspberryPi OTBR.img and RCP must_ be from SMG 0.4.0 for this tutorial
You can get the matterHub image and RCP image for RaspberryPi and BRD4166A in the link:
Matter Software Artifacts
• Lighting-app example image flashed on TBS2
To build the matter lighting example firmware for TBS2, you can refer to the link: Build and Flash the Matter Accessory Device (MAD)
Step 2: Join the device to the first fabric.
To join a MAD device to the matter network, open a console in matterHub, we will commission that device by the following command. Hold the button 0 for 6 seconds to factory reset the end device.
$ mattertool startThread
$ mattertool bleThread
Note: You can get the node-Id by using the command “$ mattertool -h”. It is “LAST_NODE_ID”
Step 3: Open the commissioning window on the paired Matter device
After the end device was commissioned to the first fabric, we need to open the commissioning window to allow the device to join the second fabric. To open the commissioning window on the paired Matter device, use the following command:
$ mattertool pairing open-commissioning-window <node_id> <option> <window_timeout> <iteration> <discriminator>
In this command:
• <node_id> is the ID of the node taken from the last step.
• <option> is equal to 1 for Enhanced Commissioning Method and 0 for Basic Commissioning Method
• <window_timeout> is the time in seconds before the commissioning window closes
• <iteration> is the number of PBKDF iterations to use to derive the PAKE verifier
• <discriminator> is the device-specific discriminator determined during commissioning
Note: The <iteration> and <discriminator> values are ignored if the <option> is set to 0.
Example of command:
$ mattertool pairing open-commissioning-window 1 1 300 1000 2365
Note: manual pairing code or QR code is printed in the output console (see picture below), as it will be required by the second Matter admin to commission the Matter device to its fabric.
Step 4: Commission the Matter device to a new fabric
To commission the Matter device to a new fabric, you need to run another instance of the CHIP Tool or mattertool (another terminal), using the following command:
$ mattertool pairing code <node_id> <payload> --commissioner-name <commissioner_name>
In this command:
• <payload> is the QR code payload or a manual pairing code generated by the first commissioner instance when opening the commissioning window
• <node_id> is the user-defined ID of the node being commissioned. It doesn't need to be the same ID, as for the first fabric.
• <commissioner_name> is the name of the second fabric. Valid values are "alpha", "beta", "gamma", and integers greater than or equal to 4. The default if not specified is "alpha".
Example of command:
$ mattertool pairing code 36281602573 1 --commissioner-name beta
$ mattertool pairing code 1 MT:6FCJ1C0R15BESZ1E510 --commissioner-name beta
$ mattertool pairing code 1 22428732963 --commissioner-name beta
Step 5: Testing the device
After completing the above steps, the Matter device should be able to receive and answer Matter commands sent by the second fabric. For example, you can use the following command to toggle the OnOff attribute state on a device supporting the OnOff cluster:
$ mattertool onoff toggle <node_id> <endpoint_id> --commissioner-name <commissioner_name>
In this command:
• <node_id> is the user-defined ID of the commissioned node.
• <endpoint_id> is the ID of the endpoint with OnOff cluster implemented.
• <commissioner_name> is the name of the second fabric. Valid values are "alpha", "beta", "gamma", and integers greater than or equal to 4. The default if not specified is "alpha".
Example of command:
TITLE Multi Fabrics/Admin - How to add the second controller to end device. URL NAME Multi-Fabrics-Admin-second-controller 芯科官网链接: https://community.silabs.com/s/article/Multi-Fabrics-Admin-second-controller?language=en_US 标签:Multi,end,fabric,Admin,Matter,second,command,mattertool,device From: https://www.cnblogs.com/z3286586/p/17879676.html$ mattertool onoff toggle 1 1 --commissioner-name beta