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

Technic Hub refuses to load pybricks firmware and shows error #899

Closed
ghost opened this issue Jan 3, 2023 Discussed in #898 · 6 comments
Closed

Technic Hub refuses to load pybricks firmware and shows error #899

ghost opened this issue Jan 3, 2023 Discussed in #898 · 6 comments

Comments

@ghost
Copy link

ghost commented Jan 3, 2023

Discussed in https://github.com/orgs/pybricks/discussions/898

[ Originally posted by **MCreeper1** January 3, 2023 I have tried multiple times to load the pybricks firmware onto the hub and I always get the same error screen during the installation process. After I pair the hub goes from purple to rainbow then after about 30 seconds it stops and starts flashing white.A error screen appear that says :
Error: Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.

I have tried switching from chrome to edge but the result is the same.

@dlech
Copy link
Member

dlech commented Jan 3, 2023

Since you said you tried Edge, is it safe to assume you are using Windows? Unfortunately, lot's of people have trouble with Bluetooth on Windows. So this is probably the same issue as #312, #513, #555, etc.

It would be useful to know what Bluetooth chip/driver you are using. Run this in PowerShell to find out:

wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/GetBluetoothRadioInfo.ps1 -UseBasicParsing | iex

You could also try logging Bluetooth packets as described in https://bleak.readthedocs.io/en/latest/troubleshooting.html#windows-10

@dlech dlech closed this as completed Jan 4, 2023
@NM230105
Copy link

NM230105 commented Jan 6, 2023

Hi. I'm having a very similar issue trying to flash two different Technics Hubs and Windows 11 Build 22000.1335 (Date: 2022-12-11). I've tried the web based process using the latest versions of both Edge and Chrome as well as the local installs of Pybricks and Pybricks Beta. Unfortunately the results are always the same.

From reading your notes, I've tried the reboot and launching Chrome as per #513 but I still get the same errors. Attached is the Wireshark log. From your Facebook post, the error occurs at approximately 0:42 of the video and no progress indicator shows in the webpage or the local app.

Sure hope you can help.

Nick


Pybricks Error Message:

Error: Failed to execute 'getPrimaryService' on 'BluetoothRemoteGATTServer': GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
    at https://beta.pybricks.com/static/js/main.eec8e77d.js:2:1476132
    at https://beta.pybricks.com/static/js/main.eec8e77d.js:2:1480044
    at m (https://beta.pybricks.com/static/js/main.eec8e77d.js:2:1480990)
    at h (https://beta.pybricks.com/static/js/main.eec8e77d.js:2:1480501)
    at u (https://beta.pybricks.com/static/js/main.eec8e77d.js:2:1480773)

The Bluetooth chip info is:

    InstanceId        : USB\VID_13D3&PID_3491\5&309F5DE0&0&7
    MAC               : 80C5F22DC9D4
    DriverDescription : Qualcomm Atheros Bluetooth 4.1
    DriverVersion     : 10.0.0.448
    ErrorRecovery     : None
    ScoType           : InBand

pybricks_20230105_1729.zip

@dlech
Copy link
Member

dlech commented Jan 6, 2023

Thanks for the logs. This has the same "LE Read Remote Version Information" response timeout as in #513. There are not any known solutions, but make sure you hub has new/fully charged batteries and that you aren't releasing the button too early. You could try flashing the firmware with another device, like an Android phone. You could try eliminating any sources of interference, like Wi-Fi and other Bluetooth devices. You could try a different Bluetooth dongle or try different driver versions for your Bluetooth adapter.

@NM230105
Copy link

NM230105 commented Jan 6, 2023

Thanks for the quick reply! We'll give these a try.

@NM230105
Copy link

Just thought I’d send an update. I bought a $15 tp-link UB500 Bluetooth dongle (BT v5.0) for the Win11 box and that did the trick.

From the specs I uploaded, the original Bluetooth adapter was v4.1 with its smaller packet size and given the timeout errors it’s likely that was the root of the problem. v5.0 definitely works and I suspect that even v4.2 would have done the job as that was the first version with the increased packet size limit hence 2X faster data throughput.

@dlech
Copy link
Member

dlech commented Jan 21, 2023

Thanks for the followup. Would you mind running this (in powershell) and sharing the results so we can get an idea of which adapters/drivers work and which don't?

wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/GetBluetoothRadioInfo.ps1 -UseBasicParsing | iex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants