or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/bleak@1.1.x
tile.json

tessl/pypi-bleak

tessl install tessl/pypi-bleak@1.1.0

Cross-platform Bluetooth Low Energy GATT client library for asynchronous BLE communication

Agent Success

Agent success rate when using this tile

97%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.07x

Baseline

Agent success rate without this tile

91%

task.mdevals/scenario-10/

BLE Descriptor Configuration Tool

A command-line tool for configuring BLE device characteristics by writing to their descriptors.

Capabilities

Enable Notifications via Descriptor

Connect to a BLE device and enable notifications on a characteristic by writing the appropriate value to its Client Characteristic Configuration Descriptor (CCCD).

  • Given a BLE device address "AA:BB:CC:DD:EE:FF" and characteristic UUID "12345678-1234-5678-1234-56789abcdef0", the tool connects to the device and writes the value b'\x01\x00' to the CCCD to enable notifications @test
  • Given a BLE device address and characteristic UUID, if the characteristic has no CCCD, the tool handles the error gracefully @test

Disable Notifications via Descriptor

Connect to a BLE device and disable notifications on a characteristic by writing to its CCCD.

  • Given a connected BLE device and characteristic UUID "12345678-1234-5678-1234-56789abcdef0", the tool writes the value b'\x00\x00' to the CCCD to disable notifications @test

Implementation

@generates

API

async def enable_notifications(device_address: str, characteristic_uuid: str) -> None:
    """
    Connect to a BLE device and enable notifications on a characteristic
    by writing to its Client Characteristic Configuration Descriptor.

    Args:
        device_address: The Bluetooth address of the target device
        characteristic_uuid: The UUID of the characteristic to enable notifications for

    Raises:
        ValueError: If the characteristic does not have a CCCD
        BleakError: If connection or write operation fails
    """

async def disable_notifications(device_address: str, characteristic_uuid: str) -> None:
    """
    Connect to a BLE device and disable notifications on a characteristic
    by writing to its Client Characteristic Configuration Descriptor.

    Args:
        device_address: The Bluetooth address of the target device
        characteristic_uuid: The UUID of the characteristic to disable notifications for

    Raises:
        ValueError: If the characteristic does not have a CCCD
        BleakError: If connection or write operation fails
    """

Dependencies { .dependencies }

bleak { .dependency }

Provides Bluetooth Low Energy client functionality for connecting to devices and writing to GATT descriptors.

@satisfied-by