From 41439e27a66bfb27eb5b79f14065b420e9c006ca Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 27 Jun 2024 21:19:17 -0700 Subject: [PATCH 1/2] Add build doc for Fabric-Admin and Fabric-Bridge-App --- docs/examples/index.md | 9 ++++ examples/fabric-admin/README.md | 53 ++++++++++++++++++++++ examples/fabric-bridge-app/linux/README.md | 47 ++++++++++++++++--- 3 files changed, 102 insertions(+), 7 deletions(-) create mode 100644 examples/fabric-admin/README.md diff --git a/docs/examples/index.md b/docs/examples/index.md index 6e7a0b4b88ca1b..446c94f6f61f3b 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -85,6 +85,15 @@ darwin-framework-tool/README energy-management-app/**/README ``` +## Fabric Admin example + +```{toctree} +:glob: +:maxdepth: 1 + +fabric-admin/README +``` + ## Fabric Bridge example ```{toctree} diff --git a/examples/fabric-admin/README.md b/examples/fabric-admin/README.md new file mode 100644 index 00000000000000..160dbfa624ea36 --- /dev/null +++ b/examples/fabric-admin/README.md @@ -0,0 +1,53 @@ +# Matter Fabric Administrator Example + +An example application that which supports synchronization of devices between +fabrics. + +--- + +- [Building the Example Application](#building-the-example-application) + +--- + +## Building the Example Application + +For Linux host example: + +``` +./scripts/examples/gn_build_example.sh examples/fabric-admin out/debug/standalone chip_config_network_layer_ble=false 'import("//with_pw_rpc.gni")' +``` + +For Raspberry Pi 4 example: + +### Pull Docker Images + +``` +docker pull connectedhomeip/chip-build-vscode:latest +``` + +### Run docker + +``` +docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-build-vscode:latest /bin/bash +``` + +### Build + +``` +cd /var/connectedhomeip + +git config --global --add safe.directory /var/connectedhomeip +git config --global --add safe.directory /var/connectedhomeip/third_party/pigweed/repo +git config --global --add safe.directory /var/connectedhomeip/examples/common/QRCode/repo + +./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-arm64-fabric-admin-clang-rpc \ + build" +``` + +### Transfer the fabric-admin binary to a Raspberry Pi + +``` +scp ./fabric-admin ubuntu@xxx.xxx.xxx.xxx:/home/ubuntu +``` diff --git a/examples/fabric-bridge-app/linux/README.md b/examples/fabric-bridge-app/linux/README.md index 212f6963cd4577..6d830cdd987c33 100644 --- a/examples/fabric-bridge-app/linux/README.md +++ b/examples/fabric-bridge-app/linux/README.md @@ -88,12 +88,45 @@ defined: - Build the example application: - ```sh - cd ~/connectedhomeip/examples/fabric-bridge-app/linux - git submodule update --init - source third_party/connectedhomeip/scripts/activate.sh - gn gen out/debug - ninja -C out/debug + ### For Linux host example: + + ``` + ./scripts/examples/gn_build_example.sh examples/fabric-bridge-app/linux out/debug/standalone chip_config_network_layer_ble=false 'import("//with_pw_rpc.gni")' + ``` + + ### For Raspberry Pi 4 example: + + Pull Docker Images + + ``` + docker pull connectedhomeip/chip-build-vscode:latest + ``` + + Run docker + + ``` + docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-build-vscode:latest /bin/bash + ``` + + Build + + ``` + cd /var/connectedhomeip + + git config --global --add safe.directory /var/connectedhomeip + git config --global --add safe.directory /var/connectedhomeip/third_party/pigweed/repo + git config --global --add safe.directory /var/connectedhomeip/examples/common/QRCode/repo + + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-arm64-fabric-bridge-no-ble-clang-rpc \ + build" + ``` + + Transfer the fabric-bridge-app binary to a Raspberry Pi + + ``` + scp ./fabric-bridge-app ubuntu@xxx.xxx.xxx.xxx:/home/ubuntu ``` - To delete generated executable, libraries and object files use: @@ -116,4 +149,4 @@ defined: sudo out/debug/fabric-bridge-app ``` -- Test the device using ChipDeviceController on your laptop / workstation etc. +- Test the device using FabricAdmin on your laptop / workstation etc. From 070ec2b337b12dc79f7aae75f8f023361fdf2a46 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 1 Jul 2024 13:25:24 -0700 Subject: [PATCH 2/2] Update examples/fabric-admin/README.md Co-authored-by: saurabhst --- examples/fabric-admin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fabric-admin/README.md b/examples/fabric-admin/README.md index 160dbfa624ea36..da2a4d6b21684e 100644 --- a/examples/fabric-admin/README.md +++ b/examples/fabric-admin/README.md @@ -1,6 +1,6 @@ # Matter Fabric Administrator Example -An example application that which supports synchronization of devices between +An example application that supports synchronization of devices across fabrics fabrics. ---