bleak package

Subpackages

Submodules

bleak.assigned_numbers module

Bluetooth Assigned Numbers

This module contains useful assigned numbers from the Bluetooth spec.

See <https://www.bluetooth.com/specifications/assigned-numbers/>.

class bleak.assigned_numbers.AdvertisementDataType(value)[source]

Bases: enum.IntEnum

Generic Access Profile advertisement data types.

Source <https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Generic%20Access%20Profile.pdf>.

CLASS_OF_DEVICE = 13
COMPLETE_LIST_SERVICE_UUID128 = 7
COMPLETE_LIST_SERVICE_UUID16 = 3
COMPLETE_LIST_SERVICE_UUID32 = 5
COMPLETE_LOCAL_NAME = 9
FLAGS = 1
INCOMPLETE_LIST_SERVICE_UUID128 = 6
INCOMPLETE_LIST_SERVICE_UUID16 = 2
INCOMPLETE_LIST_SERVICE_UUID32 = 4
MANUFACTURER_SPECIFIC_DATA = 255
SERVICE_DATA_UUID128 = 33
SERVICE_DATA_UUID16 = 22
SERVICE_DATA_UUID32 = 32
SHORTENED_LOCAL_NAME = 8
TX_POWER_LEVEL = 10

bleak.exc module

exception bleak.exc.BleakDBusError(dbus_error: str, error_body: list)[source]

Bases: bleak.exc.BleakError

Specialized exception type for D-Bus errors.

property dbus_error: str

Gets the D-Bus error name, e.g. org.freedesktop.DBus.Error.UnknownObject.

property dbus_error_details: Optional[str]

Gets the optional D-Bus error details, e.g. ‘Invalid UUID’.

exception bleak.exc.BleakError[source]

Bases: Exception

Base Exception for bleak.

bleak.uuids module

bleak.uuids.register_uuids(uuids_to_descriptions: Dict[str, str]) None[source]

Add or modify the mapping of 128-bit UUIDs for services and characteristics to descriptions.

Parameters

uuids_to_descriptions – A dictionary of new mappings

bleak.uuids.uuidstr_to_str(uuid_)[source]

Module contents

Top-level package for bleak.

bleak.cli()[source]