Bluetooth connectivity issues

Last Sunday my Raspberry Pi4 updated its bluetooth component “pi-bluetooth” to version 0.1.17 (previous was 0.1.15).

Update broke something, because my Influxdb/Grafana does not show anymore datapoints. I can get data from Ruuvitags if I run ‘bluetoothctl’ & ‘scan on’ with tmux, but that is not a very solid solution :slight_smile:

What to do, any suggestions?

I have tried so far:
killall hcitool; hciconfig hci0 reset && hciconfig hci0 up
removed and reinstalled pi-bluetooth

Are you using RuuviCollector (Java), ruuvitag-sensor (Python) or something else?

It sounds to me that the programs would need to update the command they run to start collecting data.

That system has been running RuuviCollector Java application over one year now successfully. System is fully patched once in a week, and rebooted.
Last Sunday it stopped collecting, and at the same time bluetooth package was updated.

Start-Date: 2021-05-24 00:00:19
Commandline: apt-get upgrade -y
Upgrade: rpi-eeprom:armhf (12.3-1, 12.4-1), pi-bluetooth:armhf (0.1.15, 0.1.17)
End-Date: 2021-05-24 00:01:04

Thank you for the details, ping @Scrin

Most likely cause is that hcitool and/or hcidump was updated, which means the previously set capabilities are lost. From the Installation section in the readme, try running:

sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hcitool`
sudo setcap 'cap_net_raw,cap_net_admin+eip' `which hcidump`

and then restarting the collector. If that doesn’t help, try running hcitool lescan --duplicates --passive from the commandline and check if you can see BLE advertisements or any errors.



I ran setcap commands with sudo & reboot, but with no luck. Then I entered as a root user, and tried setcaps once again & collector service reboot, and this time with success. Now the system is getting and outputting measurement data :slight_smile:

Thanks for the help, I really appreciate it.

I noticed I have to run setcaps && ruuvi-collector service restart everytime after Raspberry has rebooted itself.

I think I’ll try cronjob now. → that fixed, now I can get the data.

1 Like