1

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

  • 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. – Brett Reinhard Dec 10 '17 at 0:31
2

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

  • does that work on raspbian stretch? – answerSeeker Jan 15 '18 at 3:15
  • @answerSeeker working on a stretch fix but it’s pretty similar. It should be working in the next week or so – Brett Reinhard Jan 15 '18 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. – answerSeeker Jan 15 '18 at 4:12
  • How does that answer the OP's question ? He has no output although the bluetooth device is already paired and connected – Mehdi LAMRANI Apr 30 at 20:39

Your Answer

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

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