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

Cannot connect city hub on macOS 12 #489

Closed
dlech opened this issue Sep 20, 2021 · 2 comments
Closed

Cannot connect city hub on macOS 12 #489

dlech opened this issue Sep 20, 2021 · 2 comments
Assignees
Labels
bug Something isn't working hub: cityhub Issues related to the LEGO Powered Up Smart hub (Hub No. 4) hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) OS: macOS Issues that only occur on macOS software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: bluetooth Issues involving bluetooth

Comments

@dlech
Copy link
Member

dlech commented Sep 20, 2021

Describe the bug
What is the problem?

After flashing firmware from https://beta.pybricks.com, the hub will not connect when clicking the Bluetooth button. After a while the following error is shown:

GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.

To reproduce
Steps to reproduce the behavior:

  1. Install macOS 12 (beta)
  2. Install Chrome web browser (tried both Version 93.0.4577.82 (Official Build) (x86_64) and Version 96.0.4648.0 (Official Build) canary (x86_64))
  3. Go to https://beta.pybricks.com
  4. Install firmware
  5. Click on Bluetooth button to connect, select the hub from the list and click pair
  6. Bluetooth button spins busy for a while then an error message is shown

Expected behavior
It should connect as before

Screenshots
image

@dlech dlech added bug Something isn't working hub: cityhub Issues related to the LEGO Powered Up Smart hub (Hub No. 4) hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) topic: bluetooth Issues involving bluetooth software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) labels Sep 20, 2021
@dlech
Copy link
Member Author

dlech commented Sep 20, 2021

Logging Bluetooth packets shows that the OS is issuing a Read By Type request starting with handle 0x0002. No reply to this is ever received from the hub. I'm pretty sure other OSes (and previous versions of macOS?) issue this command starting with handle 0x0001, so we probably need to look at the Bluetooth driver in pbdrv to make sure it works for this case.

image

@dlech dlech added the OS: macOS Issues that only occur on macOS label Sep 20, 2021
@dlech
Copy link
Member Author

dlech commented Sep 20, 2021

Reading the screenshot a bit closer, we can see this is actually requesting the Device Name UUID rather than the expected GATT Characteristic UUID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hub: cityhub Issues related to the LEGO Powered Up Smart hub (Hub No. 4) hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) OS: macOS Issues that only occur on macOS software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: bluetooth Issues involving bluetooth
Projects
None yet
Development

No branches or pull requests

1 participant