tessl install tessl/pypi-bleak@1.1.0Cross-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%
A utility module for managing Bluetooth Low Energy device connections with proper connection lifecycle management, including connection status tracking and graceful disconnection.
@generates
from bleak import BleakClient
class BLEConnectionManager:
"""Manages BLE device connections with proper lifecycle handling."""
def __init__(self, device_address: str):
"""
Initialize the BLE connection manager.
Args:
device_address: Bluetooth address of the device to connect to
"""
pass
async def connect(self) -> None:
"""
Connect to the BLE device.
Raises:
Exception: If connection fails
"""
pass
async def disconnect(self) -> None:
"""
Disconnect from the BLE device if connected.
"""
pass
def is_connected(self) -> bool:
"""
Check if currently connected to the device.
Returns:
True if connected, False otherwise
"""
pass
async def __aenter__(self):
"""Async context manager entry - connects to device."""
pass
async def __aexit__(self, exc_type, exc_val, exc_tb):
"""Async context manager exit - disconnects from device."""
passProvides Bluetooth Low Energy GATT client functionality for connecting to and communicating with BLE devices.
@satisfied-by