_bleio — Bluetooth Low Energy (BLE) communication

The _bleio module provides necessary low-level functionality for communicating using Bluetooth Low Energy (BLE). The ‘_’ prefix indicates this module is meant for internal use by libraries but not by the end user. Its API may change incompatibly between minor versions of CircuitPython. Please use the adafruit_ble CircuitPython library instead, which builds on _bleio, and provides higher-level convenience functionality, including predefined beacons, clients, servers.

Libraries

_bleio.adapter

BLE Adapter used to manage device discovery and connections. This object is the sole instance of _bleio.Adapter.

class _bleio.BluetoothError(Exception)

Catch all exception for Bluetooth related errors.

class _bleio.ConnectionError(BluetoothError)

Raised when a connection is unavailable.

class _bleio.RoleError(BluetoothError)

Raised when a resource is used as the mismatched role. For example, if a local CCCD is attempted to be set but they can only be set when remote.

class _bleio.SecurityError(BluetoothError)

Raised when a security related error occurs.