Chip Tool is a Matter controller being developed as part of the Connected Home IP project.
The snap packaging makes it easy to run the Chip Tool on Linux distributions.
This snap has been tested on amd64/arm64 architectures for WiFi/Ethernet/DNS-SD/BLE/Thread commissioning and control.
Usage instructions can be found in the documentation.
Build locally for the same architecture as the host:
snapcraft -vBuild remotely for all supported architectures:
snapcraft remote-buildInstall the local snap:
sudo snap install --dangerous *.snapWhen the snap is installed from the Snap Store, the avahi-observer and bluez interfaces are connected automatically.
If you install the locally built snap, you need to connect these interfaces manually:
sudo snap connect chip-tool:avahi-observe
sudo snap connect chip-tool:bluezOn Ubuntu Core, the avahi-observe and bluez interfaces are not provided by the system.
These interfaces are provided by the Avahi and BlueZ snaps.
To install the snaps and connect the interfaces, run:
sudo snap install avahi bluez
sudo snap connect chip-tool:avahi-observe avahi:avahi-observe
sudo snap connect chip-tool:bluez bluez:serviceYou may connect the process-control interface to allow system-wide process management.
This is needed to grant Chip Tool access to make sched_setattr system calls.
This may improve the reliability of the commissioning and control operations (see #8).
sudo snap connect chip-tool:process-controlThe latest version of the chip-tool snap does not require the use of sudo (root access). If you have updated the snap from a previous version it will still work with sudo. If you run it as a normal user, the previous state of provisioned devices will not be available.
To change from running with sudo to running without sudo, you need to copy the database files from the root user to your user, and update the file ownerships. This can be done with these two commands:
sudo cp /var/snap/chip-tool/common/mnt/chip_tool_* ~/snap/chip-tool/common/
sudo chown $USER:$USER ~/snap/chip-tool/common/*
If you run chip-tool again without sudo and get an error similar to CHIP Error 0x000000AF: Write to file failed, either restart your computer to clear all temporary files, or run the following commands to delete them:
# Open a shell inside the chip-tool snap sandbox
sudo snap run --shell chip-tool.chip-tool
# Inside this shell, delete the temporary files
rm /tmp/chip_*
Refer to tests.