1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! BLE commissioning support for Matter (`matter-ble` feature).
//!
//! Implements the Matter BLE Transport Protocol (BTP) peripheral role,
//! allowing Matter controllers to commission this device over Bluetooth.
//!
//! # Platform support
//!
//! | Platform | Status |
//! |----------|--------|
//! | Linux (BlueZ) | Supported |
//! | macOS (CoreBluetooth) | Supported |
//! | Windows | Not supported (btleplug 0.11 has no peripheral API) |
//!
//! # Usage
//!
//! ```rust,no_run
//! # #[cfg(feature = "matter-ble")]
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! use brainwires_hardware::homeauto::matter::ble::MatterBlePeripheral;
//!
//! let peripheral = MatterBlePeripheral::new(
//! 0x0ABC, // 12-bit discriminator
//! 0x1234, // vendor ID
//! 0x5678, // product ID
//! );
//!
//! let mut transport = peripheral.start().await?;
//!
//! // Receive assembled Matter messages from the commissioner.
//! while let Some(msg) = transport.rx.recv().await {
//! // Process commissioning message …
//! let _ = msg;
//! }
//! # Ok(())
//! # }
//! ```
pub use ;