Replies: 1 comment
-
Some other bits:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Unfortunately Bluetooth issues are somewhat common due to the wide variety of Bluetooth hardware and operating systems available. But the good news is that there are some simple things you can do to really help us out. If you get a Bluetooth error in Pybricks Code, here are some things you can do to help diagnose the issue.
Common problems
Hub turns off while flashing firmware
Don't hold the button too long. The hub status light will turn off for a second while the flash memory is being erased. Then it will start flashing again. This is when you should release the button.
Error when starting to flash firmware
Don't release the button too early, otherwise the hub may turn off before flashing firmware can start. The hub status light will turn off for a second while the flash memory is being erased. Then it will start flashing again. This is when you should release the button.
City hub freezes while flashing firmware
Be sure that all motors and sensors are disconnected from the hub before flashing the firmware.
The firmware still won't flash
There are some known issues with the bootloaders on the hubs (especially the City hub + Windows). Many users have reported success using a different operating to flash the firmware (Mac/Linux/Android/ChromeOS). Once the firmware is flashed, you will likely be able to connect using the original computer to connect. Also making sure no other Bluetooth devices are connected at the same time may help.
Windows Bluetooth stack gets in bad state
We haven't determined why, but sometimes the Windows Bluetooth stack will get in a bad state and will refuse to connect, even after multiple tries. We have found that restarting Windows can sometimes fix problems like this.
Some Bluetooth adapters don't work well on Windows
Help us find out which adapters work and which don't by sharing info on your adapter. Run the following in PowerShell then post it in this issue:
Linux prints output twice
Sometimes we have observed information in the terminal being printed twice after disconnecting and reconnecting a hub on Linux. When this happens, BlueZ needs to be restarted with
sudo systemctl restart bluetooth.service
.Errors after upgrading from firmware v3.0 to >= v3.1 on Linux
See #374 (comment) for Pybricks Code Error and #374 (comment) for pybricksdev error examples.
BlueZ keeps a cache of the device's GATT attributes and returns the old values. Clear the cache manually like this:
where
XX:XX:XX:XX:XX:XX
is the Bluetooth address of the hub andYY:YY:YY:YY:YY:YY
is the Bluetooth address of the Bluetooth adapter on your computer.Developer Console
This can tell us if there was a problem with the code we wrote.
Chrome Device Log
This can give us more information if there was an operating-system specific problem.
chrome://device-log
in the address bar and press Enter.Capturing Bluetooth Packets
For the really tough problems, it is useful to capture the actual Bluetooth packets being exchanged with the Bluetooth chip.
Please refer to https://bleak.readthedocs.io/en/latest/troubleshooting.html#capture-bluetooth-traffic for instructions on how to do this.
Beta Was this translation helpful? Give feedback.
All reactions