-
Notifications
You must be signed in to change notification settings - Fork 27
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
Can't get Vernier temperature bluetooth sensor to Raspberry Pi using GoDirect library #31
Comments
Hello, I wonder if it is an issue with the bluez library? 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/ |
Hello sswartley. Thanks for responding to the issue. I'll get back to you soon. |
Hello sswartley.
So far, the only sensors that worked with Bluetooth is the dissolved oxygen sensor. Temperature and calcium sensors don't work with Bluetooth. However, all sensors work when wired to the Raspberry Pi 4. |
When you say they work when "wired", do you mean they work when connected via USB to your Raspberry Pi? For troubleshooting, you might want to make sure the Go Direct device is properly charged. |
@sswartley |
It should be able to open multiple Go Direct devices. What happens when you just try to open Go Direct Temperature by itself? For example, if you run the "gdx_getting_started_bluetooth.py" example, with just Go Direct Temperature turned on, does it scan and find it? Does it give you the option to open it? When you try and open it, does it open? |
@sswartley This is what happens if I try to connect to the temperature sensor itself using Bluetooth. I was using the example you mentioned "gdx_getting_started_bluetooth.py". It does scan it and find it, but upon selecting it, the above error appears in my initial post. |
The error still makes it look like an error with the bluez and/or bleak library. Bleak is the library that performs the bluetooth communication. You might look at what version of bleak you are running and make sure you are updated to the most current version. Did you take a look at the bluez discussion here? |
The following error happens when trying to run the gdx_getting_started_bluetooth.py example:
wait for bluetooth initialization...
number of ble devices found = 1
1: GDX-TMP 0F10A381 BLE -64
Enter device number. To select multiple devices, separate with commas (no spaces): 1
attempting to open 1 device(s)...
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 135, in connect
).asFuture(loop)
txdbus.error.RemoteError: org.bluez.Error.Failed: Software caused connection abort
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "gdx_getting_started_bluetooth.py", line 31, in
gdx.open_ble()
File "/home/pi/Desktop/godirect-examples-master/python/gdx/gdx.py", line 153, in open_ble
open_device_success = gdx.devices[i].open()
File "/home/pi/.local/lib/python3.7/site-packages/godirect/device.py", line 102, in open
if not self._connect():
File "/home/pi/.local/lib/python3.7/site-packages/godirect/device_bleak.py", line 55, in _connect
self._loop.run_until_complete(self._async_connect())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/pi/.local/lib/python3.7/site-packages/godirect/device_bleak.py", line 42, in _async_connect
await self._device.connect()
File "/home/pi/.local/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 146, in connect
raise BleakError(str(e))
bleak.exc.BleakError: org.bluez.Error.Failed: Software caused connection abort
Is there a way to fix this issue with bluetooth?
Thanks.
The text was updated successfully, but these errors were encountered: