| Crates.io | matc |
| lib.rs | matc |
| version | 0.1.1 |
| created_at | 2025-02-03 18:11:05.610366+00 |
| updated_at | 2025-02-16 08:47:49.146457+00 |
| description | Matter protocol library (controller side) |
| homepage | https://github.com/tom-code/rust-matc |
| repository | https://github.com/tom-code/rust-matc |
| max_upload_size | |
| id | 1540852 |
| size | 304,097 |
This is prototype of matter protocol library in rust (controller side).
It supports controller side of:
Read attribute
Invoke command
Use of demo application:
Compile demo application using cargo. Binary will be found usually in target/debug/examples/demo.
cargo build --example demo
demo application uses clap. use --help to learn all supported parameters
create CA certificates in directory pem:
./demo ca-bootstrap
create key/certificate for controller with id 100:
./demo ca-create-controller 100
discover all commissionable devices using mdns:
./demo discover commissionable --timeout 3
discover all commissioned devices using mdns:
./demo discover commissioned --timeout 3
if you have manual pairing code you need to extract passcode from it using following command:
demo decode-manual-pairing-code 1577-384-0075
commission device (device ip address is 192.168.5.70, commissioning passcode is 123456, device id will be 300, device admin has id 100):
./demo commission 192.168.5.70:5540 100 300 123456
update fabric label in device:
./demo command invoke-command-update-fabric-label --device-address 192.168.5.70:5540 --controller-id 100 --device-id 300 "testfabric"
example how to use read command to read any attribute. This example lists all provisioned fabrics
by reading attribute 1(fabrics) from cluster 62 (operational credentials) from endpoint 0:
./demo command read --device-address 192.168.5.70:5540 --controller-id 100 --device-id 300 0 62 1
turn device on/off:
demo command invoke-command-on --device-address 192.168.5.70:5540 --controller-id 100 --device-id 300
demo command invoke-command-off --device-address 192.168.5.70:5540 --controller-id 100 --device-id 300
if you want to start from scratch remove directory pem