Raspberry Pi 4 Model B Rev 1.2, Raspbian GNU/Linux 10 (buster)
This is a remote Pi that reads temperature sensors (indoor and out) and posts the results to a web host.
The sensor reading has worked fine for many months and just started to continuously fail yesterday morning:
pi@raspmountain:~ $ sudo hcitool lescan
Set scan parameters failed: Connection timed out
pi@raspmountain:~ $ sudo service bluetooth restart
pi@raspmountain:~ $ sudo service dbus restart
pi@raspmountain:~ $ sudo hciconfig hci0 down
pi@raspmountain:~ $ sudo hciconfig hci0 up
Can't init device hci0: Connection timed out (110)
pi@raspmountain:~ $ sudo hcitool lescan
Could not open device: No such device
pi@raspmountain:~ $ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset:
Active: active (running) since Tue 2021-08-10 08:53:47 +07; 1min 39s ago
Docs: man:bluetoothd(8)
Main PID: 22250 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─22250 /usr/lib/bluetooth/bluetoothd --noplugin=sap
Aug 10 08:53:47 raspmountain systemd[1]: Starting Bluetooth service...
Aug 10 08:53:47 raspmountain bluetoothd[22250]: Bluetooth daemon 5.50
Aug 10 08:53:47 raspmountain systemd[1]: Started Bluetooth service.
Aug 10 08:53:47 raspmountain bluetoothd[22250]: Starting SDP server
Aug 10 08:53:47 raspmountain bluetoothd[22250]: Excluding (cli) sap
Aug 10 08:53:47 raspmountain bluetoothd[22250]: Bluetooth management interface 1.1
Aug 10 08:53:49 raspmountain bluetoothd[22250]: Loading LTKs timed out for hci0
Aug 10 08:53:57 raspmountain bluetoothd[22250]: Failed to set mode: Failed (0x03)
I've confirmed that the sensors themselves are working fine from a different Pi:
pi@raspcondo:~/webcam $ sudo hcitool lescan
LE Scan ...
08:66:98:D8:ED:5B (unknown)
08:66:98:D8:ED:5B (unknown)
1A:29:FA:EB:50:D2 (unknown)
A4:C1:38:73:1D:5C (unknown)
A4:C1:38:73:1D:5C LYWSD03MMC
A4:C1:38:69:6C:A2 (unknown)
A4:C1:38:69:6C:A2 LYWSD03MMC
(The two named devices are sensors.)
Because of the Covid lockdown and travel restrictions in Thailand, it is unlikely that I'll be able to visit this place any time soon. I haven't tried rebooting the Pi, yet.
What next?
hcitool
is one to tools that has been deprecated so you might want to usebluetoothctl
orbtmgmt
. However I do not think that is causing your problems. You might want to have look at the RPi Bluetooth where there are various issues open around Bluetooth on the Pi 4