From 8f0ac2f8edaa46859bb15d05e82c8682a290d2dd Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh Date: Mon, 27 May 2024 17:11:33 +0200 Subject: [PATCH 1/2] Improve explanation of process-control connection --- README.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 37a5ec2..e72d197 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,8 @@ This snap has been tested on amd64/arm64 architectures for WiFi/Ethernet/DNS-SD/ sudo snap install chip-tool ``` -Connect the [`avahi-observe`](https://snapcraft.io/docs/avahi-observe-interface) interface to allow DNS-SD based discovery: -```bash -sudo snap connect chip-tool:avahi-observe -``` - -Connect the [`bluez`](https://snapcraft.io/docs/bluez-interface) interface for device discovery over Bluetooth Low Energy (BLE): -```bash -sudo snap connect chip-tool:bluez -``` - -Connect the [`process-control`](https://snapcraft.io/docs/process-control-interface) interface for system-wide process management. This is needed to grant Chip Tool access to make [sched_setattr](https://man7.org/linux/man-pages/man2/sched_setattr.2.html) system calls. This may improve the reliability of the operations (see https://github.com/canonical/chip-tool-snap/issues/8). +You may connect the [`process-control`](https://snapcraft.io/docs/process-control-interface) interface to allow system-wide process management. +This is needed to grant Chip Tool access to make [sched_setattr](https://man7.org/linux/man-pages/man2/sched_setattr.2.html) system calls. This may improve the reliability of the commissioning and control operations (see [#8](https://github.com/canonical/chip-tool-snap/issues/8)). ```bash sudo snap connect chip-tool:process-control ``` From 412e797ad49ed2fa80d9d6375aeb688485a59f78 Mon Sep 17 00:00:00 2001 From: Farshid Tavakolizadeh Date: Mon, 27 May 2024 17:12:16 +0200 Subject: [PATCH 2/2] Explain auto/manual interface connections --- README.md | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index e72d197..62aa3ef 100644 --- a/README.md +++ b/README.md @@ -15,24 +15,23 @@ This snap has been tested on amd64/arm64 architectures for WiFi/Ethernet/DNS-SD/ sudo snap install chip-tool ``` +When installing from the Snap Store, the following interfaces auto-connect: +- [`avahi-observe`](https://snapcraft.io/docs/avahi-observe-interface) to allow DNS-SD based discovery. +- [`bluez`](https://snapcraft.io/docs/bluez-interface) for device discovery over Bluetooth Low Energy (BLE). + +> **Note** +> DNS-SD and Bluetooth depend on Avahi and Bluez. +> To install: +> - Ubuntu: `sudo apt install bluez avahi-daemon` +> - Ubuntu Core: `sudo snap install avahi bluez` + + You may connect the [`process-control`](https://snapcraft.io/docs/process-control-interface) interface to allow system-wide process management. This is needed to grant Chip Tool access to make [sched_setattr](https://man7.org/linux/man-pages/man2/sched_setattr.2.html) system calls. This may improve the reliability of the commissioning and control operations (see [#8](https://github.com/canonical/chip-tool-snap/issues/8)). ```bash sudo snap connect chip-tool:process-control ``` -> **Note** -> On **Ubuntu Core**, the `avahi-observe` and `bluez` interfaces are not provided by the system. -> -> These interfaces are provided by other snaps, such as the [Avahi](https://snapcraft.io/avahi) and [BlueZ](https://snapcraft.io/bluez) snaps. -> To install the snaps and connect to the interfaces, run: -> ```bash -> sudo snap install avahi bluez -> sudo snap connect chip-tool:avahi-observe avahi:avahi-observe -> sudo snap connect chip-tool:bluez bluez:service -> ``` -> - ### Commissioning into IP network Discover using DNS-SD and pair: ```bash @@ -94,6 +93,32 @@ Build remotely for all supported architectures: snapcraft remote-build ``` +### Install the built snap + +Install the local snap: +```bash +sudo snap install --dangerous *.snap +``` + +Connect the following interfaces: +```bash +sudo snap connect chip-tool:avahi-observe +sudo snap connect chip-tool:bluez +``` + +> **Note** +> On **Ubuntu Core**, the `avahi-observe` and `bluez` interfaces are not provided by the system. +> These interfaces are provided by other snaps, such as the [Avahi](https://snapcraft.io/avahi) and [BlueZ](https://snapcraft.io/bluez) snaps. +> To install the snaps and connect the interfaces, run: +> ```bash +> sudo snap install avahi bluez +> sudo snap connect chip-tool:avahi-observe avahi:avahi-observe +> sudo snap connect chip-tool:bluez bluez:service +> ``` + + +Continue the [setup](#setup). + ## Test Refer to [tests](./tests).