From b4d753fe492589837e4fd54f8f91dd81aa0f4552 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 15:41:46 +0100 Subject: [PATCH 1/7] Updated for Cargo workspace usage --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dbabef2..8682137 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,38 @@ - # matter-rs: The Rust Implementation of Matter ![experimental](https://img.shields.io/badge/status-Experimental-red) [![license](https://img.shields.io/badge/license-Apache2-green.svg)](https://raw.githubusercontent.com/project-chip/matter-rs/main/LICENSE) - - [![Test Linux (OpenSSL)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-openssl.yml/badge.svg)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-openssl.yml) [![Test Linux (mbedTLS)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-mbedtls.yml/badge.svg)](https://github.com/project-chip/matter-rs/actions/workflows/test-linux-mbedtls.yml) ## Build Building the library: + ``` -$ cd matter $ cargo build ``` Building the example: + ``` -$ cd matter $ RUST_LOG="matter" cargo run --example onoff_light ``` With the chip-tool (the current tool for testing Matter) use the Ethernet commissioning mechanism: + +``` +$ chip-tool pairing code 12344321 +``` + +Or alternatively: + ``` $ chip-tool pairing ethernet 12344321 123456 0 5540 ``` Interact with the device + ``` # Read server-list $ chip-tool descriptor read server-list 12344321 0 @@ -40,6 +45,7 @@ $ chip-tool onoff on 12344321 1 ``` ## Functionality + - Secure Channel: - PASE - CASE @@ -55,4 +61,3 @@ $ chip-tool onoff on 12344321 1 ## Notes The matter-rs project is a work-in-progress and does NOT yet fully implement Matter. - From bdc0b6dbefa01aa737be342c787669d0368af4eb Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 15:41:58 +0100 Subject: [PATCH 2/7] Updated dependencies --- matter/Cargo.toml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/matter/Cargo.toml b/matter/Cargo.toml index fb6c7f7..14926da 100644 --- a/matter/Cargo.toml +++ b/matter/Cargo.toml @@ -21,31 +21,31 @@ crypto_mbedtls = ["mbedtls"] crypto_esp_mbedtls = ["esp-idf-sys"] [dependencies] -boxslab = { path = "../boxslab"} -matter_macro_derive = { path = "../matter_macro_derive"} +boxslab = { path = "../boxslab" } +matter_macro_derive = { path = "../matter_macro_derive" } bitflags = "1.3" byteorder = "1.4.3" -heapless = {version = "0.7.7", features = ["x86-sync-pool"] } -generic-array = "0.14.5" -num = "0.3" +heapless = { version = "0.7.16", features = ["x86-sync-pool"] } +generic-array = "0.14.6" +num = "0.4" num-derive = "0.3.3" -num-traits = "0.2.14" -log = { version = "0.4.14", features = ["max_level_debug", "release_max_level_debug"] } -env_logger = "0.9.0" -rand = "0.8.4" -esp-idf-sys = { version = "0.30", features = ["binstart"], optional = true } -openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true} -foreign-types = { version = "0.3.1", optional = true} -sha2 = { version = "0.9.8", optional = true} -hmac = { version = "0.11.0", optional = true} -mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true} +num-traits = "0.2.15" +log = { version = "0.4.17", features = ["max_level_debug", "release_max_level_debug"] } +env_logger = "0.10.0" +rand = "0.8.5" +esp-idf-sys = { version = "0.32", features = ["binstart"], optional = true } +openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true } +foreign-types = { version = "0.5.0", optional = true } +sha2 = { version = "0.10.6", optional = true } +hmac = { version = "0.12.1", optional = true } +mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true } subtle = "2.4.1" colored = "2.0.0" -smol = "1.2.5" +smol = "1.3.0" owning_ref = "0.4.1" safemem = "0.3.3" -chrono = { version = "0.4.19", default-features = false, features = ["clock", "std"] } -async-channel = "1.6" +chrono = { version = "0.4.23", default-features = false, features = ["clock", "std"] } +async-channel = "1.8" # to compute the check digit verhoeff = "1" From e1b110ba7691271f8a7f74ee502137b21ebc6abe Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 15:42:08 +0100 Subject: [PATCH 3/7] Use Cargo workspace --- Cargo.toml | 4 ++++ examples/Cargo.toml | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 Cargo.toml create mode 100644 examples/Cargo.toml diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0abd996 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = ["matter", "matter_macro_derive", "boxslab"] + +exclude = ["examples/*"] diff --git a/examples/Cargo.toml b/examples/Cargo.toml new file mode 100644 index 0000000..20abc68 --- /dev/null +++ b/examples/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = ["*"] +exclude = ["target", ".cargo"] +resolver = "2" From f2d3c1821e33fbf54466372ce8d7348f7f404636 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 15:53:50 +0100 Subject: [PATCH 4/7] Include tlv_tool in workspace --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0abd996..7b2660c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ [workspace] -members = ["matter", "matter_macro_derive", "boxslab"] +members = ["matter", "matter_macro_derive", "boxslab", "tools/tlv_tool"] exclude = ["examples/*"] From 5e7d554edae3b69104fa462602a801ae86a76584 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 16:00:29 +0100 Subject: [PATCH 5/7] Reverted major versions of foreign-types and hmac --- matter/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matter/Cargo.toml b/matter/Cargo.toml index 14926da..51d9c72 100644 --- a/matter/Cargo.toml +++ b/matter/Cargo.toml @@ -35,9 +35,9 @@ env_logger = "0.10.0" rand = "0.8.5" esp-idf-sys = { version = "0.32", features = ["binstart"], optional = true } openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true } -foreign-types = { version = "0.5.0", optional = true } +foreign-types = { version = "0.4.0", optional = true } sha2 = { version = "0.10.6", optional = true } -hmac = { version = "0.12.1", optional = true } +hmac = { version = "0.11.0", optional = true } mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true } subtle = "2.4.1" colored = "2.0.0" From 9239c78ac61eb0be4a8660c0e0a91d7012ca7d12 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 16:03:22 +0100 Subject: [PATCH 6/7] Reverted major sha2 version --- matter/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matter/Cargo.toml b/matter/Cargo.toml index 51d9c72..30a57f4 100644 --- a/matter/Cargo.toml +++ b/matter/Cargo.toml @@ -36,7 +36,7 @@ rand = "0.8.5" esp-idf-sys = { version = "0.32", features = ["binstart"], optional = true } openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true } foreign-types = { version = "0.4.0", optional = true } -sha2 = { version = "0.10.6", optional = true } +sha2 = { version = "0.9.9", optional = true } hmac = { version = "0.11.0", optional = true } mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true } subtle = "2.4.1" From 4d067072f3692df300c549faaa41c0ec6a3fc35c Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 15 Jan 2023 16:05:38 +0100 Subject: [PATCH 7/7] Reverted foreign-types to 0.3 --- matter/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matter/Cargo.toml b/matter/Cargo.toml index 30a57f4..9b9d544 100644 --- a/matter/Cargo.toml +++ b/matter/Cargo.toml @@ -35,7 +35,7 @@ env_logger = "0.10.0" rand = "0.8.5" esp-idf-sys = { version = "0.32", features = ["binstart"], optional = true } openssl = { git = "https://github.com/sfackler/rust-openssl", optional = true } -foreign-types = { version = "0.4.0", optional = true } +foreign-types = { version = "0.3.2", optional = true } sha2 = { version = "0.9.9", optional = true } hmac = { version = "0.11.0", optional = true } mbedtls = { git = "https://github.com/fortanix/rust-mbedtls", optional = true }