Bluetooth dongle not connecting headphones

Hi,
I was using for a while Vero 4k+ internal bluetooth for using Bose QC II headphones with Vero 4k+.
Got sick of dropouts and ordered the dongle.
I got the bundle, did full osmc reset (installed fresh osmc with usb stick) and I can see the headphones but I can’t connect to them.
I tried with bluetoothctl but got just general error when trying to connect:
Failed to connect: org.bluez.Error.Failed

Also one thing is that I do not understand that does the october update have a2dp bluetooth audio by default? Looking from the packages from the logs doesn’t seem like it.
I tried to install it as instructed in the Testing thread but all I get is an error E: Unable to locate package a2dp-app-osmc

Logs show that there is something wrong with the bluetooth but I don’t understand the issue from the logs (please note I cleared media scan logs).
http://paste.osmc.io/ulegaqedas.xml

For now, the A2DP package is deprecated. We are moving towards bluez-alsa in the near future, which will handle audio a lot better,

OK, so until bluez-alsa is available there is no possibility to use bluetooth audio?
Just to be clear, connecting the headphones to Vero 4k+ is also not possible? Or should be possible and I have two separate problems?

Thanks for prompt reply.

Currently, Vero 4K+ to BT headphones still requires a Bluetooth audio package.
@grahamh has some work in progress solution for Bluetooth audio. I’m sure he can provide you with some testing instructions

Sam

Sorry for the delay. Yes, it’s possible but needs some work from the commandline. I’ve been trying to find time to do a howto on this and make it easier for people to install. If you haven’t found the discussion on this forum yet, bear with me a bit.

Not a problem at all. I was looking through the forum topics about bt audio but everything was about a2dp, but if you have or will have at some point dedicated thread for this new experimental bt audio just let me know.
I would be more than happy to study it and participate on testing.

If you are comfortable with the commandline, download the file from here https://collab.osmc.tv/s/hxG3JX4m3rY2XiM and put it onto your Vero. Run

sudo dpkg -i armv7-bluez-alsa-osmc.deb

Then have a look at the file .asoundrc.example in your home directory for instructions on how to make a file .asoundrc to use with your BT device(s).

Connect your headphones using MyOSMC or bluetoothctl from the commandline and your headphones should show up in Kodi’s audio settings.

Hi grahamh, thank you a lot for your support.
I just tested and installed armv7-bluez-alsa-osmc.deb and created .asoundrc which looks like this:

# This file describes the bluetooth sinks available for Kodi to play to
# add lines like the following for each BT device (speaker or headphones)

pcm.bose {
        type bluealsa
        device "XX:XX:XX:XX:XX:XX"
        profile "a2dp"
        hint { show on description "Bose QC35II"}
}

# using the MAC of the device (see bluetoothctl) instead of 12:34:56:78:9A:BC
# Use any letters or numbers for the description which will show up in Settings$

Again trying to connect with the headphones I get error

Failed to connect: org.bluez.Error.Failed

OSMC logs
https://paste.osmc.tv/rolerevoco

Nov 24 20:48:40 osmc bluetoothd[363]: a2dp-sink profile connect failed for XX:XX:XX:XX:XX:XX: Protocol not available

This pops up when I try to connect to headphones, what protocol am I still missing?

Sorry if it wasn’t clear. You need to find the ‘MAC’ for your headphones and substitute that for the XXs.

Type bluetoothctl and it should show you a list of paired BT devices, something like this:

osmc@vero4kp2:/sys/class/amvecm$ bluetoothctl
[NEW] Controller CC:4B:73:6D:FF:67 vero4kp2 [default]
[NEW] Device 08:B7:38:20:46:C5 LKBUBT14 Standard Bluetooth Keyboard
[NEW] Device FC:A8:9A:B3:42:4F JBL Flip 3
[NEW] Device CC:B8:A8:12:97:51 vero4k

Pick out the set of numbers for your Bose and put those in .asoundrc.

No no no no… Sorry for I did use the mac of the actual headphones, XX are just there for the censor the real mac of the headphones.
I guess it doesn’t matter to censor it.

I do manage to pair and trust the headphones but connecting gives me the error.

