blatted/blatted/tools/ble/monitor.py

19 lines
426 B
Python

import asyncio
import bleak.exc
from bleak import BleakClient, BleakGATTCharacteristic
from hexdump import hexdump
from icecream import ic
async def monitor_services(filter: list[str] = []):
await asyncio.sleep(0.1)
def run(uuid_filter: list[str] = []):
print("monitor called")
try:
asyncio.run(monitor_services(uuid_filter))
except bleak.exc.BleakDBusError as exc:
print(f"ERROR: {exc}")