Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build docs for Fabric-Admin and Fabric-Bridge-App #34122

Merged
merged 3 commits into from
Jul 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -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}
53 changes: 53 additions & 0 deletions examples/fabric-admin/README.md
Original file line number Diff line number Diff line change
@@ -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
```
47 changes: 40 additions & 7 deletions examples/fabric-bridge-app/linux/README.md
Original file line number Diff line number Diff line change
@@ -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.