You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large Angular Motor 45602 causes Technic Hub (88012) to disconnect or crash when initialized on Pybricks 3.6.1 #2395
When attempting to initialize or run a SPIKE Large Angular Motor (45602) on a Technic Hub (88012) running Pybricks firmware v3.6.1, the hub immediately drops the Bluetooth connection and becomes unresponsive. I have tried 2 different motors on all 4 ports.
The same 2 motors work normally on a SPIKE Prime Hub with the same Pybricks version. Additionally, other sensors such as the color and distance sensor, work as expected on the Technic Hub, so it seems that only the motors are having difficulties with Pybricks.
With the following program, the hub connects to Bluetooth, prints "Initializing motor...", then pauses, disconnects from bluetooth, and stalls.
frompybricks.hubsimportTechnicHubfrompybricks.pupdevicesimportMotorfrompybricks.parametersimportPort# Initialize the hubhub=TechnicHub()
# Initialize the Large Angular Motor (45602) on Port Dmotor=Motor(Port.D)
print("Motor initialized successfully.")
# Run the motor forward for 3 secondsmotor.run_time(500, 3000, then=Stop.HOLD)
# Now run it backward for 3 secondsmotor.run_time(-500, 3000, then=Stop.HOLD)
# Print to show it is doneprint("Motor run successfully.")
I expected the motor to turn forward and backward and print messages, but the program froze during motor initialization and dropped the Bluetooth connection so no print statements were reached. I have tried all 4 ports on the technic hub with no success. I have also tried multiple programs that operate with the motor initialization line commented out, but fail as soon as I uncomment the motor initialization line. I have verified that the motors work normally on Spike Prime hub and that sensors (distance, color) work on the technic hub. The only problem seems to be the large angular motors.
Will do. Thank you.
Just did. Even worse results. Now the motors are not even recognized by the firmware in the latest nightly build, with an error message stating that no device was connected to the target port.
Motor initialized successfully.
Traceback (most recent call last):
File "issue_2395_orig.py", line 13, in <module>
NameError: name 'Stop' isn't defined
[EDIT}
Tested with ('technichub', '4.0.0a0', 'ci-build-4272-v3.6.1-523-g4cc72417 on 2025-10-07')
and ('technichub', '3.6.1', 'ci-build-3937-v3.6.1-231-gd76f61ae on 2025-07-11')
I would say that printing an error message is better than losing the Bluetooth connection because the hub crashed. 😄
Other than using a logic analyzer to spy on the signal or building a special debug build of the firmware, I'm not sure how we could debug the motors any more though. Since you said that they work fine on other hubs and other sensors work fine on this hub, it kind of rules out any hardware issues.
I ran your program on my Technichub and it runs fine until the syntax error on the last line
motor.stop(Stop.HOLD)
motor.stop() has no arguments.
But the program shows GREEN, WHITE and RED with a large Spike motor on Port B.
Do you see any messages in the log area below the python code?
I got:
Beginning...
Traceback (most recent call last):
File "issue_2395_test2.py", line 18, in <module>
TypeError: function takes 1 positional arguments but 2 were given
No, no messages other than the printed "Beginning..." text before hub
init. It just freezes on green and is silent.
Looks like a different behavior. than what you are seeing.
Just to be clear, I switched back to the stable version of
Pybricks (removed the latest nightly build that wouldn't recognize that the
motor was even connected to the port).
I thought I eliminated the hardware error possibility by verifying that the
motors run on both:
- the technic hub running LEGO firmware
- the spike prime hub running LEGO firmware,
and that other devices (2 sensors) work on the Technic Hub (running
Pybricks) on the same ports I had the motors connected to. So in my mind,
the motors and the ports seem like they should be fine.
But I am not sure what else to do if a similar setup seems to be working
fine for you.
I really appreciate your time on this. Thanks for trying to help me figure
this out.
And the probability that both new motors have a similar hardware problem
seems pretty small.
On Mon, Oct 13, 2025 at 4:33 PM Kelly Pennock ***@***.***>
wrote:
I thought I eliminated the hardware error possibility by verifying that
the motors run on both:
- the technic hub running LEGO firmware
- the spike prime hub running LEGO firmware,
and that other devices (2 sensors) work on the Technic Hub (running
Pybricks) on the same ports I had the motors connected to. So in my mind,
the motors and the ports seem like they should be fine.
But I am not sure what else to do if a similar setup seems to be working
fine for you.
I really appreciate your time on this. Thanks for trying to help me
figure this out.
On Mon, Oct 13, 2025 at 4:18 PM Bert ***@***.***> wrote:
> *BertLindeman* left a comment (pybricks/support#2395)
> <#2395 (comment)>
>
> Thanks for your response.
>
> My tests ran with stable 3.6.1 and a 4.0 pre-alpa firmware with out
> problem.
> Tried two different hubs too.
>
> In no way am I a hardware technician.
> But could this have to do with a bad contact or cable problem?
> Hard to proove though.
>
> —
> Reply to this email directly, view it on GitHub
> <#2395 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACHGF74KAGRJHGTEK2JRQ5T3XQJLHAVCNFSM6AAAAACJCCYDL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOJZGA4TQOBXG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
It is here Laurens!
See the second line from the end (a comment indeed).
Hence I was wondering...
Feel free to delete my posts if you feel so. Sorry to deviate from the topic.
Comparing the results might help us determine the difference and possibly fix what is going on.
Thanks.
I tried loading the new build (technichub-firmware-build-4293-git73e88dd9.zip) on the Technic. I began loading it 3 times, and all 3 times it failed at about the 68% mark with the same message: "The hub said something went wrong".
I don't have access to the Spike Prime Hub at the moment, so cannot the build to that one.
The first set of batteries were newish (1 week of use). I installed brand
new batteries anyway, and checked them before use, All were strongly green.
I tried loading firmware from the Pybricks desktop app (on Mac) first, but
ended up with the same result (71% mark before the same failure message).
I then tried loading the new firmware build from the web app and failed
much more quickly.
Finally, I tried reinstalling the lego firmware and it loaded with no
problems.
End result, couldn't load the firmware
(technichub-firmware-build-4293-git73e88dd9.zip).
And finally, and possibly strangest of all, I cannot even load a stable version of Pybricks without it now failing in the same way (drops the connection part way through the load). But when loading the current stable version of Pybricks fails, I have no problem, once again, reloading the Lego firmware on the same device. Bizarre.
Can I help provide any logs or debugging? I have the same problem with the large motor and it's causing issues for our school teams. We have technic hubs and Prime Essential hubs. Both hubs freeze when trying to use the large angular motor. Running the same motors with official Lego firmware works OK. I have 4 different motors and multiple hubs, and all show same issue.
Thank you. When it freezes, does the square running animation on the display keep going or does it turn off altogether?
Assuming the animation keeps spinning --- if you pull the motor cable out in this state, does it then raise the expected error about cabled being not connected? Does the line number of the error correspond to the Motor(Port.....) line?
Yes, I think we can make a firmware variant that will print out helpful information. Thank you for offering to help. With the questions above I'm hoping to close in on what we should be logging exactly.
Thank you. When it freezes, does the square running animation on the display keep going or does it turn off altogether?
For display, there is no animation on the essential hubs, just the blinking led, which in this case goes to pulsating blue, which is not normal.
Assuming the animation keeps spinning --- if you pull the motor cable out in this state, does it then raise the expected error about cabled being not connected? Does the line number of the error correspond to the Motor(Port.....) line?
My test file will hang when trying to initialize, with pulsing blue light on the hub. If I pull the cable while it's in this state, it does throw an error
pybricksdev run ble ./test-large-angular-motor-spike-essential.py
Searching for any hub with Pybricks service...
100%|████████████████████████████████████████████████████████████████████| 430/430 [00:00<00:00, 1.88kB/s]
Initializing motor
exception: [Errno 19] ENODEV:
A sensor or motor is not connected to the specified port:
--> Check the cables to each motor and sensor.
--> Check the port settings in your script.
--> Check the line in your script that matches
the line number given in the 'Traceback' above.
The test file is like:
from pybricks.hubs import EssentialHub
from pybricks.parameters import Axis, Direction, Port, Stop
from pybricks.pupdevices import Motor
hub = EssentialHub()
print('Initializing motor')
big_motor = Motor(Port.B)
print('Motor initialized')
big_motor.run_angle(100, 45)
big_motor.run_angle(100, -45)
Thank you. That means the hub is OK. It sounds like this motor variant is sending some information that the hub is not expecting. I'll try to put together some test code to log the differences.
Since you're using Technic Hubs and Essential Hubs, are you using the dark grey Large Angular Motor from a Technic set or are the motors from elsewhere?
Ah. Off brand manufacturers tend to not implement the full device protocol. There are a few requests for supporting this. We may get around to this eventually but our priority lies with the original devices.
I think this thread was indicating a different issue for original motors.
Activity
dlech commentedon Oct 13, 2025
This sounds like something is causing the hub to crash. I'm not sure what it could be though since most of the firmware code is shared between hubs.
You could try running the nightly build of the firmware to see if the issue has already been fixed.
https://nightly.link/pybricks/pybricks-micropython/workflows/build/master
kpennock commentedon Oct 13, 2025
Will do. Thank you.
Just did. Even worse results. Now the motors are not even recognized by the firmware in the latest nightly build, with an error message stating that no device was connected to the target port.
BertLindeman commentedon Oct 13, 2025
Did you also try to define Stop like this:
I get this error without it:
[EDIT}
Tested with
('technichub', '4.0.0a0', 'ci-build-4272-v3.6.1-523-g4cc72417 on 2025-10-07')and
('technichub', '3.6.1', 'ci-build-3937-v3.6.1-231-gd76f61ae on 2025-07-11')dlech commentedon Oct 13, 2025
I would say that printing an error message is better than losing the Bluetooth connection because the hub crashed. 😄
Other than using a logic analyzer to spy on the signal or building a special debug build of the firmware, I'm not sure how we could debug the motors any more though. Since you said that they work fine on other hubs and other sensors work fine on this hub, it kind of rules out any hardware issues.
kpennock commentedon Oct 13, 2025
I included Stop this time:
The code never gets to the Color.White. It just freezes on Green, never making it past the motor instantiation.
kpennock commentedon Oct 13, 2025
BertLindeman commentedon Oct 13, 2025
I ran your program on my Technichub and it runs fine until the syntax error on the last line
motor.stop()has no arguments.But the program shows GREEN, WHITE and RED with a large Spike motor on Port B.
Do you see any messages in the log area below the python code?
I got:
kpennock commentedon Oct 13, 2025
BertLindeman commentedon Oct 13, 2025
Thanks for your response.
My tests ran with stable 3.6.1 and a 4.0 pre-alpa firmware with out problem.
Tried two different hubs too.
In no way am I a hardware technician.
But could this have to do with a bad contact or cable problem?
Hard to proove though.
kpennock commentedon Oct 13, 2025
kpennock commentedon Oct 13, 2025
BertLindeman commentedon Oct 13, 2025
I agree and have no more hints at the moment.
kpennock commentedon Oct 13, 2025
BertLindeman commentedon Oct 14, 2025
Just a hunch: what if the batteries are at the end of their live?
A motor needs more power than a sensor.
Adjusted your program to show the battery voltage:
My output looks like this at the moment:
You see that the voltage after 2 seconds motor run drops by half a volt.
Quite a lot.
Maybe this shows us something?
What if you turn the motor slower e.g. 100 in stead of 500?
6 remaining items
TechnicBRICKs commentedon Oct 14, 2025
It is here Laurens!
See the second line from the end (a comment indeed).
Hence I was wondering...
Feel free to delete my posts if you feel so. Sorry to deviate from the topic.
kpennock commentedon Oct 14, 2025
Sorry. The beep wasn't actually encoded, just included it as a mistaken comment. Used a print instead to show completion/lack thereof.
laurensvalk commentedon Oct 14, 2025
No worries, it's all good. Hopefully we can figure out what's up with these motors 😄
It's possible that slight manufacturing variations/changes could cause this, and maybe we can update the code to account for it.
kpennock commentedon Oct 14, 2025
Thanks.
I tried loading the new build (technichub-firmware-build-4293-git73e88dd9.zip) on the Technic. I began loading it 3 times, and all 3 times it failed at about the 68% mark with the same message: "The hub said something went wrong".
I don't have access to the Spike Prime Hub at the moment, so cannot the build to that one.
laurensvalk commentedon Oct 14, 2025
That's quite an unusual one, since the firmware update process hasn't changed in any way. Is it possible that the hub batteries are very low?
kpennock commentedon Oct 14, 2025
joshhiggins22 commentedon Dec 16, 2025
Can I help provide any logs or debugging? I have the same problem with the large motor and it's causing issues for our school teams. We have technic hubs and Prime Essential hubs. Both hubs freeze when trying to use the large angular motor. Running the same motors with official Lego firmware works OK. I have 4 different motors and multiple hubs, and all show same issue.
laurensvalk commentedon Dec 16, 2025
Thank you. When it freezes, does the square running animation on the display keep going or does it turn off altogether?
Assuming the animation keeps spinning --- if you pull the motor cable out in this state, does it then raise the expected error about cabled being not connected? Does the line number of the error correspond to the
Motor(Port.....)line?Yes, I think we can make a firmware variant that will print out helpful information. Thank you for offering to help. With the questions above I'm hoping to close in on what we should be logging exactly.
joshhiggins22 commentedon Dec 16, 2025
For display, there is no animation on the essential hubs, just the blinking led, which in this case goes to pulsating blue, which is not normal.
The test file is like:
laurensvalk commentedon Dec 16, 2025
Thank you. That means the hub is OK. It sounds like this motor variant is sending some information that the hub is not expecting. I'll try to put together some test code to log the differences.
Since you're using Technic Hubs and Essential Hubs, are you using the dark grey Large Angular Motor from a Technic set or are the motors from elsewhere?
joshhiggins22 commentedon Dec 16, 2025
The motors I'm using are AliExpress versions of this LEGO Technic Large Angular Motor 45602
I realize AliExpress may be a non-standard motor, but they seem to work fine with Lego firmware.
laurensvalk commentedon Dec 16, 2025
Ah. Off brand manufacturers tend to not implement the full device protocol. There are a few requests for supporting this. We may get around to this eventually but our priority lies with the original devices.
I think this thread was indicating a different issue for original motors.
dlech commentedon Dec 16, 2025
We also have #2305 for tracking that. So if you do some logging, please share it there to help us keep things organized.