Skip to content

Commit

Permalink
Merge branch 'master' into Use_RootEndpoint_in_CNET_1_4
Browse files Browse the repository at this point in the history
  • Loading branch information
DejinChen authored Aug 16, 2024
2 parents 6c02f96 + 3ecfb6c commit a78ff44
Show file tree
Hide file tree
Showing 213 changed files with 5,646 additions and 8,360 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/examples-cc13xx_26xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
name: Build example - TI CC13XX_26XX

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
merge_group:
workflow_dispatch:
# Temporarely disabled:
# - TI CI runs out of disk space
# - Image should be updated to an Ubuntu 24.04 or higher based one (move from :54 version)
# push:
# branches-ignore:
# - 'dependabot/**'
# pull_request:
# merge_group:

concurrency:
group:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/examples-cc32xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
name: Build example - TI CC32XX

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
merge_group:
workflow_dispatch:
# Temporarely disabled:
# - TI CI runs out of disk space
# - Image should be updated to an Ubuntu 24.04 or higher based one (move from :54 version)
# push:
# branches-ignore:
# - 'dependabot/**'
# pull_request:
# merge_group:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
Expand Down
64 changes: 54 additions & 10 deletions .github/workflows/examples-nxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
k32w:
name: K32W
k32w0:
name: K32W0

env:
BUILD_TYPE: gn_k32w
Expand All @@ -39,7 +39,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-k32w:66
image: ghcr.io/project-chip/chip-build-k32w:71
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand All @@ -66,8 +66,6 @@ jobs:
--target nxp-k32w0-freertos-contact-sensor \
--target nxp-k32w0-freertos-contact-sensor-low-power \
--target nxp-k32w0-freertos-contact-sensor-low-power-factory \
--target nxp-k32w1-freertos-lighting \
--target nxp-k32w1-freertos-contact-sensor-low-power \
build \
--copy-artifacts-to out/artifacts \
"
Expand All @@ -77,16 +75,62 @@ jobs:
nxp k32w0+release light \
out/artifacts/nxp-k32w0-freertos-lighting/chip-k32w0x-light-example.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nxp k32w1+release light \
out/artifacts/nxp-k32w1-freertos-lighting/chip-k32w1-light-example.elf \
/tmp/bloat_reports/
- name: Get contact sensor size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nxp k32w0+release contact \
out/artifacts/nxp-k32w0-freertos-contact-sensor-low-power/chip-k32w0x-contact-example.elf \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: K32W0
k32w1:
name: K32W1

env:
BUILD_TYPE: gn_k32w

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-nxp:71
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: nxp
extra-submodule-parameters: --recursive

- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}

- name: Build examples
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target nxp-k32w1-freertos-lighting \
--target nxp-k32w1-freertos-contact-sensor-low-power \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get lighting app size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nxp k32w1+release light \
out/artifacts/nxp-k32w1-freertos-lighting/chip-k32w1-light-example.elf \
/tmp/bloat_reports/
- name: Get contact sensor size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nxp k32w1+release contact \
out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \
Expand All @@ -95,7 +139,7 @@ jobs:
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: K32W
platform-name: K32W1
rw61x:
name: RW61X

Expand Down
108 changes: 73 additions & 35 deletions docs/guides/fabric_synchronization_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