osmc@osmc:~$ bluetoothctl
[NEW] Controller CC:4B:73:78:10:E5 osmc #2 [default]
[NEW] Device 28:11:A5:48:3A:9C LE-Bose QC35 II
[NEW] Controller 00:1A:7D:DA:71:06 osmc
[NEW] Device C8:DB:26:0C:78:77 Harmony Keyboard

Can you post the output from this:

bluetoothctl
info 28:11:A5:48:3A:9C

I think I got it to connect (atleast it connects to headphones, but the headphones doesn’t recognize the vero). Still no different audio settings available.

Here you go bluetoothctl info

[LE-Bose QC35 II]# info 28:11:A5:48:3A:9C
Device 28:11:A5:48:3A:9C
Name: LE-Bose QC35 II
Alias: LE-Bose QC35 II
Class: 0x240418
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Vendor specific (00000000-deca-fade-deca-deafdecacaff)
UUID: Serial Port (00001101-0000-1000-8000-00805f9b34fb)
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Unknown (0000fdd2-0000-1000-8000-00805f9b34fb)
UUID: Unknown (0000fe03-0000-1000-8000-00805f9b34fb)
UUID: Bose Corporation (0000febe-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (81c2e72a-0591-443e-a1ff-05f988593351)
UUID: Vendor specific (91c10d9c-aaef-42bd-b6d6-8a648c19213d)
UUID: Vendor specific (931c7e8a-540f-4686-b798-e8df0a2ad9f7)
UUID: Vendor specific (f8d1fbe4-7966-4334-8024-ff96c9330e15)
UUID: Vendor specific (fe59bfa8-7fe3-4a05-9d94-99fadc69faff)
Modalias: bluetooth:v009Ep4020d0452
[LE-Bose QC35 II]#

Also I saw your previous reply about the gbus command (I needed to install the libglib packages).

osmc@osmc:~$ gdbus call --system -d org.bluealsa -o /org/bluealsa -m org.bluealsa.Manager1.GetPCMs
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluealsa was not provided by any .service files

systemctl status bluealsa

osmc@osmc:~$ systemctl status bluealsa

I feel stupid. I installed the package but never started the service.
So I guess sudo systemctl enable bluealsa.service should be done?

Probably just a re-boot. The installation should do the enable.

OK so I got it working now after bluealsa service started and Vero 4k+ rebooted.
I can again watch movies with headphones at night :smiling_face_with_three_hearts:

Bluetooth audio works great (and thank you for that!) but there are two things I noticed:

  1. If I turn the headphones off and back on after a while, headphones are trying to connect to Vero 4k+, but is unable to reconnect. I need to go to MyOSMC Network and Bluetooth settings and manually reconnect the headphones.
    It seems like Vero 4k+ is blocking the connection when the headphones are trying to reconnect?
    Have you noticed similiar behaviour and if so how I can avoid such behaviour?
    Headphones should be able to automatically connect back once turned on.

  2. Is it possible to change the alias/name of the bluetooth controller (the one headphones are connecting to)?
    Reason why I am asking that every time I connect to Vero 4k+ headphones tell me that I am connected to BCM4345CO Ampak 0073. Instead of this long list of nonsense I would like to change it something more simple like Vero 4k+ for example.

I can look in to this. But it may not be possible.

If it is - would OSMC be an acceptable name? We plan for bluez-alsa to run on Pi too

Yes absolutely OSMC is OK also.

1 Like

I can’t reproduce this. I can turn on my BT speaker any time and it connects to Vero. More importantly, I can take my BT speaker out of range and it re-connects when I get nearer to the Vero, but it can take a few seconds to do so. I assume you are initiating the pairing, trusting and original connection from Vero. It can make a difference which device is being used to do this. I wouldn’t ask but your headphones seem to be ‘smarter’ than typical devices.

The ‘renaming’ of Vero might be difficult. I can connect one Vero to another by BT and I get sensible names (see the bluetoothctl output above). The reported names are the ones set in /etc/hostname. Is that set on your Vero?

I will try to do the pairing process again to see if it solves the issue.
These headphones require that the pairing process will be initiated with the other device (smartphone or vero for example). When I was using Pulseaudio to stream audio via bluetooth then the headphones always reconnected without issue.

I will post results when I get back to home.
Thanks for your effort.