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

Windows 10 can't connect to CONTROL+ hub #513

Closed
DanieleBenedettelli opened this issue Oct 20, 2021 · 15 comments
Closed

Windows 10 can't connect to CONTROL+ hub #513

DanieleBenedettelli opened this issue Oct 20, 2021 · 15 comments
Labels
bug Something isn't working close-me If there is no new activity on the issue, it will be closed after a few months. OS: Windows 10 Issues that only occur on Windows 10 software: pybricks-code Issues with https://code.pybricks.com application topic: bluetooth Issues involving bluetooth

Comments

@DanieleBenedettelli
Copy link

Describe the bug
I tried connecting to a CONTROL+ hub with
code.pybricks.com and beta.pybricks.com
from Chrome Versione 94.0.4606.81
on Windows 10 20H2 19042.1288
The hub had the fw installed using Android, because on this machine the fw upload failed.

To reproduce
Click on connect, select hub, wait

Expected behavior
The computer won't connect to the hub. On the Console, this error appears
DOMException: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with device.gatt.connect

Screenshots
Here are the logs from code and beta
beta.pybricks.com-1634757617600.log
code.pybricks.com-1634757458917.log

@DanieleBenedettelli DanieleBenedettelli added the triage Issues that have not been triaged yet label Oct 20, 2021
@dlech
Copy link
Member

dlech commented Oct 20, 2021

This sounds like #312. Can you try capturing Bluetooth packets to see if we see the same thing?

Instructions: https://bleak.readthedocs.io/en/latest/troubleshooting.html#windows-10

@dlech dlech added bug Something isn't working OS: Windows 10 Issues that only occur on Windows 10 software: pybricks-code Issues with https://code.pybricks.com application topic: bluetooth Issues involving bluetooth and removed triage Issues that have not been triaged yet labels Oct 20, 2021
@DanieleBenedettelli
Copy link
Author

Here are two logs taken as indicated here
https://bleak.readthedocs.io/en/latest/troubleshooting.html#windows-10
I started WireShark and then tried to connect using beta,pybricks.com
win10-controlhub2.zip

@dlech
Copy link
Member

dlech commented Oct 20, 2021

Thanks for taking the time to do this. These Bluetooth issues that only happen on certain computers are a pain. This seems like a bug in Windows rather than Pybricks, but it would be nice if we could figure out some sort of workaround.

I've attached a log from my working setup to see if anyone can spot any differences. The only thing I have seen so far is that in #312 (comment) and win10-controlbhu2.pcapng, there is a delay of a few seconds before "Rcvd Read Remote Version Information Complete" shortly before the device is disconnected.

win11-technichub-pybricks-code-beta-working.zip

@dlech
Copy link
Member

dlech commented Oct 20, 2021

I found another Chromium bug that could be related https://crbug.com/1120338. Try starting Chrome with --enable-features=NewBLEGattSessionHandling on the command line to see if it makes a difference.

@DanieleBenedettelli
Copy link
Author

DanieleBenedettelli commented Oct 21, 2021 via email

@DanieleBenedettelli
Copy link
Author

@dlech I am trying flashing the firmware from an Android smartphone, it's the 3rd attempt, and when it arrives at 100%, it gives the error "The hub took too long to respond. Restart the hub and try again."

The hub remains in bootloader mode when I power cycle it, and I have to use the LEGO Powered Up app to flash the original fw back. I really need the Technic hub for a commission.
Two out of two devices won't flash it. Can it depend from the hub itself?

@DanieleBenedettelli
Copy link
Author

Can I use the BlueGiga BLED112 as dongle alternative to my PC embedded antenna?

Thanks,
D

@dlech
Copy link
Member

dlech commented Nov 15, 2021

I am trying flashing the firmware from an Android smartphone,

Are you using https://beta.pybricks.com? There is a known issue with android on https://code.pybricks.com.

@dlech
Copy link
Member

dlech commented Nov 15, 2021

Can I use the BlueGiga BLED112 as dongle alternative to my PC embedded antenna?

If it has a Windows driver, it could work (you will need to disable the built-in Bluetooth device in Device Manager). I don't know if the problem you are having is with the computer or with the Bluetooth chip.

@DanieleBenedettelli
Copy link
Author

Shoot, I forget using beta! Let me try again from my 3rd device, and Android tablet.

@DanieleBenedettelli
Copy link
Author

Fw update succeeded from LENOVO tablet with beta. My PC cannot even connect when the fw is PyBricks to develop code.
I will try using Android

@dlech
Copy link
Member

dlech commented Mar 23, 2023

Did you ever find a compatible adapter?

@dlech dlech added the close-me If there is no new activity on the issue, it will be closed after a few months. label Mar 23, 2023
@DanieleBenedettelli
Copy link
Author

DanieleBenedettelli commented Mar 23, 2023

Yes, I bought the TP-LINK Bluetooth Adapter 5.0 UB 500
https://amzn.to/3TFxC6A which works wonderfully!
When I need to work with PyBricks, I disable the internal antenna, and I plug the external dongle.

@dlech
Copy link
Member

dlech commented Mar 23, 2023

Awesome! Out of curiosity, what kind is the internal radio that doesn't work?

@dlech dlech closed this as completed Mar 23, 2023
@DanieleBenedettelli
Copy link
Author

My DELL laptop has a Dell Wireless 1820A Bluetooth 4.1 LE adapter (Broadcom Corporation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working close-me If there is no new activity on the issue, it will be closed after a few months. OS: Windows 10 Issues that only occur on Windows 10 software: pybricks-code Issues with https://code.pybricks.com application topic: bluetooth Issues involving bluetooth
Projects
None yet
Development

No branches or pull requests

2 participants