support icon indicating copy to clipboard operation
support copied to clipboard

[Bug] after "pybricksdev run ble", hub cannot be stopped or reconnected to

Open abliss opened this issue 2 months ago • 1 comments

Describe the bug If I run "pybricks run ble test.py" where test.py is something that never ends, like while True: pass, then there seems to be no way to recover control of the hub. If I hit control-c to kill pybricksdev, I cannot reconnect; the hub no longer advertises any BLE endpoints so the connection times out.

To reproduce

  1. write a neverending script in test.py
  2. pybricksdev run ble test.py on a Spike Prime Hub.

Expected behavior There should be some way to stop the hub without pushing its button. In the code.pybricks.com frontend, there's a "stop" button which works. Maybe pybricksdev should capture SIGINT and terminate the hub program before stopping the pybricksdev script? Or, once the pybricksdev program has stopped, is there any other way to restore the bluetooth connection while the hub is still running a user program?

abliss avatar Nov 04 '25 14:11 abliss