[][src]Crate btle

Generic BLE driver targeting mostly Bluetooth Advertisements. Implements the HCI layer.

Modules

asyncs

Async primitives wrappers/reexports for (Mutex, mpsc, RwLock, task::spawn). Just wrappers around which ever async library is available (tokio, async-std, embedded, etc).

bytes

Byte buffer, packing and unpacking utilities. Provides traits for genericly packing types into different endian byte buffers (ToFromBytesEndian) and for storing bytes/copy-types (Storage)

error

Generic Error Trait. Similar to std::error::Error.

hci

HCI Layer (where most the magic happens). Implements a Bluetooth Adapter for any controller supporting HCI streams. (HCI Layer is Little Endian).

le
uri

Bluetooth URI type. According to Bluetooth Assigned Numbers.

Structs

BTAddress

Bluetooth Address. 6 bytes long.

ConversionError

Basic ConversionError for when primitives can't be converted to/from bytes because of invalid states. Most modules use their own errors for when there is more information to report.

MilliDBM

Stores milli-dBm. So -100 dBm is = RSSI(-100_000) 0 dBm = RSSI(0) 10.05 dBm = RSSI(10_050)

RSSI

Received Signal Strength Indicator (RSSI). Units: dBm. Range -127 dBm to +20 dBm. Defaults to 0 dBm.

Enums

PackError

Byte Packing/Unpacking error. Usually used for packing/unpacking a struct/type into/from a byte buffer.

Constants

BT_ADDRESS_LEN

Bluetooth address length (6 bytes)

Type Definitions

BoxFuture

Workaround for returning futures from async Traits.

BoxStream

Workaround for returning streams from async Traits.