Bluetooth service not starting

Hi everyone,

I’m not sure when this happened, but I have a:

  • Raspberry Pi 3B rev 1.2 (a02082), Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l GNU/Linux

I’m running the latest OSM build 18.3, and have made sure it’s up to date.

Trying to start bluetooth gives me:

osmc@osmc:~$ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/bluetooth.service.d
└─local.conf
Active: inactive (dead)
Condition: start condition failed at Thu 2019-05-23 00:25:36 EDT; 9h ago
└─ ConditionPathIsDirectory=/sys/class/bluetooth was not met
Docs: man:bluetoothd(8)

and

osmc@osmc:~$ sudo bluetoothctl
Waiting to connect to bluetoothd…

just times out. I also can’t see the menu in MyOSMC to enable Bluetooth.

Also, at boot up, I see the message in red:

failed to start Broadcom 43xx bluetooth HCI

and also in red is:

May 23 09:28:15 osmc kernel: brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 7.11.15 Compiler: 1.24.2 ClmImport: 1.24.1 Creation: 2014-05-26 10:53:55 Inc Data: 9.10.39 Inc Compiler: 1.29.4 Inc ClmImport: 1.36.3 Creation: 2017-10-23 03:47:14

Full log here: https://paste.osmc.tv/gidonanari

Thanks!

EDIT:

Some more info:

osmc@osmc:/etc/systemd/system/bluetooth.target.wants$ more bluetooth.service
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/libexec/bluetooth/bluetoothd
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
ProtectHome=true
ProtectSystem=full

[Install]
WantedBy=bluetooth.target
Alias=dbus-org.bluez.service

and

osmc@osmc:~$ sudo hciconfig -a
Can’t open HCI socket.: Address family not supported by protocol

osmc@osmc:/etc$ sudo /usr/libexec/bluetooth/bluetoothd -d -n
bluetoothd[1841]: Bluetooth daemon 5.43
bluetoothd[1841]: src/main.c:parse_config() parsing main.conf
bluetoothd[1841]: src/main.c:parse_config() Key file does not have key ‘DiscoverableTimeout’ in group ‘General’
bluetoothd[1841]: src/main.c:parse_config() Key file does not have key ‘PairableTimeout’ in group ‘General’
bluetoothd[1841]: src/main.c:parse_config() Key file does not have key ‘AutoConnectTimeout’ in group ‘General’
bluetoothd[1841]: src/main.c:parse_config() Key file does not have key ‘Privacy’ in group ‘General’
bluetoothd[1841]: src/main.c:parse_config() name=%h
bluetoothd[1841]: src/main.c:parse_config() class=0x20041C
bluetoothd[1841]: src/main.c:parse_config() Key file does not have key ‘DeviceID’ in group ‘General’
bluetoothd[1841]: src/main.c:parse_config() Key file does not have key ‘ReverseServiceDiscovery’ in group ‘General’
bluetoothd[1841]: Failed to access management interface
bluetoothd[1841]: Adapter handling initialization failed

Does it work with Raspbian?
The Bluetooth chip may be faulty

I’m going to try and do a fresh install of Raspbian tonight and see if it is indeed the chipset gone faulty.

Just popped the sdcard from my Raspbian (REALLY should’ve done this first) and I was able to use Bluetooth and connect it to my headphones.

I may just wipe and reinstall OSMC so that I don’t waste any more of anybody’s time…including you.

Thanks for the prompt suggestion. Unless there’s something else to try…honestly, I don’t mind reinstalling.

Try the reinstall and report back.

Reinstall worked. Easier than figuring out what on earth changed.

Glad you are now running as expected, enjoy!

Btw, in Raspbian, I was actually able to pair my Sony MDR-XB950B1, but in OSMC, it just pairs, then immediately disconnects. Do you know if I need to install any extra apps, like A2DP? Don’t want to mess up this clean install like I did the last one.

a2dp-sink profile connect failed for 04:5D:4B:5E:1D:EB: Protocol not available

Yes you still need
sudo apt-get update sudo apt-get install a2dp-app-osmc

And if your headphones also are headsets than need to have one more step of sink choice.

Got it working! Thanks you all for the help. I accidentally installed pulseaudio-module-bluetooth before I read your post but uninstalled it and installed a2dp-app-osmc.

It works now, but had to read one of the posts you were in (Problem with bluetooth headphones - #31 by RobertJRussellLives) which helped me.

osmc@osmc:~$ pactl list sources short
0 alsa_output.platform-soc_audio.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 bluez_sink.04_5D_4B_5E_1D_EB.headset_head_unit.monitor module-bluez5-device.c s16le 1ch 8000Hz SUSPENDED
2 bluez_source.04_5D_4B_5E_1D_EB.headset_head_unit module-bluez5-device.c s16le 1ch 8000Hz SUSPENDED
$pactl set-card-profile 1 a2dp_sink

Then I went to Settings->Audio->Output and changed to ALSA Pulse Audio as I didn’t see anything that had Bluetooth in it.

Yeah as written if a headphone has a headset profile that is needed additionally