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

I was using ethernet port (with wifi access point), and BT dongle on RPI2. Then I swapped for RPI3. Nice overall performance improvement. Wifi seems to work ok - about the same as the Wifi access point which worked well.

Onboard BT I managed to get working. But the audio kept dropping out, and I would have to power-down and start again (i.e. pair, connect, set audio output). Often I would have to set audio to HDMI, then reboot, and then set audio back to BT streaming.

After a while I disabled onboard BT, and put back in my BT dongle.
This seems to be working better. It’s not dropping-out.

Note: this is in a home-brew media centre, and the RPI3 is behind
the screen. The range of the onboard BT might not be quite as good as the dongle. At one stage I left my BT speaker very close (about 1 meter away), but still I got fed up having to restart everything every so often.

Thanks.
Best regards,
Niall.

hi anbodearg

How do you disable the onboard bluetooth on rpi3?

Thanks

add a line in config.txt

dtoverlay=pi3-disable-bt

cheers :relaxed:

actually it took a few reboots, and also I removed the BT dongle, and re-inserted into the other USB port.

I was using a 5V2A power brick, and getting the occasional ‘rainbow box’ in the top right hand corner. So, I’m going to try with an official RPI 2.5A power supply and see if that was the cause of the problem with the onboard BT.

1 Like

@anbodearg
I tried different power supply and I still have the same issue as you.
Can you update your post or post a new answer if there is an improvement with a dedicated 2.5A power supply?

This sound dropping is driving me crazy and the quality of the analogue interface is not the best with my Bluetooth speaker.

Btw what dongle were you using ?

My BT dongle is the ModMyPi BLE4 dongle.
My BT speaker is Bose Soundlink Mini.

When it all works, it’s great, and the sound is very good.

I have it running 24/7, and this morning when I turned
on BT speaker … everything was working still
from yesterday.

I’ll report back when I upgrade power supply. I’m getting
the occasional rainbow - so I reckon power needs to be
resolved first.

Thanks for the information about the BT dongle.
I confirm with the CSR8510 it works flawlessly.

Which means the raspberry pi 3 has a problem with the onboard Bluetooth when used with the a2dp implementation.

@sam_nazarko Is it the good place to fill in a bug report about this ?

Yes: I’ve given up on the on-board BT for now.
The dongle works very well, though it would be nicer not to need it.

Most mornings I have to go through this:
(except yesterday morning, when everything just worked)

  1. reboot
  2. re-connect BT (it stays paired, but doesn’t always connect on boot up)
  3. change audio from BT streaming to e.g. HDMI
  4. change audio output back to BT streaming
  5. sometimes back to step 1.

Note: sometimes rainbow appears (very briefly) during step 3, and step 4.
So, I will try with official 5V2.5A p/s for RPI3, and I’ll report back.

Thanks.
Best regards,
Niall.

1 Like

Nice video anbodearg, that Bose Soundlink Mini sounds good where did you have it placed in video there?

I had no luck with on-board BT just tried dongle with my soundbar and its working good. :relaxed:

I notice that the audio is out of sync by second or so maybe its because im using v17 krypton test builds. Looks promising so far.

I read that the raspberry pi have put an update to the onboard BT so maybe this will help with this when sam updates it.

Im using the official 2.5a power supply and have had no issues with the rainbow icon.

@sam_nazarko I’m testing this feature on a seperate system as i want to keep my main system as stable as possible so is there a safe way to unistall this bluetooth a2dp testing if i decide to try it on my main system or should i stick with the testing system. I suppose i could just make a clone of my system onto another micro sd incase anything goes wrong. Thanks for your work OSMC is getting better everyday :relaxed:

There’s not a 100% clean way of uninstalling that I can recommend to users.

When it reaches the App Store, there will be.

I can confirm that. Using a separate dongle (CSL Nano) and deactivating the onboard btchip solved it for me.

Here’s my update.

I was using RPI2 with Wifi AP and RJ45 ethernet connection, BLE dongle, 5V2A power block.
Then I ‘upgraded’ to RPI3 with onboard wifi, and onboard BT. and 5V2.5A RPI supply.

