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

Raspberry Pi 4 "Service Discovery Error" #3

Open
Ramavarapu opened this issue Aug 3, 2020 · 6 comments
Open

Raspberry Pi 4 "Service Discovery Error" #3

Ramavarapu opened this issue Aug 3, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Ramavarapu
Copy link

When I run this sample code on my Raspberry Pi 4, I get the error message(s) below. AFAIK, I have followed all the pre-req steps. Any help/pointers to what I am doing wrong is much appreciated!

-RS

Scanning...
Traceback (most recent call last):
File "/home/pi/software/Adafruit_CircuitPython_BLE_BerryMed_Pulse_Oximeter/examples/ble_berrymed_pulse_oximeter_simpletest.py", line 32, in
pulse_ox_connection = ble.connect(adv)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_ble/init.py", line 279, in connect
connection = self._adapter.connect(advertisement.address, timeout=timeout)
File "/home/pi/.local/lib/python3.7/site-packages/bleio/adapter.py", line 335, in connect
return self.await_bleak(self._connect_async(address, timeout=timeout))
File "/home/pi/.local/lib/python3.7/site-packages/bleio/adapter.py", line 114, in await_bleak
return future.result(timeout)
File "/usr/lib/python3.7/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
File "/home/pi/.local/lib/python3.7/site-packages/bleio/adapter.py", line 344, in _connect_async
await client.connect(timeout=timeout)
File "/home/pi/.local/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 175, in connect
await self.get_services()
File "/home/pi/.local/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 317, in get_services
raise BleakError("Services discovery error")
bleak.exc.BleakError: Services discovery error

@evaherrada evaherrada added the bug Something isn't working label Aug 6, 2020
@dhalbert dhalbert self-assigned this Sep 14, 2020
@p-riebs
Copy link

p-riebs commented Oct 11, 2020

I'm affected by this bug as well. Reproduced in the same way.

@dhalbert
Copy link
Contributor

I am working on this as part of upgrades to the adafruit-blinka-bleio library to support MacOS and to keep up with changes to bleak. Could I ask you what versions of bleak and adafruit-blinka-bleio you are running? You can get these from pip3 list.

@p-riebs
Copy link

p-riebs commented Oct 13, 2020

bleak is 0.8.0
adafruit-blinka-bleio is 1.1.0

Let me know if you need any more information.

@dhalbert
Copy link
Contributor

I reproduced this problem on RPi 3B+ and RPi 4B. The problem does not occur on RPi Zero W and RPi 3B (no +).

This appears to be a bluez-firmware problem. As of this writing, the latest version is bluez-firmware-1.2-4+rpt5. I had to roll back to bluez-firmware-1.2-4+rpt2 to get this to work. I downloaded the .deb from http://archive.raspberrypi.org/debian/pool/main/b/bluez-firmware/bluez-firmware_1.2-4+rpt2_all.deb. Versions rpt3 and rpt4 didn't work. What seems like the same problem was reported here: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=285641&p=1728626, and that report rolled back to rpt2 also.

I will try to figure out how to submit a bug report to RPi about this, but if you are familiar, have at it!

@dhalbert
Copy link
Contributor

Someone else with an equivalent problem opened this issue on the appropriate RPi GitHub: RPi-Distro/bluez-firmware#6. I'll track that.

@dhalbert
Copy link
Contributor

Please use https://github.com/dhalbert/Adafruit_Blinka_bleio/tree/macos-fixes with bleak 0.8.0 and see if that works for you. I'll be submitting that to the library soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants