[Deprecated] [TESTING] Bluetooth audio streaming (A2DP)

Thanks to Sam and gezb I now have bluetooth working with my headphones.

For anyone else with a RPi3 who purchases the OSMC dongle here are the steps in one place (probably a good idea to back up your RPi build before doing this):

I. In terminal enter:

sudo -s
echo “deb http://apt.osmc.tv krypton main” >> /etc/apt/sources.list
apt-get update
apt-get -y dist-upgrade && reboot

Result: Changed to OSMC skin, Kodi now 17.0-RC1

II. Downloaded confluence skin - everything now looks like it did before(My-OSMC no longer shows in System sub menu - but can access through Programs).

Cannot pair to bluetooth devices yet

III. Checked config.txt (onboard BT disabled). The lines I had added were:

dtoverlay=pi3-disable-bt
dtoverlay=sdhost

(the last line disables wifi - omit if you don’t want to - but I think some posts suggest it may interfere with bluetooth)

IV. In terminal enter:
sudo -s
sudo apt-get install -f a2dp-app-osmc

(perhaps reboot here)

V. Go into addons → Services and enable BTPlayer

VI. Now able to pair headphones from Network menu in My-OSMC!!! - Success

VII. In Kodi go into System ->Settings ->System -.Audio

change Audio Output to: ALSA: OSMC streaming to bluetooth…

I also changed Output Configuration to: Best Match (think this aligned sound and video better)

All the Best

3 Likes

This isn’t working for me, nzpm. I followed step by step and when I searched for devices, it doesn’t find either the speaker or headphones that I have. I have the official OSMC bt adapter. Where are you seeing BTPlayer? Is that referring to the PulseAudio service because that is showing ‘running’. Also, is there any way to only disable the bluetooth and not wifi? That’s how I’m connected to my network.

(this is my first post, so if I need to post in a new thread, let me know). Thanks

Looking @nzpm’s instructions full instructions the only piece he has missed is installing the a2dp-app-osmc package

sudo apt-get install -f a2dp-app-osmc

This package installs the packages and configuration that enable the A2DP protocol and the BTPlayer service that triggers the new KODI player when audio is streamed via A2DP from a compatible device

Currently our work has focused on streaming to OSMC not from OSMC to headphones/speakers although I know @sam_nazarko has some changes to improve this coming

as per gezb’s reply I’ve updated the list of steps

thanks

2 Likes

Cheers – just to clarify, BT audio streaming will work on Kodi v16, but for the benefits of playback status and information when streaming from a device to OSMC, you will need to be running a Kodi v17 (Krypton) build or later.

Thanks for the replies guys. With the pi3 bt disabled, should I still be going to the Network, Bluetooth, Enable/Discovery when using the USB bluetooth dongle? Because that’s where I’m at and it’s not finding anything.

Again, thanks @nzpm for that write up. I’m so close…

yep steps four to six is what you should need (and enable pairing on the device you want to connect to)

I have no audio output anymore on my USB sound card after I applied the following Updates:

  • October
  • November
  • December

Audio output mode: (ALSA Streaming)

After uninstalling the BT package, sound is working fine.

Audio output mode: USB analog

I haven’t updated the system a while ago (I’m running the September update and BT streaming and it is working fine.
A few days ago I decided to update my system to the latest version.
After the update finished, there is no audio output on my USB sound card while BT streaming is installed.

I think the output device behind ALSA BT streaming is the wrong one. Could that be checked / changed?
Even reinstall of BT streaming did not help.

regards

It’s finding nothing.

So I did some testing. I disabled the BTPlayer and removed the usb dongle. Bluetooth is removed from my Network list. I Enabled BTPlayer again and still Bluetooth is not in the list. I insert the dongle and Bluetooth shows back up under Network. The dongle is red when it’s first on and will blink when I tell it to search. It’s just not finding any devices. I’m not seeing it from my phone either. Any thoughts?

not from me - sorry

Thank you!! Finally I can connect and play audio to bt speaker.

Did you disable BT on-board adapter (if using Pi3)?
Can you try in a PC to discover devices?

What devices are you trying to pair?

Does an older version of OSMC (from Download - OSMC) bring back functionality?
Which USB sound card are you using?

thank you for your reply @sam_nazarko! I’m using a Behringer 222 USB sound card. But I don’t think it is related to the card.

If I uninstall Bluetooth streaming with the latest update still applied, it brings back the functionality.
Is there a config file that I can check? Could it be related to the pulseaudio config!?

USB sound cards aren’t expected to work properly at this time, but it may be something that we focus on for the future.

You may indeed be able to configure PulseAudio to work with this but I’m not really able to advise at this time

Sam

@sam_nazarko, I’ve just installed this thing yesterday on the latest OSMC release (not beta build) and it all just worked out of the box with an external USB sound card – I’m still a bit shocked that I didn’t even need to tweak anything :smile: so it works better than you think, even!
Thanks a million for all your efforts

Yes, I disabled the on-board and that’s when I find nothing. Actually in testing, I found that the on-board can find the devices, connect, but then I lose connection (hence the usb bt).

I tried in my PC, and it finds nothing. The usb device does not appear to be working. That’s searching for speakers, headphones, Phones, etc, from both PC and Pi.

Check Device Manager, does it show the device?

On my PC, it showed the bluetooth device. It installed the drivers and the bt logo showed up. I was able to do a scan from within Windows, and no results came back. I was actively able to find multiple devices in my household from my phone at the same time.

Anyone got Mobile phone->OSMC audio streaming working on a Pi3 with the integrated BT? Any sound at all? I don’t care if it’s dropping after some time or stuttering. I’m just asking because I’ve tried (and also with several other BT dongles) and I can’t get any audio out of the A/V receiver (connected to the Pi). The phone shows as connected and playing, I can see song info, but no sound at all. I’m starting to think it’s some issue with audio routing or volume levels, but I’m not too familiar with pulse audio or alsa. Please, any ideas are much appreciated.