VernierST/godirect-py

Possible issue with Bleak on Raspberry Pi

Closed this issue · 6 comments

I am unable to get the example gdx programs to work with a GoDirect Temperature probe (BLE) on a Raspberry Pi (fresh install, Buster, Pi 3 B Rev 1.3). Bleak is version 0.11.0, godirect is version 1.0.7, python is version 3.7. Error appears with the following MWE

from gdx import gdx
gdx = gdx.gdx()
gdx.open_ble()

Starting from a sensor that is off, I turn on the sensor (red blinking light), run the program. Sensor is found and I am asked to choose the GDX-TMP ... Attempting to open the device results in the sensor blinking green but a python traceback with last two lines being:

bleak.exc.BleakDBusError: org.bluez.Error.NotPermitted
open device 0 = False

This is correct, Dave. Sensor works great out of the box with USB Windows 10 graphical analysis and iPad BLE graphical analysis. Now trying to tackle the RPi.

Hello Bob, My wife and I are headed off for a vacation for about a week. I assume you are using the GDX python stuff from our website. Is that correc? I am copying Sam, who wrote up that stuff, to see if he has a suggestion. Dave

Hello,

I wonder if it is an issue with the bluez library as described here? hbldh/bleak#94

This information on upgrading bluez might be helpful: https://scribles.net/updating-bluez-on-raspberry-pi-from-5-43-to-5-50/

Also, I just want to make sure you that you saw the notes from the getting started guide that show the install steps for Linux

All the best,

This error has shown up for others. It appears that bluez v5.51 may have solved the problem for some users.

Buster currently ships with bluez-5.50. Installing bluez-5.51 appears to be the trick. Code used is below:

sudo apt-get install libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
wget www.kernel.org/pub/linux/bluetooth/bluez-5.51.tar.xz
tar xvf bluez-5.51.tar.xz 
cd bluez-5.51
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental 
make -j4
sudo make install

Can confirm that both gdx_getting_started_bluetooth.py and gdx_getting_started_graphing.py work.

@bobthechemist, thank you for working through this. It will be very helpful for those that follow in your footsteps.