From d8ededa4ada21149867032d96fab50c76e52ec9e Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 18 Nov 2024 16:09:41 -0800 Subject: [PATCH] Update the readme of fabric-sync app based on the latest update (#36540) * Update the readme of fabric-sync app based on the latest update * Restyled by prettier-markdown * Remove extra comma --------- Co-authored-by: Restyled.io --- examples/fabric-admin/rpc/RpcServer.cpp | 1 - examples/fabric-sync/README.md | 69 +++++++++++++++++++++---- 2 files changed, 60 insertions(+), 10 deletions(-) diff --git a/examples/fabric-admin/rpc/RpcServer.cpp b/examples/fabric-admin/rpc/RpcServer.cpp index f59a2729dbfa84..06f7d8217c68a6 100644 --- a/examples/fabric-admin/rpc/RpcServer.cpp +++ b/examples/fabric-admin/rpc/RpcServer.cpp @@ -174,7 +174,6 @@ class FabricAdmin final : public rpc::FabricAdmin, public admin::PairingDelegate if (error == CHIP_NO_ERROR) { mNodeId = DeviceManager::Instance().GetNextAvailableNodeId(); - ; // After responding with RequestCommissioningApproval to the node where the client initiated the // RequestCommissioningApproval, you need to wait for it to open a commissioning window on its bridge. diff --git a/examples/fabric-sync/README.md b/examples/fabric-sync/README.md index 0fd4735c745552..fd943e461f108c 100644 --- a/examples/fabric-sync/README.md +++ b/examples/fabric-sync/README.md @@ -80,30 +80,30 @@ defined: ## Building - ### For Linux host example: +- For Linux host example: - ``` + ```sh source scripts/activate.sh ./scripts/build/build_examples.py --target linux-x64-fabric-sync-no-ble build ``` - ### For Raspberry Pi 4 example: +- For Raspberry Pi 4 example: Pull Docker Images - ``` + ```sh docker pull ghcr.io/project-chip/chip-build-crosscompile:90 ``` Run docker - ``` + ```sh docker run -it -v ~/connectedhomeip:/var/connectedhomeip ghcr.io/project-chip/chip-build-crosscompile:90 /bin/bash ``` Build - ``` + ```sh cd /var/connectedhomeip git config --global --add safe.directory /var/connectedhomeip @@ -116,7 +116,7 @@ defined: Transfer the fabric-bridge-app binary to a Raspberry Pi - ``` + ```sh scp ./fabric-sync ubuntu@xxx.xxx.xxx.xxx:/home/ubuntu ``` @@ -126,9 +126,60 @@ defined: Follow [Building](#building) section of this document. -- Run Linux Fabric Sync Example App +- Run Linux Fabric Sync Example App on two Linux machine E1 and E2 ```sh + sudo rm -rf /tmp/chip_* cd ~/connectedhomeip/ - sudo out/debug/fabric-sync + out/debug/fabric-sync + ``` + +- Initiate the FS Setup Process from E1 to E2 + + ```sh + > app add-bridge 1 20202021 192.168.86.246 5540 + Done + > New device with Node ID: 0000000000000001 has been successfully added. + A new device has been added on Endpoint: 2. + ``` + +- Verify Reverse Commissioning of the Fabric-Bridge from E1 on E2 + + ```sh + > New device with Node ID: 0000000000000002 has been successfully added. + ``` + +- Pair Light Example to E2 + + Since Fabric-Bridge also functions as a Matter server, running it alongside + the Light Example app on the same machine would cause conflicts. Therefore, + you need to run the Matter Light Example app on a separate physical machine + from the one hosting Fabric-Sync. + + ```sh + > app add-device 3 + ``` + + After the device is successfully added, you will observe the following + message on E2 with the newly assigned Node ID: + + ```sh + > New device with Node ID: 0x3 has been successfully added. + ``` + + Additionally, you should also get notified when a new device is added to E2 + from the E1: + + ```sh + > A new device is added on Endpoint 3. + ``` + +- Synchronize Light Example to E1 + + After the Light Example is successfully paired in E2, we can start to + synchronize the light device to E1 using the new assigned dynamic endpointid + on Ecosystem 2. + + ```sh + > app sync-device ```