diff --git a/api/ble.py b/api/ble.py index 6b07b1b..50c385e 100644 --- a/api/ble.py +++ b/api/ble.py @@ -236,7 +236,7 @@ def read_data_sync(mac: str) -> Optional[SensorReading]: def reset_adapter(big_reset = False): log.info("Restting BT Adapter...") if big_reset: - log.wwarning("Doing big reset:") + log.warning("Doing big reset - USB ID {current_usb_id}") log.info(subprocess.run(["usbreset", current_usb_id], capture_output=True, text=True, check=True).stdout.strip()) time.sleep(2) else: @@ -354,6 +354,7 @@ if __name__ == "__main__": if usb_id in bt_usb_ids: current_usb_id = usb_id log.info(f"BLE USB ID Detected: {current_usb_id}") + reset_adapter(big_reset=True) test_count = 0 test_results = [] log.info(f"Starting BLE Test for {count} iterations")