Skip to content

Commit b11959d

Browse files
authored
An OpenThread BR dBus API (#472)
Similar to #457 (and the justification for #457 is actually good!) but also: - The full dBus API, not just "what currently the controller needs" - Not sure who is "the controller", but "a" controller might need other APIs too - We try to expose the full API in all zbus proxies anyway - Copyright headers in the rs-matter format, not shortened. Why are they shortened?!?! - A promise to assess the Gemini code review feedback
1 parent 159f4b3 commit b11959d

4 files changed

Lines changed: 943 additions & 2 deletions

File tree

rs-matter/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ max-btp-sessions-1 = [] # default
116116
# General
117117
astro-dnssd = ["os", "dep:astro-dnssd"]
118118
zeroconf = ["os", "dep:zeroconf"]
119-
zbus = ["dep:zbus", "os", "futures-lite", "libc", "uuid", "async-channel"]
119+
zbus = ["dep:zbus", "dep:serde", "os", "futures-lite", "libc", "uuid", "async-channel"]
120120
bluer = ["dep:bluer", "os"]
121121
os = ["std", "backtrace", "async-io", "critical-section/std", "embassy-sync/std", "embassy-time/std", "dep:if-addrs"]
122122
std = ["alloc", "rand"]
@@ -191,6 +191,7 @@ async-compat = { version = "0.2", optional = true, default-features = false }
191191

192192
# OS
193193
zbus = { version = "5.8", optional = true }
194+
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }
194195
async-channel = { version = "2", optional = true }
195196
uuid = { version = "1", optional = true, features = ["v4"] }
196197
libc = { version = "0.2", optional = true }

rs-matter/src/utils/zbus_proxies.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (c) 2025 Project CHIP Authors
3+
* Copyright (c) 2025-2026 Project CHIP Authors
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -20,5 +20,6 @@
2020
pub mod avahi;
2121
pub mod bluez;
2222
pub mod nm;
23+
pub mod openthread;
2324
pub mod resolve;
2425
pub mod wpa_supp;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
*
3+
* Copyright (c) 2026 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
//! zbus proxies for OpenThread Border Router (`otbr-agent`).
19+
//!
20+
//! OTBR exposes a per-Thread-interface D-Bus service named
21+
//! `io.openthread.BorderRouter.<ifname>` (typically `io.openthread.BorderRouter.wpan0`)
22+
//! under the well-known object path `/io/openthread/BorderRouter/<ifname>`.
23+
//!
24+
//! The full interface is defined in `openthread/src/posix/platform/dbus/` and
25+
//! documented at <https://github.com/openthread/ot-br-posix>.
26+
27+
pub mod border_router;

0 commit comments

Comments
 (0)