I can pair and trust my Bluetooth speakers via the GUI Bluetooth Manager and the command line bluetoothctl, but both fail when I try to connect.
The error when I connect to Audio Sink on GUI is: “Connection Failed: blueman.bluez.errors.DBusFailedError: Protocol not available”
on bluetoothctl when I "connect " the error is: “Failed to connect: org.bluez.Error.Failed”
I have installed latest pi-bluetooth and pulseaudio-module-bluetooth
What else can I do or is even possible to stream audio via RaspberryPi through BT? although I don’t see why not?
Is it an RPi model with onboard WiFi+Bluetooth or do you use a dongle?
Note that DietPi by default configures ALSA for audio, not PulseAudio. If you use the latter, please assure that its service is up and running and e.g. can be used to play sound through 3.5mm jack speakers or HDMI.
There is also a way to configure Bluez to use ALSA instead of PulseAudio. Have a look at these two issues:
I was able to connect following the steps from issue #3456. That was my issue too, the ALSA, and I had to manually add the entries to the .conf file. I got them connected, BUT… there is no audio output…just some pops and hiss when playing a video for example. Tried the speaker volume and the video player volume, no luck. What I could not find was a system volume switch, maybe thats it?
PulseAudio and plain ALSA might interfere currently, I’m not sure how well this works together. First I’d assure that the 3.5mm jack works the one or the other way. In case you want to go with plain ALSA (and follow the links I posted to install + configure bluez-alsa manually, then I’d purge pulseaudio: apt purge pulseaudio
If you use PulseAudio, which is natively supported by bluez (so in theory easier to setup), then you might need to remove /etc/asound.conf, not 100% sure .
A way to check PulseAudio available output devices, especially when the Bluetooth audio module is installed: pactl list
Ah, I just remember that on RPi there is an APT package available for it: apt install dbus bluealsa
It includes a service and an ALSA config and looks like it could should work OOTB. I added dbus package as well as at least the bluealsa service contains some dbus policy config.
I purged everything and started from scratch using dietpi-config > Advanced Options > Bluetooth On
so I guess that installed bluez and alsa and Iḿ able to connect to my BT speaker, but no audio,
So I am trying now corded with AUX. So I changed dietpi-config > Audio Options > rpi-bcm2385-3.5mm (originally HDMI)
Still no audio.
In alsamixer, the soundcard settings were still in HDMI. So F6, change to headphones. Somehow, I can´t make this command stick. There is no option to save, when you exit the window, it reverts back to HDMI even though dietpi-config has it at the 3.5mm setting.
The thing with the 3.5mm jack is known: https://github.com/MichaIng/DietPi/issues/3887
RPi kernel/firmware made some breaking changes to their sound card interface. Will be fixed with the next DietPi version, although it might make switching the sound device more complicated as of the not-to-great changes by RPi Foundation .
As I said above, bluez alone does NOT support Bluetooth audio, so it is expected that you attempt fails. As I said, you need to install an additional package manually. Run the following two commands and see if this allows Bluetooth audio output: