after spending the last couple of weeks trying to connect my bluetooth soundbar to my Raspberry Pi 3 B+ and playing all audio output on it I am close to giving up.

Using the GUI I can successfully connect the soundbar and I can also set it as the default audio device. YouTube audio plays perfectly on my soundbar and I also tested successfully with bluetooth headphones.

Using bluetoothctl I can also pair + connect it via Shell; however I have no clue how to set it as default audio device by using a shell script.

It seems there have been changes in the past versions of Raspbian and PulseAudio is not needed anymore and BlueALSA is the most recent solution. Most tutorials I found are still referring to PulseAudio.

Basically all I need to know is how to programmatically change the audio output device to this specific bluetooth device, without having to use the GUI, since I want to automate this step. After all is done I want to switch back to HDMI audio output.

uname -a tells me my current version is 4.14.98-v7+. I just reset + updated my RPi to make sure it's a fresh install.

Does anybody have a clue?

Thank you very much in advance.

  • I read your question with interest as I hoped it would shed light on my question. I run my Pi headless, but connections are made via bluetoothctl... and there is no option to set a "default" connection AFAICT. If I were guessing, I'd guess that the "default" option is a feature the GUI desugners added to their app.
    – Seamus
    Mar 29, 2019 at 21:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy