Connecting Bluetooth Headphones to OSMC

I am not able to connect my LC 8600 Bluetooth headphones to my version of OSMC.

Build: OSMC running Kodi 16.1
Compiled: Oct 29 2016
Raspberry Pi 3

Within My OSMC I check Enable Bluetooth and Discovery

I can see the headphones pop up.
I connect using a PIN (never get prompted for a PIN)

They show up briefly in the Paired devices, turn blue for a second and then back to RED

I never get sound. They never show blue again but always stay in the Paired device list.
I am not using any type of BT dongle

1 Like

Thank you!

That indeed did work to connect to my LC 8600 BT headphones. It stayed blue.

  • lip sync is way off
  • it dropped about 3 minutes after

But it did work. I wish I could seamlessly go back and forth from using BT to HDMI audio without having to go into Settings.

But I see it’s being worked on. Thanks for the update. It got a lot further than the default which saw the device and paired with it but wasn’t able to go any further.

Try using another adapter for better synchronisation

More seamless swapping between BT and HDMI audio is being worked on.

1 Like

At the moment… I am not using any adapter. Just whatever BT support is on my Raspberry Pi 3 Model B board.

Although I do have a Fitbit adapter and one that came with a BT wireless keyboard.

People seem to have a better experience with other (external) adapters.

I plugged in the Fitbit adapter (not even sure if it’s Bluetooth)…

Syncing is off but the audio connection never did drop

I ordered the BT dongle from the store. Depending on the postal strike… it could be here in a week or longer. In the meantime, there’s been some progress.

Bluetooth headset is connected since that last round of updates. But when sound does drop… it never come back. In fact, if I go to Settings and switch back to HDMI for audio, there is no sound. I’ll go back and forth without sound (HDMI to ALSA)

No sound.

Restart Kodi… sound is back. I can switch to Bluetooth.

So when I drops… it drops and kills the sound on the entire system.

sudo systemctl restart pulseaudio might bring same success

Indeed… it did help.

Eventually BT quit… sound gone.

Ran the command.

Audio came back to the system (thru HDMI) but BT still does not work. However, I didn’t have to reboot to get it back. Your trick at least got regular HDMI sound working again!

Thank you.

I started to see this in the log files when I’d lose BT and attempt to get it back…

13:04:43 3390.704102 T:1943421936 ERROR: CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover
13:04:43 3390.740479 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.740723 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.765869 T:1943421936 ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover
13:04:43 3390.766113 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.766357 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.791504 T:1943421936 ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover
13:04:43 3390.791748 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.791748 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.817139 T:1943421936 ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover
13:04:43 3390.817139 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.817383 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.842529 T:1943421936 ERROR: CAESinkALSA - snd_pcm_writei(-5) Input/output error - trying to recover
13:04:43 3390.842529 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(1)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.842529 T:1943421936 ERROR: CAESinkALSA::HandleError(snd_pcm_writei(2)) - snd_pcm_writei returned -5 (Input/output error)
13:04:43 3390.867676 T:1943421936 ERROR: CActiveAESink::OutputSamples - failed
13:04:43 3390.867920 T:1943421936 ERROR: CEngineStats::UpdateSinkDelay - inconsistency in buffer time
13:08:09 3596.800049 T:970630128 NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 21

Got the official BT dongle!

Observationally, it seems like once BT connects it works longer. But once it drops and it does, you really can’t get it back until you reboot.

Then it’s a matter of switching back and forth between HDMI and ALSA until you hear sounds thru the headphones. It doesn’t always work. Takes time.

The funny thing is… under My OSMC, the headphones always show and are detected when I switch them on and off.

Reboot…

  1. System sounds thru HDMI work fine
  2. System-Settings-Audio output switch to ALSA: OSMC streaming to Bluetooth speaker/headphones
  3. Silence

I see this in the log file

14:58:38 134.092010 T:1943094256 ERROR: CAESinkALSA - snd_pcm_writei(-32) Broken pipe - trying to recover

  1. Switch back to HDMI
  2. Silence

Then this…

15:01:03 279.501465 T:1875981296 ERROR: ActiveAE::DrainSink - failed to drain
15:01:03 279.501770 T:1875981296 WARNING: CActiveAE::StateMachine - signal: 1 from port: OutputDataPort not handled for state: 1
15:01:09 285.002563 T:1875981296 WARNING: Previous line repeats 8 times.
15:01:09 285.002808 T:1875981296 ERROR: ActiveAE::InitSink - failed to init
15:01:09 285.002960 T:1875981296 WARNING: CActiveAE::StateMachine - signal: 1 from port: OutputDataPort not handled for state: 1
15:01:14 290.503662 T:1875981296 WARNING: Previous line repeats 10 times.
15:01:14 290.503876 T:1875981296 ERROR: ActiveAE::InitSink - failed to init
15:01:51 327.058350 T:1755702256 ERROR: Previous line repeats 6 times.
15:01:51 327.058563 T:1755702256 NOTICE: script.tv.show.next.aired: ### starting data update
15:01:53 329.007935 T:1875981296 ERROR: ActiveAE::InitSink - failed to init

Reboot and I’m back to system audio or restarting Pulseaudio sometimes works.

We are aware of this problem.

The trick is to turn off BT on the phone when you are finished streaming, but this will not always work with 100% reliability.

Sam

I’m not connecting to my phone… it’s BT headphones directly to the OSMC BT dongle.

Bluetooth Sound Drops moments after playing a TV Show

1. Power Up OSMC
2. Verify sounds are coming from HDMI - success
3. Turn on Bluetooth headphones
4. Sounds still coming from HDMI
5. Verify Bluetooth is enabled and device shows connected in My OSMC - success
6. Settings - System -Audio Output switch to ALSA: OSMC streaming to Bluetooth speaker / headphones
7. Verify sounds are coming from Bluetooth headphones - success
8. Find TV Show start playing - success thru BT headphones
9. Turn on Num Lock on keyboard

Sound dropped from headphones!

http://paste.osmc.io/uvidevonam

Rebooted… did everything above EXCEPT #9… I did not touch the Num Lock (how I increase the volume) and used the volume controls on the headphones.

Able to watch the show via BT all the way thru.

Other keyboard commands (pause, disable subtitles) worked during the show without disrupting BT.

Update:

  1. Edited config.txt using the MyOSMC editor from a previous thread that talks about disabling the onboard BT.

  2. Had to enabled BT and turn on Discovery… it finds my BT headphones

  3. Dongle is actually blinking red which it never did before. I think it just automatically uses the onboard BT and never the dongle unless you disable it on the board like I did.

  4. Switched the sound to ASLA

  5. BT is working thru the headphones

Waiting to see if this is more stable as I don’t think I was ever really using the USB BT dongle even though it was plugged in. Light previously was a solid red. It never blinked like something was connected until I disabled the onboard BT.

Switched off headphones…

Sounds then play thru HDMI!

Switched back on headphones… sound is gone. Switched audio options from HDMI to BT doesn’t work. Sounds just gone.

Rebooted.

After the reboot, I had to go back and re-connect thru MyOSMC

Then switch to using ASLSA… and sounds are coming thru the headphones.
Light is steadily blinking red

It was kinda neat at one point I was able to go from the system sounds… to BT… back to system… back to BT. That is rare though.