Cross-platform Bluetooth Low Energy GATT client library for asynchronous BLE communication
Overall
score
97%
Build a utility that analyzes BLE device characteristics and reports their supported operations.
Create a module that connects to a BLE device and analyzes all characteristics across all services to determine which operations each characteristic supports. The module should produce a structured report showing which characteristics support reading, writing (with or without response), notifications, indications, and other operations.
Your solution should:
The analyzer should return a dictionary with this structure:
{
"device_address": "AA:BB:CC:DD:EE:FF",
"characteristics": {
"readable": [
{"service_uuid": "0000180f-...", "char_uuid": "00002a19-..."},
...
],
"writable": [...],
"writable_without_response": [...],
"notifiable": [...],
"indicatable": [...]
}
}@generates
async def analyze_characteristics(device_address: str) -> dict:
"""
Analyze a BLE device's characteristics and categorize them by supported operations.
Args:
device_address: The Bluetooth address of the device to analyze
Returns:
A dictionary containing the device address and categorized characteristics
Raises:
Exception: If unable to connect to the device or discover services
"""
passProvides BLE client functionality for connecting to devices, discovering services and characteristics, and inspecting characteristic properties.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-bleakdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9