diff --git a/src/controllerSoftware/run.py b/src/controllerSoftware/run.py index 36f22fb..3e4393f 100644 --- a/src/controllerSoftware/run.py +++ b/src/controllerSoftware/run.py @@ -75,7 +75,7 @@ async def connect_to_ble_device(device_name): else: print(f"Failed to connect to {target_device.name}") exit(1) - services = client.services + services = sorted(client.services, key=lambda serv: serv.handle) print("\n--- Services and Characteristics ---") for service in services: print(f"\nService: {service.uuid} (Handle: {service.handle}) - {service.description}")