BLE problems on Raspberry Pi 3B+ and 4
See original GitHub issue- bleak version: 0.8.0
- Python version: 3.7.3
- Operating System: Raspberry Pi OS buster (completely up to date) on Raspberry Pi 3B+ and 4
- BlueZ version (
bluetoothctl -v
) in case of Linux: 5.50
This is not a bleak problem per se, I believe.
I’m trying to get bleak to work on an RPi 4 (and 3B+). It works fine on an RPi Zero W and 3B, but swapping the SD card from the RPi Zero W into an RPi 4 or 3B+ (assuring that the OS setup is identical) gives this error when trying to do service discovery:
...
File "/home/pi/.local/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 154, in connect
await self.get_services()
File "/home/pi/.local/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 384, in get_services
raise BleakError("Services discovery error")
The properties
value ServicesResolved
never becomes True
, which causes the error.
If anyone has gotten bleak to work on an RPi4, I’d love to hear what you had to do. I’ve scoured the RPi forums, etc., and haven’t come up with any solution. The wifi/BLE adapter chip is supposed to be identical between the two boards. [EDIT: In fact, the wifi hardware changed between 3B and 3B+, though it’s hard to find this out.] Thanks.
EDIT: Further testing shows it works on Pi0W and Pi3B, but not on Pi3B+ and Pi4B.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
The
bluez-firmware-1.2-4+rpt7
andrpt8
versions fix the problem mentioned. Userpt8
, which includes security fix not inrpt7
.Turns out for some reason I had to power cycle the board (not just reboot) in order to test the new firmware properly. It now does work for me, getting values from a pulse oximeter via our software on top of bleak.