4

I am currently running the latest Raspian Jessie on my Raspberry Pi 3 and I have attempted to use my Sony bluetooth headphones. I am able to pair and connect the headphones, but when I try to switch the audio source to them by right clicking on the audio icon it says, "Failed to connect to device-Could not connect to PulseAudio. Try to connect again."

I run the command bluetoothctl > info BB:BB:BB:BB:BB:BB (my bluetooth headphones) and it outputs the following:

Name: MDR-XB950BT
Alias: MDR-XB950BT
Class: 0x240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)

Also, here is the link to the model of my headphones: MDR-XB950BT

1
  • Is pulseaudio running as a user level or system? What is the output of pactl list sinks vs sudo pactl list sinks? If you can find your headphones as a sink on either what you can then do is get the card number via pactl list cards use sudo if needed . From there pactl set-card-profile $cardnumber a2dp_sink, then try setting the sink-input to the sink. It should play. However, I found with pulseaudio5 playback sucks, you may want to compile pulse6. Dec 10, 2017 at 0:31

2 Answers 2

5

I have created a script that will set this up for you automatically. It is apart of another project but can used without the main project. Simply use the following commands

   git clone https://github.com/bareinhard/a2dp_bluetooth
   cd a2dp_bluetooth/a2dp_source
   ./configure
   # answer the one prompt it asks for and wait for the install to complete then reboot

from there you just need to pair, trust, and connect to your device. From then on every time you turn on your device it should pair to the Pi. If audio is playing when the device is turned on and connected the playing music a udev rule will then move the sink input to your connected device.

If you would like a deeper walkthrough of what is going on, I'd urge you to take a look at the answer I left here:

https://raspberrypi.stackexchange.com/a/76288/43610

4
  • does that work on raspbian stretch? Jan 15, 2018 at 3:15
  • @answerSeeker working on a stretch fix but it’s pretty similar. It should be working in the next week or so Jan 15, 2018 at 3:18
  • I hope it'll be able to fix my problem. Default stretch bluetooth settings work but only on web browsers, so youtube on bluetooth no issues. I tried local music players like clementine and kodi but they always end up using my TV's speakers instead. Apparently the pi is able to route Bluetooth audio from chromium to my Headset and play a different type of audio to my TV using a music player all simultaneously. Jan 15, 2018 at 4:12
  • How does that answer the OP's question ? He has no output although the bluetooth device is already paired and connected Apr 30, 2019 at 20:39
4

This is a pretty old post but I will give my solution for it helped me with (2020-02-13-raspbian-buster-lite)

Edit the file /etc/dbus-1/system.d/bluetooth.conf

scroll down to the bottom of the file where you should see:

<policy context="default">
    <deny send_destination="org.bluez"/>

Change the "deny" to "allow"

I am using an UE-BOOM bluetooth device. Hope this helps

1
  • This worked for me, I have been trying to find out why in GOD's name the BT was not working as default. thanks a ton
    – ort11
    Nov 25, 2020 at 20:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.