Skip to content

Commit

Permalink
Add installation as snap instructions (#36099)
Browse files Browse the repository at this point in the history
* Add installation as snap instructions

* Add hyperlink to snap store listing

* Fix links to chip tool doc
  • Loading branch information
jpm-canonical authored Oct 23, 2024
1 parent c28bcdc commit 0a1867f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 23 deletions.
51 changes: 30 additions & 21 deletions docs/development_controllers/chip-tool/chip_tool_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,29 @@ the setup payload or performing discovery actions.

<hr>

## Source files
## Installation

You can find source files of the CHIP Tool in the `examples/chip-tool`
directory.

> **Note:** The CHIP Tool caches the configuration state in the
> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the
> `/tmp` directory can sometimes resolve issues related to stale configuration.
On Linux distributions
[running snapd](https://snapcraft.io/docs/installing-snapd), such as Ubuntu, the
CHIP Tool can be installed using the
[chip-tool snap](https://snapcraft.io/chip-tool). To do this, run:

> **Note:** To make the configuration persistent (since `/tmp` directory might
> be flushed at each reboot) you can change the directory where CHIP Tool caches
> its configuration by using the option `--storage-directory`
```
sudo snap install chip-tool
```

<hr>
## Building from source

## Building and running the CHIP Tool
The source files of the CHIP Tool are available in the `examples/chip-tool`
directory.

Before you can use the CHIP Tool, you must compile it from source on Linux
(amd64/aarch64) or macOS. If you want to run it on Raspberry Pi, it must use a
64-bit OS.
The source can be compiled on Linux (amd64/aarch64) or macOS. If you want to run
it on Raspberry Pi, you must use a 64-bit OS.

> **Note:** To ensure compatibility, always build the CHIP Tool and the Matter
> device from the same revision of the `connectedhomeip` repository.
### Building the CHIP Tool

To build and run the CHIP Tool:
To build the CHIP Tool:

1. Install all required packages for Matter and prepare the source code and the
build system. Read the [Building Matter](../../guides/BUILDING.md) guide for
Expand All @@ -50,10 +46,16 @@ To build and run the CHIP Tool:
In this command, `BUILD_PATH` specifies where the target binaries are to be
placed.
### Running the CHIP Tool
## Running the CHIP Tool
If you installed the CHIP Tool as a snap, the command to run it would be:
```
$ chip-tool
```
To check if the CHIP Tool runs correctly, execute the following command from the
`BUILD_PATH` directory:
If you compiled the CHIP Tool from source, it can be executed with the following
command from the `BUILD_PATH` directory:
```
$ ./chip-tool
Expand All @@ -68,6 +70,13 @@ more complex command by appending it with sub-commands. Examples of specific
commands and their use cases are described in the
[Supported commands and options](#supported-commands-and-options) section.
> **Note:** The CHIP Tool caches the configuration state in the
> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the
> `/tmp` directory can sometimes resolve issues related to stale configuration.
> To make the configuration persistent you can change the directory where CHIP
> Tool caches its configuration by using the command line option
> `--storage-directory`
<hr>
## CHIP Tool modes
Expand Down
4 changes: 2 additions & 2 deletions examples/light-switch-app/nrfconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ same Matter network.
To perform the unicast binding process, complete the following steps:
1. Build the CHIP Tool according to the steps from the
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-and-running-the-chip-tool).
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source).
2. Go to the CHIP Tool build directory.
3. Add an ACL to the development kit that is programmed with the
[Lighting Application Example](../../lighting-app/nrfconnect/README.md) by
Expand Down Expand Up @@ -690,7 +690,7 @@ same Matter network.
To perform the unicast binding process, complete the following steps:
1. Build the CHIP Tool according to the steps from the
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-and-running-the-chip-tool).
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source).
2. Go to the CHIP Tool build directory.
3. Add the light switch device to the multicast group by running the following
Expand Down

0 comments on commit 0a1867f

Please sign in to comment.