Kodi Community Forum

Full Version: Bluetooth not working on Raspberry Pi 3 B+ with Raspbian Stretch 9
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I switched from jack-plug headphones to Bluetooth, but learned that Kodi 18 does not support it on my Raspberry Pi 3 B+ with Raspbian 9 Stretch. There is already a thread on this topic in the Raspberry pi section without comment. In the System->Audio section Audio Output settings allow for the choice ALSA:default, HDMI, Analog, Both. As i found nowhere else an option to configure Bluetooth headphones in Kodi 18, i tried to make my Bluetooth headphone the default ALSA playback device. Modifying the .asoundrc appropriately and testing the Bluetooth connection to my headphone it was properly configured as ALSA default playback device. So, i selected the Audio playback device Alsa:default from the Kodi System->Audio audio Output settings and instead of hearing sound through my Bluetooth headphones, it came again on HDMI. this tells me that the ALSA:default option does not really use the ALSA driver for playback. This might be a simple programming error of the Menu entry for Audio Output. But i ask myself, why there is no more option to turn on Bluetooth speakers in Kodi? I suppose that Bluetooth headphones are a technically up-to-date way of consuming your media, so it would be reasonable that Kodi allows its use also on Raspberry Pi multimedia centers running on Raspbian. I saw other reports using Bluetooth headphones successfully with OpenElec, but really i think it would not be too hard, to get it working under Raspbian too?
LibreELEC on RPi3B+ also has a BT problem. The BT adapter can vanish at any moment, and sound via BT simply stops.
So with your report, I'd say it is likely a Linux kernel and/or BT driver problem.
Well, first I don't think this is really a bug, more like something that never was implemented in Kodi. There is only support for bluetooth devices in Kodi with PulseAudio. And Raspbian does not ship with PulseAudio installed anymore, they now use ALSA with patches to work with bluetooth devices.
So in Raspbian, you have 2 options:
-Use ALSA and patch/workaround Kodi with it.
-Install and use PulseAudio.

-For ALSA, you have a thread here on how you can make it work:
https://www.raspberrypi.org/forums/viewt...8&start=25
Follow my (rascas) advices, it will work.
-For PulseAudio, I don't now how it is now, I don't use bluetooth devices, so I can't test this frequently, but I think you just need to install PulseAudio. And start kodi with this variable:
KODI_AE_SINK=PULSE kodi
(This is because Kodi on Raspbian uses ALSA by default, you must force PulseAudio for it to work correctly)

Sorry for the little information, I just don't remember this much.
rascas: I looked into your thread reference. During my research in the internet i stumbled over all those recipes in that thread. The point is that it should work. As i reported in the beginning, i checked my bluetooth connection with the ALSA driver. My bluetooth reported correctly that they are connected. The bluetooth command line tools also reported the properly connected device. I think that this is still a Kodi issue.

Klojum: Then if LibreElec also fails to support Bluetooth, my first guess would not be that the bluetooth drivers of my RaspBian (aka Debian 9 stretch armhf) are compromised. If at all then maybe some of the Raspberry Pi specific drivers might have caught some cold or got infected by trolls. The problem seems to me to be centered around Kodi itself, LibreElec being a kodi tailored solution and Kodi 18 having dropped a bluetooth option that was still there some versions earlier. As i said: Bluetooth technology for wireless headphones is an up-to-date technical approach for shiny well-designed media centers. Maybe someone wants to kill and depopularize Kodi on cheap platforms like the Raspberry Pi 3?
With ALSA, did you changed advancedsettings.xml accordingly with your case? As you can see in that thread, me and more people succededt getting Bluetooth audio in Kodi with ALSA.

And don't forget the PulseAudio alternative, thats probably easier.
rascas: I checked as you said your thread again. I added according to the conclusive method in that thread the following lines to .kodi/userdata/advancedsettings.xml file:

    <audiooutput>
        <audiodevice>ALSA:bluealsa</audiodevice>
    </audiooutput>

yielding a complete file configuration of

<!-- Created using Easy Advanced Settings addon -->
<advancedsettings>
    <network>
        <buffermode>2</buffermode>
        <cachemembuffersize>300000000</cachemembuffersize>
    </network>
    <audiooutput>
        <audiodevice>ALSA:bluealsa</audiodevice>
    </audiooutput>
</advancedsettings>

As this should have done the job according to your thread and additionally to my correctly configured and tested Bluetooth Headphone in Raspbian (Debian 9 stretch armhf) i found that the adjustment option for Audio Output vanished completely from the System->Audio settings. Furthermore, switching on the bluetooth device and letting it connect, Kodi 18 Leia did not switch to Bluetooth output via ALSA. Looks really like there are some trolls in the Kodi developer community who get bribed or blackmailed to damage the codebase as far as possible. Kodi being to a large part open-source and free and derived from the Microsoft Xbox Media Center, i suppose that Microsoft would not have transferred XBMC to the open-source free software community if they had any other choice to still make it a cashcow. Thus those attempts to damage the reputation of the Raspberry Pi platform and Kodi operability are the last breaths of the satan...
Thread moved to the Pi section, as it's a bug report not a feature request.
(2019-02-17, 08:42)Thomas Korimort Wrote: [ -> ]Kodi being to a large part open-source and free and derived from the Microsoft Xbox Media Center, i suppose that Microsoft would not have transferred XBMC to the open-source free software community if they had any other choice to still make it a cashcow. Thus those attempts to damage the reputation of the Raspberry Pi platform and Kodi operability are the last breaths of the satan...
 Get a clue and go seek professional help with your paranoid conspiracy theories.
Kodi (former XBMC) was never a MS product, never had anything to see with MS, except for "xbox" part in "xbox media center",
which is exactly why the project name was changed to "Kodi" in the first place , to avoid using a MS trademark.

Posting shit like this and also like that https://forum.kodi.tv/showthread.php?tid...pid2822586 won't help you get help.
I have my 2 rpi3s working perfectly with a bt headset and a soundbar, but I won't spend my time helping an idiot.