Re-sorted service list to ensure correct processing order
This commit is contained in:
parent
54a02ad149
commit
2aaffd8ba1
@ -75,7 +75,7 @@ async def connect_to_ble_device(device_name):
|
|||||||
else:
|
else:
|
||||||
print(f"Failed to connect to {target_device.name}")
|
print(f"Failed to connect to {target_device.name}")
|
||||||
exit(1)
|
exit(1)
|
||||||
services = client.services
|
services = sorted(client.services, key=lambda serv: serv.handle)
|
||||||
print("\n--- Services and Characteristics ---")
|
print("\n--- Services and Characteristics ---")
|
||||||
for service in services:
|
for service in services:
|
||||||
print(f"\nService: {service.uuid} (Handle: {service.handle}) - {service.description}")
|
print(f"\nService: {service.uuid} (Handle: {service.handle}) - {service.description}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user