Skip to main content

Crate android_ble

Crate android_ble 

Source
Expand description

Android Bluetooth API wrapper, currently supporting BLE client role operations.

Version 0.1.x of this crate is supposed to be API-compatible with version 0.6.x of bluest library. Anything incompatible with bluest in the API may be reported as a bug.

This crate uses ndk_context::AndroidContext, which is automatically initialized by android_activity. The basic Android test template is provided in the crate page.

Re-exports§

pub use btuuid::BluetoothUuidExt;
pub use error::Error;

Modules§

btuuid
Uuid extensions for Bluetooth UUIDs.
error
Defines error types.

Structs§

Adapter
The system’s Bluetooth adapter interface.
AdapterConfig
Configuration for creating an interface to the default Bluetooth adapter of the system.
AdvertisementData
Data included in a Bluetooth advertisement or scan reponse.
AdvertisingDevice
Represents a device discovered during a scan operation.
Characteristic
A Bluetooth GATT characteristic.
CharacteristicProperties
GATT characteristic properties as defined in the Bluetooth Core Specification, Vol 3, Part G, §3.3.1.1.
Descriptor
A Bluetooth GATT descriptor.
Device
A Bluetooth LE device.
DeviceId
A platform-specific device identifier. On Android it contains the Bluetooth address in the format AB:CD:EF:01:23:45.
L2capChannel
A Bluetooth LE L2CAP Connection-oriented Channel (CoC).
L2capChannelReader
Reader half of a L2CAP Connection-oriented Channel (CoC).
L2capChannelWriter
Writer half of a L2CAP Connection-oriented Channel (CoC).
ManufacturerData
Manufacturer specific data included in Bluetooth advertisements.
Service
A Bluetooth GATT service.
ServicesChanged
A services changed notification.
Uuid
A Universally Unique Identifier (UUID).

Enums§

AdapterEvent
Events generated by Adapter::events.
ConnectionEvent
Events generated by Adapter::device_connection_events.

Type Aliases§

Result
Convenience alias for a result with Error.