Skip to content

Commit

Permalink
[tcat] fix: use normalize_uuid_str() on BBTC_SERVICE_UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
jaul-nsc committed Oct 15, 2024
1 parent 7ec2c31 commit 1481b66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/tcat_ble_client/ble/ble_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

from bleak import BleakScanner
from bleak.backends.device import BLEDevice
from bleak.uuids import normalize_uuid_str
from bbtc import BBTC_SERVICE_UUID
from typing import Optional

Expand All @@ -47,8 +48,9 @@ async def find_first_by_mac(mac):
async def scan_tcat_devices(adapter: Optional[str] = None):
scanner = BleakScanner()
tcat_devices: list[BLEDevice] = []
service_uuids = [normalize_uuid_str(BBTC_SERVICE_UUID)]
discovered_devices = await scanner.discover(return_adv=True,
service_uuids=[BBTC_SERVICE_UUID.lower()],
service_uuids=service_uuids,
adapter=adapter)
for _, (device, _) in discovered_devices.items():
tcat_devices.append(device)
Expand Down

0 comments on commit 1481b66

Please sign in to comment.