I've discovered again that cursing and swearing at inanimate objects doesn't actually improve things, so I'll try posting a question.
A couple of months ago I attempted a fairly ambitious project (Sonos Bluetooth Bridge) with my RPi that didn't work out. It was a fairly complex project IMHO, and as the author of the article didn't respond to help requests, I decided to set it aside, and start with a simpler Bluetooth project.
Connecting to a Bluetooth speaker seemed straightforward enough, but I'm now wondering if there is such a thing as a simple Bluetooth project. My setup is simple:
- Raspberry Pi 3B+ w/ current Raspbian stretch
- Anker SoundCore mini speaker
Just to verify the speaker worked, in about 2 minutes I was able to connected from my phone & play music. Speaker works.
Here's an attempt to show the relevant software on my system:
$ dpkg -l | grep blue
ii bluez 5.43-2+rpt2+deb9u2 armhf Bluetooth tools and daemons
ii bluez-firmware 1.2-3+rpt7 all Firmware for Bluetooth devices
ii pi-bluetooth 0.1.10 all Raspberry Pi 3 bluetooth
ii pulseaudio-module-bluetooth 10.0-1+deb9u1 armhf Bluetooth module for PulseAudio sound server
From my RPi, I used bluetoothctl
to discover and pair with the speaker as follows (some steps deleted for brevity):
pi@raspberrypi3b:~ $ sudo bluetoothctl
[NEW] Controller B8:27:EB:67:85:55 raspberrypi3b [default]
[NEW] Device F4:4E:FD:2A:3C:B6 SoundCore mini
[NEW] Device A8:66:7F:4D:1A:B2 SdMiPhone
[bluetooth]# info F4:4E:FD:2A:3C:B6
Device F4:4E:FD:2A:3C:B6
Name: SoundCore mini
Alias: SoundCore mini
Class: 0x240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
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)
[bluetooth]# connect F4:4E:FD:2A:3C:B6
Attempting to connect to F4:4E:FD:2A:3C:B6
Failed to connect: org.bluez.Error.Failed
Research on the error led to zillions of matches, but the most promising appeared to a couple of answers given here on SE - @udjamaflip answer for Raspberry Pi. This answer refers to another answer on the SE Ubuntu site.. And one other answer on Unix&Linux SE.
I think I've followed the steps correctly. I've edited both files IAW the referenced answer, rebooted, used pactl
, but I still get the failure:
Failed to connect: org.bluez.Error.Failed
FWIW, the pactl
step succeeds once per reboot, trying to load-module
again gets an error, but it can be unload
-ed, and then load
-ed successfully:
$ pactl load-module module-bluetooth-discover
20
$ pactl load-module module-bluetooth-discover
Failure: Module initialization failed
$ pactl unload-module module-bluetooth-discover
$ pactl load-module module-bluetooth-discover
22
$
The syslog
shows the following for each attempt at a connection w/ bluetoothctl
:
bluetoothd[491]: a2dp-sink profile connect failed for F4:4E:FD:2A:3C:B6: Protocol not available
Any ideas or suggestions are much appreciated.