RaspberryPI 4B, Debian, problems reading the tags

I have been using the Ruuvi tags for years with OpenHAB 2 / OpenHAB 3 with a great success.
Now when I unwillingly upgraded to the OpenHAB 4, the Ruuvi tags won’t work anymore.
I am able to list the tags - Bluetooth will find them. I am able to receive some incoming messages from the Ruuvi-tags. However, suddenly the arrival of these messages stops and then the OpenHAB “Bluetooth thing” goes red indicating an error stage.
To isolate the problem I have restarted and reinstalled the Bluetooth stack as well as the Bluetooth binding in the OpenHAB.
I have then reinstalled the whole system twice from the scratch with no other configuration included. Every time the same issue occurs.
Then I started to think what if this problem is not related to the OpenHAB, but the Linux and the Bluetooth.

If the problem is with the Linux, then I think this problem can be causing a lot of trouble other systems as well, not just OpenHAB.
I then decided to test it in node-red instead of OpenHAB. In node-red I would be able to see the raw data from the Bluetooth node. The problem exists in node-red as well. I can see few messages, but then out of the blue the stream of incoming messages from the Ruuvi tags stops.
I am now thinking that maybe the issue is in the operating system of in the Bluetooth stack or drivers.
This may also affect other platforms, such as Home Assistant, not just OpenHAB.
People keep thinking that this is a range issue.

I have two different but similar setup where this problem takes place.

Platform: Raspberry Pi 4 Model B Rev 1.1
Release = Debian GNU/Linux 11 (bullseye)
Kernel = Linux 6.1.21-v8+
OS: Debian 11.7 64 bit

I am using the RPi 4 internal Bluetooth adapter and external Bluetooth dongle.
“Bus 001 Device 004: ID 2550:8761 Realtek Bluetooth Radio”

I have not been able to test other Linux versions.

Openhabian (OpenHAB 3) has kernel version 5.x

Do You thin his could be the case?

Maybe @otso would have some ideas?

Overall the Raspberry Pi / Linux and Bluetooth have had a lot of issues over the years. This Python library has a lot of good discussion about different Bluetooth libraries and their issues / OS support: GitHub - ttu/ruuvitag-sensor: Python package for communicating with RuuviTag BLE Sensor and for decoding sensor data from broadcasted data. Overall I’m under the impression that BlueZ is widely used but it has issues with stability, while Bleson has worked well on newer Linux devices.

Maybe OpenHAB has something that would let you select the Bluetooth backend?

I have noticed the same problem.

The RPI4 has very poor bluetooth range. If you also use an external SSD disk that is in the same case or top of the RPI4, the range is limited to a few meters. I got it working by moving the SSD further away and finding a better position for it.

However, the range is still worse than RPI3.



1 Like