2023-05-16 23:07:58 +02:00
|
|
|
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] = []):
|
2023-05-18 19:23:56 +02:00
|
|
|
await asyncio.sleep(0.1)
|
2023-05-16 23:07:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
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}")
|