Skip to content

[Bug] City Hub Locks Up with Bluetooth and Peripheral Combinations (Firmware 4.0.1, Windows) #2793

Open

Description

@SML365

Describe the bug
After shutting down the City Hub, it enters an unresponsive state. Holding the power button causes the status light to strobe at around 10hz. After that, the only way to exit out of this state is to remove and reinsert the batteries.

As far as I know, this can only be reproduced if the PU Train Motor is plugged into Port A, and the PU Light is plugged into Port B.

To reproduce
Steps to reproduce the behavior:

  1. Firmware Version: 4.0.1 (Flashed from Pybricks Code website), Hub Type: City Hub
  2. Plug the Powered Up Train Motor (Part #88011) into Port A
  3. Plug the Powered Up Light (Part #88005) into Port B
  4. Run a program (I used a simplified version of the program that was triggering the lockup, which had all of these components in it):
# MAKE SURE THE MOTOR IS IN PORT "A" AND THE LIGHT IS IN PORT "B" 
from pybricks.hubs import CityHub
from pybricks.pupdevices import Remote
from pybricks.tools import wait

hub = CityHub()
remote = Remote()
hub.system.set_stop_button(None)

wait(1000)

remote.disconnect()
wait(1000)
raise SystemExit
  1. Power off the hub by holding the power button for 3 seconds
  2. The hub should now have no light on. It should not respond to button presses. Long press the button on the hub, and it will now start strobing blue and it will be completely unresponsive.
  3. Remove the batteries from the hub, and reinsert them. The hub should now work normally.
  4. I have also tested this exact procedure on the Technic Hub and everything seemed to work fine. There was no strobing or unresponsiveness.

Expected behavior
I'd expect the hub to shut down and power back on normally without locking up and requiring a battery swap.

Screenshots
N/A for this issue.

Activity

  1. added
    triageIssues that have not been triaged yet
    on Aug 23, 2026
  2. BertLindeman commented on Aug 23, 2026

    @BertLindeman

    There is no Powered Up Train Motor in my inventory, so cannot exactly follow your scenario.

    1. Running cityhub on firmware v4.1.0b2 (flashed from beta.pybricks.com)
    2. On port A: part 26913 Motor, Medium Linear, Powered Up 4 x 6 x 3
    3. On port B: the Powered Up Light
    4. run your program
    5. Power off the hub by long press
    6. hub goes off
    7. press hub button
    8. hub goes on

    No idea if the train motor triggers your problem.
    The program does not setup the motor nor the light, Not sure that the firmware cares if they are connected?

    Have tried this scenario 10 times with PC connection and 10 without PC connection.
    No problem found in my case.
    But as said I have no Train motor.

    Did you try firmware v4.1.0b2 ?

  3. SML365 commented on Aug 23, 2026

    @SML365
    Author

    I wasn't able to trigger the issue on 4.1.0b2. I also tried 10 times with the correct train motor, and I also initialized the pupdevices in the code just in case if that was the underlying problem.

  4. BertLindeman commented on Aug 23, 2026

    @BertLindeman

    I looked at the 4.1.0b2 release notes, and did not find a fix for this, but could well be that a small timing difference in the firmware in 4.1.0b2 is better than in 4.0.1. The cityhub had sometimes poweroff/on problems like this in older releases.

    Thanks for reporting back.

  5. SML365 commented on Aug 23, 2026

    @SML365
    Author

    You're welcome. I'll continue doing a few tests over the course of the next week and I'll comment here in case I find a concrete trigger to this issue.

  6. added and removed
    triageIssues that have not been triaged yet
    on Sep 9, 2026
  7. laurensvalk commented on Oct 8, 2026

    @laurensvalk
    Member

    We've fixed a lot in this driver lately. Would you like to test it with today's https://beta.pybricks.com/? Thanks!

    (Pybricks Beta v3.1.0-beta.8 with firmware v4.1.0b6)

  8. added
    hub: cityhubIssues related to the LEGO Powered Up Smart hub (Hub No. 4)
    on Oct 8, 2026
  9. added theissue type on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked: reproducable case neededThe issue cannot be reliably reproducedhub: cityhubIssues related to the LEGO Powered Up Smart hub (Hub No. 4)software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)topic: bluetoothIssues involving bluetooth

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions