[][src]Crate btle

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

Modules

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)

channel
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.

uuid

Universally Unique Identifiers or UUIDs.

Structs

BTAddress

Bluetooth Address. 6 bytes long.

CompanyID

16-bit Bluetooth Company Identifier. Companies are assigned unique Company Identifiers to Bluetooth SIG members requesting them. See here for more

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

AddressType
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.