No description
Find a file
Kedar Sovani 97c9619dba
Merge pull request #94 from ssnover/zeroconf
Add feature zeroconf in order to support avahi mDNS registration via zeroconf crate
2023-10-06 22:33:59 +05:30
.github/workflows Do not hold on to RefCell borrows across await points 2023-08-01 06:49:42 +00:00
examples Bump up the stack utilisation 2023-08-09 13:35:23 +05:30
rs-matter Merge pull request #94 from ssnover/zeroconf 2023-10-06 22:33:59 +05:30
rs-matter-macros Adjust the authors header 2023-07-28 06:22:13 +00:00
tools/tlv Adjust the authors header 2023-07-28 06:22:13 +00:00
.gitignore Builds for STD with ESP IDF 2023-07-21 12:15:10 +00:00
Cargo.toml Rename matter(-iot) to rs-matter; matter_macro_derive to rs-matter-macros; tlv_tool to just tlv 2023-07-22 10:31:29 +00:00
CODE_OF_CONDUCT.md Initial revision. 2022-12-12 08:51:27 -08:00
CONTRIBUTING.md Initial revision. 2022-12-12 08:51:27 -08:00
LICENSE Initial commit 2022-12-12 08:43:44 -08:00
README.md Fix typo in target for esp32c6 2023-08-27 12:36:02 -07:00
sdkconfig.defaults Sequential Exchange API 2023-07-21 12:15:12 +00:00
TODO.md Initial commit 2022-12-27 09:52:25 +05:30

rs-matter: The Rust Implementation of Matter

experimental license CI CI - TLV crates.io Matrix

Build

Building the library

$ cargo build

Building and running the example (Linux, MacOS X)

$ cargo run --example onoff_light

Building the example (Espressif's ESP-IDF)

  • Install all build prerequisites described here
  • Build with the following command line:
export MCU=esp32; export CARGO_TARGET_XTENSA_ESP32_ESPIDF_LINKER=ldproxy; export RUSTFLAGS="-C default-linker-libraries"; export WIFI_SSID=ssid;export WIFI_PASS=pass; cargo build --example onoff_light --no-default-features --features esp-idf --target xtensa-esp32-espidf -Zbuild-std=std,panic_abort
  • If you are building for a different Espressif MCU, change the MCU variable, the xtensa-esp32-espidf target and the name of the CARGO_TARGET_<esp-idf-target-uppercase>_LINKER variable to match your MCU and its Rust target. Available Espressif MCUs and targets are:
    • esp32 / xtensa-esp32-espidf
    • esp32s2 / xtensa-esp32s2-espidf
    • esp32s3 / xtensa-esp32s3-espidf
    • esp32c3 / riscv32imc-esp-espidf
    • esp32c5 / riscv32imc-esp-espidf
    • esp32c6 / riscv32imac-esp-espidf
  • Put in WIFI_SSID / WIFI_PASS the SSID & password for your wireless router
  • Flash using the espflash utility described in the build prerequsites' link above

Building the example (ESP32-XX baremetal or RP2040)

Coming soon!

Test

With the chip-tool (the current tool for testing Matter) use the Ethernet commissioning mechanism:

$ chip-tool pairing code 12344321 <Pairing-Code>

Or alternatively:

$ chip-tool pairing ethernet 12344321 123456 0 <IP-Address> 5540

Interact with the device

# Read server-list
$ chip-tool descriptor read server-list 12344321 0

# Read On/Off status
$ chip-tool onoff read on-off 12344321 1

# Toggle On/Off by invoking the command
$ chip-tool onoff on 12344321 1

Functionality

  • Secure Channel:
    • PASE
    • CASE
  • Interactions:
    • Invoke Command(s), Read Attribute(s), Write Attribute(s)
  • Commissioning:
    • over Ethernet
    • Network Commissioning Cluster
    • General Commissioning Cluster
    • Operational Certificates Cluster
  • Some TODO are captured here

Notes

The matter-rs project is a work-in-progress and does NOT yet fully implement Matter.