question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Try to connect to LEGO HUB

See original GitHub issue

Hi @kawasaki, I have got a LEGO HUB from the LEGO Mindstorms robot inventor set. I am not sure if it should connect aswell using the scratch_link script. Is it compatible with LEGO HUB? I managed to pair the LEGO HUB using bluetoothctl:

pi@raspberrypi:~ $ bluetoothctl
Agent registered
[bluetooth]# devices
Device 38:0B:3C:AD:54:5F LEGO Hub 38:0B:3C:AD:54:5F

Output from scratch_link:

pi@raspberrypi:~ $ /home/pi/.local/bin/scratch_link 
2021-01-03 15:34:12,556 FireFox NSS DB not found. Do not add certificate.
2021-01-03 15:34:12,616 Certificate is ready for Chrome
2021-01-03 15:34:12,659 Started scratch-link
2021-01-03 15:34:17,185 Start session for web socket path: /scratch/bt

But Scratch is not finding the device. (“No devices found”). Is the LEGO HUB equal / compatible to LEGO MINDSTORMS EV3? Thanks for your support 😃 Best regards Andy

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kawasakicommented, Nov 21, 2021

@rasenderhase Thank you for sharing the debug log. Though it does not clarify everything, it is definitely helpful. I found two things from it.

  1. After the first “loop in BT thread” message, I expect the message “in discovery: state”. But it is missing. Session.status may have unexpected value.
  2. While I walked through the debug log, I noticed that my code tweak for LEGO Hub was not enough. I modified the handling of device class returned from the device. On top of that, I needed to modify the device class used for device discovery API.

For these two findings, I made another commit 3cf61a145b3a in the dev branch. It adds more debug print to track session status and discovery work, and add one more code tweak for LEGO Hub.

Can you try the dev branch tip? (I expect that I will need to ask you some more trials based on the results.).

1reaction
kawasakicommented, Nov 11, 2021

@rasenderhase Thank you for the info. LEGO HUB has the device class numbers 8 and 4. I will teak the pyscrlink code to make LEGO Hub pretend to be LEGO EV3 (class numbers 8 and 1), hopefully on next Sunday 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't connect to the Powered Up Hub, but Bluetooth is on.
Press the hub button for five seconds until the light flashes, then release it and let the hub shut off. Start the connection...
Read more >
Trouble connecting lego boost to app via Bluetooth - Reddit
Trouble connecting lego boost to app via Bluetooth · Quit the app completely · Reopen the app · Select the model you want...
Read more >
LEGO Boost won't connect Bluetooth - Ikkaro
1. Turn off Lego Boost Hub. 2. Open the application and select the option to synchronize the Hub. 3. With the Hub off,...
Read more >
Lego Boost app won't connect. What are my options?
removing and reinstalling the batteries from the move hub · as per a guide somewhere on the internet: turning off Bluetooth in the...
Read more >
Hi! Every time I try to connect my Windows 10 PC to the spike ...
According to the HUB manual there should be no bluetooth PIN, but the PC still asks for one. The HUB works fine when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found