Expand description
An async wrapper around the D-Bus interface of BlueZ, the Linux Bluetooth daemon. This provides type-safe interfaces to a subset of the Bluetooth client (i.e. central, in Bluetooth terminology) interfaces exposed by BlueZ, focussing on the Generic Attribute Profile (GATT) of Bluetooth Low Energy (BLE).
Start by creating a BluetoothSession
.
Structs§
- Adapter
Id - Opaque identifier for a Bluetooth adapter on the system.
- Adapter
Info - Information about a Bluetooth adapter on the system.
- Bluetooth
Session - A connection to the Bluetooth daemon. This can be cheaply cloned and passed around to be used from different places. It is the main entry point to the library.
- Characteristic
Flags - The set of flags (a.k.a. properties) of a characteristic, defining how the characteristic can be used.
- Characteristic
Id - Opaque identifier for a GATT characteristic on a Bluetooth device.
- Characteristic
Info - Information about a GATT characteristic on a Bluetooth device.
- Descriptor
Id - Opaque identifier for a GATT characteristic descriptor on a Bluetooth device.
- Descriptor
Info - Information about a GATT descriptor on a Bluetooth device.
- Device
Id - Opaque identifier for a Bluetooth device which the system knows about. This includes a reference to which Bluetooth adapter it was discovered on, which means that any attempt to connect to it will also happen from that adapter (in case the system has more than one).
- Device
Info - Information about a Bluetooth device which was discovered. See https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/device-api.txt
- Discovery
Filter - A set of filter parameters for discovery. Parameters may be set to
None
to use the BlueZ defaults. - MacAddress
- MAC address of a Bluetooth device.
- Modalias
- A parsed modalias string.
- Parse
MacAddress Error - An error parsing a MAC address from a string.
- Parse
Modalias Error - An error parsing a
Modalias
from a string. - Service
Id - Opaque identifier for a GATT service on a Bluetooth device.
- Service
Info - Information about a GATT service on a Bluetooth device.
- Write
Options - A set of options for a characteristic write operation.
Enums§
- Adapter
Event - Details of an event related to a Bluetooth adapter.
- Address
Type - MAC address type of a Bluetooth device.
- Bluetooth
Error - An error carrying out a Bluetooth operation.
- Bluetooth
Event - An event relating to a Bluetooth device or adapter.
- Characteristic
Event - Details of an event related to a GATT characteristic.
- Device
Event - Details of an event related to a Bluetooth device.
- Spawn
Error - Error type for futures representing tasks spawned by this crate.
- Transport
- The type of transport to use for a scan.
- Write
Type - The type of write operation to use.
Traits§
- BleUuid
- An extension trait for
Uuid
which provides BLE-specific methods.
Functions§
- uuid_
from_ u16 - Convert a 16-bit BLE short UUID to a full 128-bit UUID by filling in the standard Bluetooth Base UUID.
- uuid_
from_ u32 - Convert a 32-bit BLE short UUID to a full 128-bit UUID by filling in the standard Bluetooth Base UUID.