CANDY-LINE / node-red-contrib-generic-ble

A Node-RED node set for providing access to generic BLE peripheral GATT characteristics.
Apache License 2.0
24 stars 22 forks source link

Hue Bulb: Problem with sending a value to handle 0x0027 #46

Open anvarakhmedov opened 3 years ago

anvarakhmedov commented 3 years ago

I am trying to turn my bluetooth Hue bulb on/off and change brightness using my Raspberry Pi 4B. The bulb is on, and I have successfully connected to it using bluez. When I try to run 'char-write-req 0x0027 01' to turn it on, I get this message:

GLib-WARNING **: 22:53:34.807: Invalid file descriptor

I can see that the connection is successful, but whenever I try to write a value to it, I just get this message and it disconnects. Running bluetoothctl 5.50. I have seen the patch conversation here: https://www.spinics.net/lists/linux-bluetooth/msg67617.html. But I am not sure it applies and I also wouldn't even know how to apply it. Can someone please help me!

dbaba commented 3 years ago

Unfortunately, I cannot help to answer it. I believe the error is caused by gattool. However, this node never uses gattool. If you need to use gattool, you may want to post the question to the Bluez ML.