- [Fabric Synchronization Guide](#fabric-synchronization-guide)
- [Fabric Sync Example Applications](#fabric-sync-example-applications)
- [Run Fabric Sync Demo on RP4](#run-fabric-sync-demo-on-rp4)
- [Bootstrap Fabric Sync Demo on Linux](#bootstrap-fabric-sync-demo-on-linux)
- [Bootstrap Fabric Sync Demo on RP4](#bootstrap-fabric-sync-demo-on-rp4)
- [Run Fabric Sync Demo](#run-fabric-sync-demo)

## Fabric Sync Example Applications

Expand Down Expand Up @@ -38,57 +40,71 @@ enables a seamless and efficient synchronization process.

[Fabric-Bridge](https://github.com/project-chip/connectedhomeip/tree/master/examples/fabric-bridge-app/linux/README.md)

## Run Fabric Sync Demo on RP4
## Bootstrap Fabric Sync Demo on Linux

### Setup Fabric Source
### Start Fabric Synchronization on Ecosystem 1

Connect to the Fabric Source server:
Run the Fabric Synchronization script:

```
ssh [email protected]
./examples/fabric-admin/scripts/run_fabric_sync.sh
```

Password: <password>
### Start Fabric Synchronization on Ecosystem 2

Run the Fabric Source script:
Run the Fabric Synchronization script:

```
./run_fabric_source.sh
./examples/fabric-admin/scripts/run_fabric_sync.sh
```

### Setup Fabric Sink
## Bootstrap Fabric Sync Demo on RP4

Connect to the Fabric Sink server:
### Start Fabric Synchronization on Ecosystem 1

Connect to the Ecosystem 1 server:

```
ssh [email protected]
```

Password: <password>

Run the Fabric Sink script:
Run the Fabric Synchronization script:

```
./run_fabric_sink.sh
./run_fabric_sync.sh
```

### Fabric Sync Setup
### Start Fabric Synchronization on Ecosystem 2

Connect to the Ecosystem 2 server:

```
ssh [email protected]
```

Enable Fabric Auto Sync:
Password: <password>

In Fabric-Sync console:
Run the Fabric Synchronization script:

```
fabricsync enable-auto-sync 1
./run_fabric_sync.sh
```

Pair the Fabric-Source bridge to Fabric-Sync with node ID 1:
## Run Fabric Sync Demo

### Fabric Sync Setup

In Ecosystem 1 Fabric-Admin console:

Pair the Ecosystem 2 bridge to Ecosystem 1 with node ID 2:

```
fabricsync add-bridge 1 <fabric-source-bridge-ip>
fabricsync add-bridge 2 <e2-fabric-bridge-ip>
```

### Pair Light Example to Fabric-Source
### Pair Light Example to Ecosystem 2

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
Expand All @@ -114,36 +130,54 @@ Pair the Light Example with node ID 3 using its payload number:
pairing already-discovered 3 20202021 <ip> 5540
```

After the Light Example is successfully paired in Fabric-Source, it will be
synced to Fabric-Sink with a new assigned node ID.
After the device is successfully added, you will observe the following on
Ecosystem 2 with the newly assigned Node ID:

```
>>> New device with Node ID: 0x3 has been successfully added.
```

Additionally, you should also get notified when a new device is added to
Ecosystem 2 from the Ecosystem 1:

```
>>> A new device is added on Endpoint 3.
```

### Synchronize Light Example to Ecosystem 1

After the Light Example is successfully paired in Ecosystem 2, we can start to
synchronize the light device to Ecosystem 1 using the new assigned dynamic
endpointid on Ecosystem 2.

```
fabricsync sync-device <endpointid>
```

Toggle the Light Example:

From Fabric-Source:
From Ecosystem 1:

```
onoff on <node-id> 1
onoff off <node-id> 1
```

From Fabric-Sink: (Use the node ID assigned)
From Ecosystem 2: (Use the node ID assigned)

```
onoff on x 1
onoff off x 1
```

### Remove Light Example from Fabric-Source
### Remove Light Example from Ecosystem

Unpair the Light Example:

```
pairing unpair <node-id>
```

After the Light Example is successfully unpaired from Fabric-Source, it will
also be removed from the Fabric-Sink.

### Pair Commercial Switch to Fabric-Source

Pair the switch using its payload number:
Expand All @@ -154,32 +188,36 @@ In Fabric-Source console:
pairing code-wifi <node-id> <ssid> <passwd> <payload>
```

After the switch is successfully paired in Fabric-Source, it will be synced to
Fabric-Sink with a new assigned node ID.
### Synchronize Switch to Ecosystem 1

After the switch is successfully paired in Ecosystem 2, we can start to
synchronize it to Ecosystem 1 using the new assigned dynamic endpointid on
Ecosystem 2..

```
fabricsync sync-device <endpointid>
```

Toggle the switch:

From Fabric-Source:
From Ecosystem 1:

```
onoff on <node-id> 1
onoff off <node-id> 1
```

From Fabric-Sink: (Use the node ID assigned)
From Ecosystem 2: (Use the node ID assigned)

```
onoff on <node-id> 1
onoff off <node-id> 1
```

### Remove Switch from Fabric-Source
### Remove Switch from Ecosystem

Unpair the switch:

```
pairing unpair <node-id>
```

After the switch is successfully unpaired from Fabric-Source, it will also be
removed from the Fabric-Sink.
Loading

0 comments on commit a78ff44

Please sign in to comment.