Update of Raspi Linux the stops latest ruuvicollector dbbase updates

Hi
Just loaded the latest ruuvicollector from jan-2020 installed on my Raspi 3 and all worked fine.
Then I made apt update and apt upgrade coomands and the updates of data stopped updating to influx / grafana.
I have checked the bluetooth connection to tag’s with bluetoothctl scan command and can see that they are sending data. Using hcidump -t -x … doesn’t show any data.
So don’t upgrade your Raspi linux … before the issue is found :slight_smile:
This might have relation to Ruuvicollector stops Collecting data topic, but different reason.

If hcidump has been updated, you will need to repeat the commands:

sudo setcap ā€˜cap_net_raw,cap_net_admin+eip’ which hcitool
sudo setcap ā€˜cap_net_raw,cap_net_admin+eip’ which hcidump

Thanks, but not the reason. Found out that the ruuvi-collector doesn’t start on boot. If I start it manually all works OK. So the update spoils the ā€œautostartā€ of the java. Where and how it is done?

The automatic boot is done via systemd, details are at https://blog.ruuvi.com/rpi-gateway-6e4a5b676510?source=collection_home---2------12----------------------- under ā€œFinishing touchesā€

Hi Otso and thanks
I have done that and the service is active but doesn’t update the base.
If I run it from terminal as java program it updates the database. But not as service. Service status says active and all seems to be OK… The service script is the original and same as you referred to.

Data from collector
Service:

ruuvicollector.service - RuuviCollector Service
Loaded: loaded (/etc/systemd/system/ruuvicollector.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-04-13 16:44:01 EEST; 33min ago
Main PID: 487 (java)
Tasks: 14 (limit: 2200)
Memory: 53.5M
CGroup: /system.slice/ruuvicollector.service
ā”œā”€487 /usr/bin/java -jar /home/pi/RuuviCollector/ruuvi-collector-0.2.jar
└─635 hcidump --raw

Apr 13 16:44:01 ruuvicollector systemd[1]: Started RuuviCollector Service.
Apr 13 16:44:06 ruuvicollector java[487]: 2020-04-13 16:44:06.717 DEBUG [Main] Starting scan with: [hcitool, lescan, --duplicates, --passive]
Apr 13 16:44:06 ruuvicollector java[487]: 2020-04-13 16:44:06.733 DEBUG [Main] Starting dump with: [hcidump, --raw]
Apr 13 16:44:06 ruuvicollector java[487]: 2020-04-13 16:44:06.747 INFO [Main] BLE listener started successfully, waiting for data…
Apr 13 16:44:06 ruuvicollector java[487]: If you don’t get any data, check that you are able to run ā€˜hcitool lescan’ and ā€˜hcidump --raw’ without issues
Apr 13 16:59:45 ruuvicollector java[487]: 2020-04-13 16:59:45.368 INFO [Main] Successfully reading data from hcidump

Java from terminal

pi@ruuvicollector:~ $ sudo java -jar /home/pi/RuuviCollector/ruuvi-collector-0.2.jar
2020-04-13 17:22:10.227 DEBUG [Main] Starting scan with: [hcitool, lescan, --duplicates, --passive]
2020-04-13 17:22:10.237 DEBUG [Main] Starting dump with: [hcidump, --raw]
2020-04-13 17:22:10.241 INFO [Main] BLE listener started successfully, waiting for data…
If you don’t get any data, check that you are able to run ā€˜hcitool lescan’ and ā€˜hcidump --raw’ without issues
2020-04-13 17:22:12.373 INFO [Main] Successfully reading data from hcidump

Found the difference when I run from terminal I use sudo. The service dosn’t…
Linux SE is the reason and something changed on the update… What, I don’t know yet.

1 Like

NOTE the hcidump in service has started when I started the APP from terminal as sudo… that seems to be the issue that service doesn’t have rights to run under the service?

You need to re-run these two commands:

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

after hcitool and/or hcidump have changed (ie. updated) to re-add the required capabilities for running them as a regular user (including services)

OK thanks, now it works. I must have made a typo earlier as the same commands did not have any efect.
Case closed, I know now what to do in future updates.
Actually I found the issue here. The hyphens were missing from which hcitool and which hcidump