Skip to content

Snap packaging of chip-tool from the Matter project

License

Notifications You must be signed in to change notification settings

locnnil/chip-tool-snap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chip Tool Snap

chip-tool

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

Setup

sudo snap install chip-tool

Connect the avahi-observe interface to allow DNS-SD based discovery:

sudo snap connect chip-tool:avahi-observe

Connect the bluez interface for device discovery over Bluetooth Low Energy (BLE):

sudo snap connect chip-tool:bluez

Connect the process-control interface for 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 operations (see canonical#8).

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 and BlueZ snaps. To install the snaps and connect to 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:service

Commissioning into IP network

Discover using DNS-SD and pair:

sudo chip-tool pairing onnetwork 110 20202021

where:

  • 110 is the node id being assigned to the app
  • 20202021 is the pin code set on the app

Commissioning into Thread network over BLE

This depends on an OpenThread Border Router (OTBR) with an active network. For guidance on setting that up using the OTBR snap, refer to this tutorial.

Use the OpenThread CLI to obtain Thread network credential:

$ sudo ot-ctl dataset active -x
0e08...f7f8
Done

Discover and pair:

sudo chip-tool pairing ble-thread 110 hex:0e08...f7f8 20202021 3840

where:

  • 110 is the node id being assigned to the app
  • 0e08...f7f8 is the Thread network credential operational dataset, truncated for readability.
  • 20202021 is the pin code set on the app
  • 3840 is the discriminator id

Control

Toggle:

sudo chip-tool onoff toggle 110 1

where:

  • onoff is the matter cluster name
  • on/off/toggle is the command name.
  • 110 is the node id of the app assigned during the commissioning
  • 1 is the endpoint of the configured device

Build

Build locally for the architecture same as the host:

snapcraft -v

Build remotely for all supported architectures:

snapcraft remote-build

Test

Refer to tests.

About

Snap packaging of chip-tool from the Matter project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%