OSMC seems to run a bit faster on RPI3. But otherwise, I was better off before the upgrade.

The onboard BT doesn’t work for audio streaming, but the dongle works fine.
The onboard Wifi doesn’t seem to have quite as good a range as the AP, so the
signal is dropping out from time-to-time when I am streaming the radio (from another OSMC :slight_smile:

Some days it just works, but most days I have to go through a reboot/reset cycle to get the audio to
stream to my BT speaker (which is a real pain).

Also, I got file corruption this morning. So, I will have to make a new OSMC install :frowning:
I had not done anything different, and the system is running 24/7. “it just broke”.

Probably I will go back to my previous config and see how that goes.

(sorry this is so negative, but hopefully there is some helpful feedback).

Thanks.
Best regards,
Niall.

Is it possible to change the sink for the sound streamed over Bluetooth to OSMC? If so, how? Do I need to edit some configuration files or something?

Some background information that might help: I connect my phone via Bluetooth to OSMC running on a RPi2. I use my phone to play music and thus I stream over Bluetooth to OSMC. This is working fine.

All sound is outputted to audio interface PI:HDMI as that’s how I configured Kodi. However I wish to route all sound coming from Bluetooth to an external USB sound card (a PCM2704 DAC). That way I hope to transport the Bluetooth sound digitally (via S/PDIF) to my receiver to get the best possible sound (quality-wise).

TL;DR

So to rephrase my question: is it possible to output all sound that is streamed to OSMC over Bluetooth to an external USB sound card (a PCM2704 DAC) whilst leaving Kodi’s sound output configuration (which is set to PI:HDMI) untouched?

Update:
Now using fresh install of OSMC on RPI3 with onboard wifi and BLE dongle (and RPI 5.1V/2.5A psu).

Previously the BT pairing and Audio streaming setting both seemed to be randomly forgotten.
One day everything would ‘just work’ … but then another day, I would need to reboot, and set/reset BT
and audio output.

Now, after a couple of days running, it all seems to be more stable - and I don’t
have to do all that rebooting and setting/resetting everything.

Early days … but so far it looks to be better than before…!

Thanks.
Best regards,
Niall.

Hi I’ using a iPhone 6s, paired with osmc to stream music to osmc. All working fine.
But when restarting osmc the phone is not connected anymore and no reconnect is happening.

When using the phone BT menu to connect or “osmc tool” reconnect, the iPhone is connected again.

how can I configure osmc that when available, the BT connection does a auto reconnect?
Is it possible to configure via bluetoothctl?

another update:

BT connection seems to persist.
I have it running 24/7 and when I power-on my Bose speaker in the
morning, the BT connection to OSMC is still there (good improvement).

But Audio output to BT speaker seems to get forgotten. If there is
no audio output overnight, then in the morning the audio output setting
seems to be lost.

Tried changing to HDMI, and then back again (that used to work).
Did a reboot and the audio connection got restored again.

I might setup OSMC to auto reboot every morning, and
see if that resolves it.

Thanks.
Best regards,
Niall.

Update:

Audio output seems to get ‘forgotten’ overnight.

The BT speaker powers-down after a while of no audio.
When I power-on the BT speaker in the morning, it will auto-connect to OSMC (nice).
But the Audio output to BT speakers then needs to be reset.

I tried manually changing to HDMI, and then back to BT - that worked.

Thanks.
Best regards,
Niall.

Until this issue is resolved a quicker workaround If you have to keep switching audio output to BT speakers, then maybe using this audio profiles switcher addon you can map a key on your remote and it will switch between audio outputs instead of having to go into settings each time.

Installation Instructions here
http://forum.kodi.tv/showthread.php?tid=200081

Thanks for the suggestion!

Actually, I think it should be possible to use JSON-RPC to set Audio Output setting to HDMI … and then (a couple of seconds later) set it back to BT Speaker.
A three line bash script using curl would do the job
(if I knew the JSON-RPC command).

I have a reboot scheduled everyday at 6am, so I could run this 5 mins later.
Might be worth a try…?

Thanks.
Best regards,
Niall.