Closed giovanne123 closed 2 years ago
I think it can be a reason that the Pi/Bluetooth Dongle is to far from the shower :-( Manual test with gatttool also throws an error:
root@Pi:/home/pi# gatttool -I [ ][LE]> connect xx:xx:xx:xx:xx:xx Attempting to connect to xx:xx:xx:xx:xx:xx Connection successful [xx:xx:xx:xx:xx:xx][LE]> (gatttool:1290): GLib-WARNING **: Invalid file descriptor.
[xx:xx:xx:xx:xx:xx][LE]> char-read-uuid 0000ca1c-0000-1000-8000-00805f9b34fb Command Failed: Disconnected
With an USB extention cable to shorten the distance from pi to shower I can connect without the "Invalid file descriptor" error. I think the bluetooth range from the shower is not that far :-(
Unfortunatelly I can't position the Pi closer to the shower because of missing power. I think I need to extend the BT dongle with usb extention cable (not so simple in a bath that it can't be seen) or maybe a BT extender or better BT usb dongle?
To give you a comparaison, in my setup, the shower head is 3m away from the bluetooth dongle and I don't have any connection issue. In general bluetooth works well within 5 meters
The distance is not the problem. Seems top be some issue in my installation (python), get broken pipe or similiar error when trying to connect with bluepy or pygatt(gatttool) in python 2 or 3. Using gatttool directly is working well, e.g. gatttool -i hci0 -b AA:BB:CC:DD:EE:FF --char-read --handle=0x0012
So I'm currently working with a workaround by calling the gatttool command from within python, until I find more time to deeper look into my problem.
Hi, I also got a Hydrao Aloe and I saw your python script for conneting to it.
Do you have an idea why I can't read from the device. Trying with your script (reading the volumes) or trying with my own (for receiving the services) I always get after connecting and trying to access an "BrokenPipeError" ;-(
Have you although had issues with "BrokenPipeError"?
The Pi is round about 2,5m away from the Shower. With Androind Phone (same distance) and using "nrf Connect" I can successful connect and read all the Services. Unfortunatelly at the moment I can't get the Pi more nearby to the Shower :-( But on the other side, the connecting itself seems to be successful. Running in --dry_run mode runs successfull. Other BLE devices can be connected and read from the same Pi.
my bluepy is version 1.3: