bluez-async 0.8.2

An async wrapper around the D-Bus interface of BlueZ (the Linux Bluetooth daemon), supporting GATT client (central) functionality.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Example to show information about the Bluetooth adapters on the system.

use bluez_async::BluetoothSession;

#[tokio::main]
async fn main() -> Result<(), eyre::Report> {
    pretty_env_logger::init();

    let (_, session) = BluetoothSession::new().await?;

    // Get the list of all Bluetooh adapters on the system.
    let adapters = session.get_adapters().await?;
    println!("Adapters: {:#?}", adapters);

    Ok(())
}