Gustave_Coste
Posts: 4
Joined: Thu Aug 03, 2017 7:18 am

Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Thu Jan 04, 2018 11:12 am

Hi, I know Rpi forums are full of posts about connecting bluetooth devices but I just haven't found any solution to my problem yet.

Here's the situation:
I have a headless Raspberry pi 3 running Raspian Stretch and a UE Boom 2 bluetooth speaker. I would like to play my music/movies on that speaker via Kodi (wich is installed and works fine).

I have both pulseaudio and pulseaudio-module-bluetooth installed. I already succeeded to pair and trust my speaker, but not to connect to it.

Here's how I try to connect to my device:
Running pulseaudio:

Code: Select all

pulseaudio --start
ps aux | grep pulseaudio
pi        1225  0.2  1.0  94136  8224 ?        Sl   10:05   0:08 /usr/bin/pulseaudio --start
pi        1797  0.0  0.0   4284   544 pts/0    S+   11:03   0:00 grep --color=auto pulseaudio
Trying to connect to my device:

Code: Select all

sudo bluetoothctl
[NEW] Controller YY:YY:YY:YY:YY:YY nextcloudpi [default]
[NEW] Device XX:XX:XX:XX:XX:XX Mag BOOM
[bluetooth]# info XX:XX:XX:XX:XX:XX
Device XX:XX:XX:XX:XX:XX
        Name: Mag BOOM
        Alias: Mag BOOM
        Class: 0x240418
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
        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)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v000ApFFFFdFFFF
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
Failed to connect: org.bluez.Error.Failed
Of course, the device is on and near my Raspberry pi...


Do someone have any idea of the source of the problem?

Gustave_Coste
Posts: 4
Joined: Thu Aug 03, 2017 7:18 am

[Solved] Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Fri Jan 05, 2018 5:49 pm

I solved the problem, I just needed to use bluetoothctl without beeing root.
viewtopic.php?f=44&t=108581

I managed to connect to my bluetooth device, but kodi doesn't read any sound on my speaker...

Adex1
Posts: 4
Joined: Sun Jul 22, 2018 7:29 am

Re: Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Tue Jul 24, 2018 9:25 pm

Hi,

I am not sure if I should open a new topic but the error is exactly the same, I have a pi zero though!

[bluetooth]# pair B8:D5:0B:3A:74:E5
Attempting to pair with B8:D5:0B:3A:74:E5
[CHG] Device B8:D5:0B:3A:74:E5 Connected: yes
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device B8:D5:0B:3A:74:E5 ServicesResolved: yes
[CHG] Device B8:D5:0B:3A:74:E5 Paired: yes
Pairing successful
[CHG] Device B8:D5:0B:3A:74:E5 ServicesResolved: no
[CHG] Device B8:D5:0B:3A:74:E5 Connected: no


[bluetooth]# connect B8:D5:0B:3A:74:E5
Attempting to connect to B8:D5:0B:3A:74:E5
Failed to connect: org.bluez.Error.Failed

I followed the steps suggested - adding specific parameters for the pi user but nothing has changed.

Any suggestion?

User avatar
Douglas6
Posts: 5211
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Tue Jul 24, 2018 10:33 pm

You can't usefully connect a Bluetooth speaker with bluetoothctl. Use the GUI. There are instructions on the Pi website; basically you can pair it from the Bluetooth menu, and connect to it by right clicking on the volume icon.

Adex1
Posts: 4
Joined: Sun Jul 22, 2018 7:29 am

Re: Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Tue Jul 24, 2018 10:47 pm

Hi Douglas,

I am using the stretch version of raspian. Is there no way to just do it già via terminal?

User avatar
Douglas6
Posts: 5211
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, USA

Re: Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Tue Jul 24, 2018 11:10 pm

Well, Stretch doesn't preclude the GUI, but if you are using the lite version, or you're just a command-line kinda guy, you can manually edit the .asoundrc file. Do

Code: Select all

nano ~/.asoundrc
and enter the following:

Code: Select all

defaults.bluealsa.interface "hci0"
defaults.bluealsa.device "XX:XX:XX:XX:XX:XX"
defaults.bluealsa.profile "a2dp"
defaults.bluealsa.delay 10000
Replace the Xs with your Bluetooth device address, of course.

If you are running lite, you may need to install and run bluealsa as well. The full Stretch version is already running it, I'm not familiar with the lite version.

More information in the BlueALSA readme, here: https://github.com/Arkq/bluez-alsa/blob ... /README.md

Adex1
Posts: 4
Joined: Sun Jul 22, 2018 7:29 am

Re: Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Wed Jul 25, 2018 9:36 pm

It worked, thank you Douglas!!

Hendrixx80
Posts: 1
Joined: Tue Oct 09, 2018 4:36 pm

Re: Failed to connect Raspberry pi 3 to Bluetooth speaker (again)

Tue Oct 09, 2018 4:54 pm

I still don't get it and start to become crazy...
My bluetooth-speeker works perfect, just not with kodi.

Raspberry pi 3 B
Stretch

Return to “Troubleshooting”