wayle-bluetooth
Bluetooth device management and discovery via BlueZ D-Bus.

cargo add wayle-bluetooth
Usage
BluetoothService exposes adapter state, paired devices, and discovery controls. All fields are reactive Property<T> types.
use wayle_bluetooth::BluetoothService;
use futures::StreamExt;
async fn example() -> Result<(), wayle_bluetooth::Error> {
let bt = BluetoothService::new().await?;
for device in bt.devices.get().iter() {
let name = device.alias.get();
println!("{name}: connected={}", device.connected.get());
}
let mut stream = bt.devices.watch();
while let Some(devices) = stream.next().await {
for device in devices.iter() {
if device.connected.get() {
println!("{} connected", device.alias.get());
}
}
}
Ok(())
}
Devices support connect(), disconnect(), pair(), and forget() operations.
License
MIT
Part of wayle-services.