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

Simply use the Kodi remote app for iPhone to change the volume. I am sure there are plenty of apps, I believe the official one is called Kore.

Hi zilexa,

I’m using kodi remote app on my iPhone, I do can change volume while playing films or videos.

If audio is streaming from iPhone to Pi via bluetooth, OSMC has no control of it (at the moment).

Did I misunderstand what you mean?

Sorry I made a mistake. I assumed if you can control volume via Kodi remote app, it should work whether you are playing a video on Kodi or streaming bluetooth to Kodi. But that’s my mistake. Kodi volume has nothing to do with Bluetooth volume.

Devs, thanks for the work, A2DP is a great way to watch movies in a smallish flat.

I can get audio streamed to a bluetooth speaker using the ASUS USB-BT400 bluetooth dongle. I have a Raspberry PI 2. I am unable to easily get a CSR 4.0 dongle where I live.

There are a few problems, even if successfully paired

1.) There is no audio until a movie is started, then UI sound effects are played as well afterwards
2.) Sometimes after pairing it is not possible to stream audio. I don’t know if this happens after re-connect when the bluetooth connection is disrupted, or if it is just random. If I restart the PI, then it is possible to stream again. Not sure if I can always stream after restart, but there definitely is some flakiness.
3.) However, it seems that IF streaming does start, it is reliable and of good quality.

Hope this helps, regards.

Is it possible to play audio over BT and analog/HDMI simultaneously?

I asked Sam about that and he said:

You can get dual audio output, but that just clones the AudioEngine sink, which isn’t ideal, and will cause issues with the new DSP addons coming up.

thanks

At first I thought this wasn’t working, but then I realized the volume was very low. I used amixer to set the volume to 100% with the following:
amixer -D pulse sset Master 100%

After reading I also tried the following:
pactl set-sink-volume 0 75%

Neither did anything until I turned my TV on and off and then it became very loud. However, I’m now getting strange volume issues overall. Sometimes system sounds and media played through OSMC gets stops or gets very quiet. Turning on an off my TV will usually cause it to get loud again. I almost blew out my speakers at one point. In general, everything seems louder than it was before I tried any of the bluetooth setup.

My Raspberry Pi is hooked up to my receiver via HDMI. I’m using an iPhone to stream bluetooth and the volume controls on that don’t seem to do anything (unless I turn it all the way down). Any ideas what’s going on and how to manage the volume changes?

Hi,

I’m having some problems:

Installed 2015.11-1 using the Windows installer on a Raspberry Pi 2
Attached WiFi & Bluetooth dongle (official dongle bought from OSMC)
Booted up,
Ran an update via My OSMC
Enabled debug logging & rebooted
added dtparam=audio=on to /boot/config.txt
ran wget http://paste.osmc.io/raw/qiyekuvafe -O- | sudo sh

Attempted to pair (with PIN):

Samsung Galaxy S3 / Android 4 - worked fine
Nokia 635 / Windows 8 - paired, but couldn’t steam audio
iPhone 5S / iOS 9.2 - won’t pair - phone doesn’t ask for the PIN entered into OSMC
iPhone 4 / iOS 7.1.2 - worked fine

Logs: http://paste.osmc.io/uqokodetuv

I’m mostly interested in getting my iPhone 5S working

All devices work fine with a BlueNANO Bluetooth speaker (although for some reason OSMC can’t see this)

Let me know if there’s any more troubleshooting I can do!

I had a little trouble with my iPhone, but the following worked using the GUI:

  • Enable Bluetooth
  • Turn on scan for devices
  • Once you see your iPhone in the list, turn off scan for devices
  • Open up the Bluetooth settings menu on your iPhone
  • Select the iPhone name in Kodi and press pair with pin
  • You’ll see the pin pop-up on Kodi and you should see a notification pop up on your phone with the pin.
  • Select pair on your phone.
  • Select pair on Kodi.

That works fine with an iPhone 4 + iOS 7.1.2, but not on my 5S or iPad 2 which are both running iOS 9.2. I get as far as creating a PIN in Kodi, and Kodi asks me to enter it on my phone, but no dialogue appears on the iPhone and I immediately get a connection failed error in Kodi.

Which iPhone / iOS version are you using?

Thanks.

I was able to get pairing correctly with an iPhone 6 on iOS 9.0.2. I am having the volume issues I described though.

I wonder if Apple have done something in 9.2 to break it (although 9.2 works fine with my Bluetooth speaker and car stereo). It’s so frustrating as Airplay is broken in 9.x too.:confounded:

I can send audio from Rpi to a logitech bluetooth receiver connected to my speakers but there’s some problems :

With my system this is working (with 3sec delay) for files in the SD card.
If I try to play something online, everything bugs :
If I watch the video with headphones the video plays smooth and without any problem.
If I watch the video with bluetooth signal send to bluetooth the video plays and stops, even the ssh server from where I drive “code” instructions is very very slow.

No idea of what could it be… need help please :slightly_smiling:

I installed the 2015.11-1 release on a raspberry pi 2.
I want to send OSMC audio to a bluetooth speaker, and so far it’s working really well.

board : raspberry pi 2
bluetooth speaker : Bose SoundLink Mini II
bluetooth / usb dongle : belkin Mini Bluetooth v4.0 Adapter

The only issue I have for the moment is when rebooting OSMC, it doesn’t connect automatically to the speakers, nothing a script can’t fix.

so i wanted to give an update with the ASUS BT-400. Unfortunately it rarely works. And I can’t reproduce the circumstances that make it work or break it.

The donble pairs with bluetooth devices; I can see my bluetooth speakers in the user interface and when I pair, the status light on the speaker changes, suggesting that pairing is successful. I’ve also confirmed it on the command line. But sound plays only 1 in 10 times maybe. After rebooting switching bluetooth speakers, playing with various settings, sometimes, magically sound will play. I have the latest updates from OSMC and followed the steps posted above. I have tested with Creative MUVO and T-12 bluetooth speakers.

I will try to find a CSR 4.0 dongle, I suppose. Because it seems that is the only dongle which people have reliably gotten to work. It’s a pity, really; bluetooth is a really nice option to have when you’re in a small flat and cannot afford an HDMI 5.1 system.

While this doesn’t have to be a Bluetooth problem it could also well be a hanging pulse server. Try to restart the pulse server after pairing

If bluetooth audio is working, and then I disconnect and reconnect, it will not work again. At this point I try to restart pulseaudio by several methods, e.g.,

systemctl restart pulseaudio.service

or

sudo pulseaudio -k
sudo pulseaudio -D

or kill -9 pid (of pulse audio)

None of the commands restore bluetooth audio after reconnecting to the speakers. In addition, pulseaudio seems to respawn when I kill it. But if I restart osmc, bluetooth starts working again. I guess this is some progress, because before I tried killing pulseaudio, restarting osmc wouldn’t even fix the problem. What is the proper way to restart pulseaudio under osmc?

Regards.

I think I’ve found the way to restore audio on a semi-reliable basis. If audio fails, then

1.) Stop any content playing
2.) restart pulseaudio with ‘systemctl restart pulseaudio.service’ from user osmc
3.) reconnect bluetooth device
4.) play audio or video content

it seems that if there is content playing during steps 2 and 3, then there will be no audio. I don’t know why all this is necessary, but maybe someone with more familiarity with OSMC has some insight.

hi and thanks.
My M70 Plantronics works with CSL 4.0 dongle bluetooth but the audio of 1080p AC3 films is asynchronous and there are a lot of interference specially in action scenes. Can i do something? thanks