Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technic Hub can get stuck during shutdown #814

Closed
laurensvalk opened this issue Nov 26, 2022 · 7 comments · Fixed by pybricks/pybricks-micropython#129
Closed

Technic Hub can get stuck during shutdown #814

laurensvalk opened this issue Nov 26, 2022 · 7 comments · Fixed by pybricks/pybricks-micropython#129
Labels
bug Something isn't working hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) topic: bluetooth Issues involving bluetooth

Comments

@laurensvalk
Copy link
Member

The Technic Hub can get stuck during power off.

This appears to happen when trying to shut down the hub when a Bluetooth task within a program is busy.

Originally posted by @laurensvalk in #600 (comment)

@laurensvalk
Copy link
Member Author

shutdownloop.mp4

@laurensvalk laurensvalk added bug Something isn't working hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) labels Nov 26, 2022
@laurensvalk
Copy link
Member Author

I have a hunch we are hitting something like this: #567, which prevents the program from ending, and thus preventing poweroff.

@laurensvalk
Copy link
Member Author

See also the problem section in #802

@laurensvalk
Copy link
Member Author

I was able to reproduce this several times (but not always) under the following conditions:

  • Laptop scanning for hubs in Pybricks Beta
  • Workstation scanning for hubs in Pybricks Beta
  • They were about 3 meters apart
  • A Prime Hub, an Inventor Hub, a Move Hub, and a Technic Hub all advertising
  • Connect to the Technic Hub and run this program.

Sometimes it works, sometimes it does not. You can tell that it happens when the remote is off but the hub keeps running without hitting the timeout.

Turning off then will trigger this.

@dlech dlech added the topic: bluetooth Issues involving bluetooth label Nov 26, 2022
@pbochynski
Copy link

pbochynski commented Nov 26, 2022

I just had the same issue 10 minutes ago. Had to cut the power off to get rid of the blue flashlight.
Laptop with pybrics beta, technic hub and one remote.

@laurensvalk
Copy link
Member Author

laurensvalk commented Nov 27, 2022

Was this in a program doing something with Bluetooth, like the remote or broadcasting/scanning? Edit, I see your edit now :)

@pbochynski
Copy link

It happened only once to me. I do not remember exactly if it was during scanning or remote was already connected. Next time I will note it down, but I did a lot of experiments with remote trying to fix #813, and I couldn't reproduce it.

laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Dec 7, 2022
Fixes pybricks/support#814 so the user can at
least turn the hub off without removing the batteries.
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Dec 8, 2022
Fixes pybricks/support#814 so the user can at
least turn the hub off without removing the batteries.
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Dec 8, 2022
Fixes pybricks/support#814 so the user can at
least turn the hub off without removing the batteries.
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Dec 8, 2022
Fixes pybricks/support#814 so the user can at
least turn the hub off without removing the batteries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) topic: bluetooth Issues involving bluetooth
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants