Closed spoutn1k closed 4 years ago
Could you send the output of sudo journalctl -u bthelper@hci0.service
? Maybe this is a timing issue (again), but I currently do not have a Raspberry Pi 4 to test this...
Can you add one line (the one with Type=oneshot
to /etc/systemd/system/bthelper@.service.d/override.conf
, so it looks like this?
[Service]
Type=oneshot
ExecStartPost=/usr/bin/bluetoothctl discoverable on
ExecStartPost=/bin/hciconfig %I piscan
ExecStartPost=/bin/hciconfig %I sspmode 1
It seems like Raspbian's Bluetooth init scripts are a bit broken in this case...
Sorry for the delay, I do not have access to the device anymore. I ended up removing the /etc/systemd/system/bthelper@.service.d/override.conf
file, and adding Discoverable = true
in the /etc/bluetooth/main.conf
file. This worked for my purposes, and I am sure the scans and sspmode can be set the same way. Unfortunately those configuration files are horribly documented, so I am not sure what the option is.
Looking at the sources, there is definitely a way to set this up entirely via the config files. Might provide a pull request but I have no way of testing my changes.
I could not find anything about sspmode and discoverability in the BlueZ sources, neither did I find a way to reliably enable them other than calling hciconfig hci0 sspmode 1
... But if you find a reliable solution, I'm very interested!
I also had an Issue with Bluetooth on my Pi 4, after addingType=oneshot
to /etc/systemd/system/bthelper@.service.d/override.conf
it worked.
The board's bluetooth has to be manually powered on after every reboot. Using a raspberrypi 4, installed only bluetooth. The
bthelper@hci0.service
service fails at boot with the following status: