-
Notifications
You must be signed in to change notification settings - Fork 59
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
Devices not connecting to Duplo Base #185
Comments
Unfortunately I do not have a Duplo hub. Can you share the log you get with your script? Activating additional debug logging like
or in windows powershell
might be helpful and also the version of node-poweredup and |
I am running it on a Raspberry Pi 5. Node version v18.20.2 I don't have any other HUBS to test with. I did try an online script a few weeks ago that used node-poweredup that managed to control my Duplo Train; though I cannot seem to find it back to troubleshoot. This is the output of the debug Will try to manual attach function now Edit: the manualAttach function works like a charm for the motor! Probably still worth digging into it more to figure out why the default behavior isn't working |
Thank you for sharing the logs. Your hub does not send Hub Attached I/O messages. Maybe they get lost somwhere, Duplo Train never did or you have a new firmware version? For my TechnicHub it looks like this, note the received messages starting with
At the end of your log there is a https://lego.github.io/lego-ble-wireless-protocol-docs/#action-types "Hub Will Switch Off" out of nowhere, followed by a connection attempt, I guess it was shut-down by pressing the button and has nothing to do with this issue. |
Thanks for helping me here. The "hub will switch off" comes indeed from a button press. After further experimentation I can't get the HUB_LED or the SPEAKER to work, even if I manually attach them. I don't really get any (decipherable) error messages neither. Any further debugging I could do? |
@pdekeulenaer Were you able to solve the problem? If I had to take a guess I would say https://github.com/abandonware/noble has an issue with the bluetooth stack of the raspberry pi 5. Things you could do:
Maybe @alin256 or @nathankellenicki have a duplo hub and can help? |
@Debenben, I only tried it with Mac OS, but it worked well with the Duplo hub after some updates (it was a while ago and I do not recall what solved the previous issues.) Please check my fork where I played with Duplo Hub and see if it helps. Unfortunately, I did not find time to finish it and create a PR. |
I managed to get it to work in the end, just had to figure out the correct port to send the command to. As I couldn't discover the services, it took a bit of digging into some other libraries but ended up with the right config (port 0 for motor, 1 for sound, 17 for light). With these I got my solution to work. I'll see if I can try the fork to see if this resolves it more structuraly |
Hi,
I am trying to get this library to work with my son's Duplo HUB. It seems to detect and connect to the hub just fine, but I never manage to detect the motor, or any other device.
I've done some debugging and best I can tell the hub simply doesn't have any attached devices.
The motor promise never resolves unfortunately. I found an old related issue that said to stop the scanning but that does not seem to fix my issue neither.
When I inspect the output of console.log(hub) I see that the attachedDevices array is empty. Similarly, when I print the content of devices, it's an empty list.
How do I get them to attach?
The text was updated successfully, but these errors were encountered: