Skip to content

Commit

Permalink
Upgrade Matter SDK to v1.1.0.1, add build packages for arm builds (#6)
Browse files Browse the repository at this point in the history
* Install NodeJS and ZAP for arm builds

* Remove obsolete Ethernet pairing with chip-tool in README

* Upgrade to Matter SDK v1.1.0.1

---------

Co-authored-by: Farshid Tavakolizadeh <[email protected]>
  • Loading branch information
MonicaisHer and farshidtz authored Aug 13, 2023
1 parent 0aaaaaf commit 81097ca
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,10 @@ Discover using DNS-SD and pair:
sudo chip-tool pairing onnetwork 110 20202021
```

Or, pair directly by giving the IP address:
```bash
sudo chip-tool pairing ethernet 110 20202021 3840 192.168.1.110 5543
```

where:

- `110` is the node id being assigned to the app
- `20202021` is the pin code set on the app
- `3840` is the discriminator id
- `192.168.1.110` is the IP address of the device running the app
- `5540` the port for server that runs inside the app

### Commissioning into Thread network over BLE
Obtain Thread network credential:
Expand Down
39 changes: 37 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parts:
connectedhomeip:
plugin: nil
build-environment:
- TAG: v1.0.0.2
- TAG: v1.1.0.1
override-pull: |
# shallow clone the project its submodules
git clone https://github.com/project-chip/connectedhomeip.git --depth=1 --branch=$TAG .
Expand All @@ -30,10 +30,45 @@ parts:
# set the snap version
craftctl set version=$TAG+snap
zap:
plugin: nil
source: https://github.com/project-chip/zap.git
source-depth: 1
source-tag: v2023.05.04
build-environment:
- NODE_VERSION: v18.16.1
build-packages:
- build-essential
- libpango1.0-dev
- libjpeg-dev
- libgif-dev
- librsvg2-dev
- wget
override-build: |
if [[ $SNAP_ARCH == "arm64" ]]; then
# Install node+npm
NODE=node-$NODE_VERSION-linux-$SNAP_ARCH
wget https://nodejs.org/dist/$NODE_VERSION/$NODE.tar.xz
tar -xJf $NODE.tar.xz
export PATH=$PWD/$NODE/bin:$PATH
# Install zap
npm install
# Define the environment needed for the app build
echo "export PATH=$PWD/$NODE/bin:$PATH" > env
echo "export ZAP_DEVELOPMENT_PATH=$PWD" >> env
cat env
fi
chip-tool:
after: [connectedhomeip]
after: [connectedhomeip, zap]
plugin: nil
build-environment:
- ZAP_ENV: /root/parts/zap/build/env
override-build: |
# Setup ZAP paths; installed in the corresponding part
test -f $ZAP_ENV && source $ZAP_ENV
mkdir -p $CRAFT_PART_INSTALL/bin
cd ../../connectedhomeip/src
Expand Down

0 comments on commit 81097ca

Please sign in to comment.