Bluetooth does not work on pi 5

I am using pi 5 with latest diepi. When I try to connect to bluetooth device, I get error Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable.
The device is paired and visible in command “devices” but still not able to connect through the command “connect XX:XX:XX:XX:XX:XX”.
I also tried the library libspa-0.2-bluetooth but not luck.

@MichaIng can you have a look pls

Is it a Bluetooth audio device? If so, try to use BlueALSA, as described here: Can’t connect a bluetooth headset · Issue #6985 · MichaIng/DietPi · GitHub

Yes. I am trying to connect my RPi 5 to a pair of bluetooth speakers. I was able to resolve this by 4 things:

  1. sudo apt-get install libspa-0.2-bluetooth
  2. Enable experimental features in /etc/bluetooth/main.conf
    Experimental = True
    KernelExperimental = true
  3. Modify bluetooth service with
    ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
  4. sudo apt-get install bluez-alsa-utils

Thank you.

I wonder whethet step 4 alone would have been enough. Would be strange if on Debian Bookworm with Linux 6.1 experimental kernel features were required, as well as disabling SAP when the connection is not done via SIM card anyway.

And libspa is for PipeWire while we use ALSA.

Sorry, I am not that great in these things, I just followed some random tutorials.

I have been using dietpi since last 3+ years. It’s absolutely great, stable and reliable operating system than anything else for Raspberry devices and other SBCs. One off topic question I have here is when can we get the overclocking feature in Rpi 5? I know you guys are working very hard for this project.

Thank you.

When you find time, it would be great if you could try to revert steps 1-3 and see whether it still works. At some point I want to add Bluetooth audio support to dietpi-config audio options, and it would be good to know whether there is anything else required than enabling Bluetooth in general and the bluez-alsa-utils package. I have an RPi 5, but not Bluetooth headset or such to test this … although, I think I have some old cheap mono speaker with Bluetooth support, won in some a crap raffle. But I guess I need to dig in a bunch of old moving boxes to find it, in case I didn’t throw it away :smile:.

Overclocking has lower priority for me. First is adding proper support for display/resolution and camera settings with KMS enabled and some other things which are not working yet on RPi 5/with the new kernel/firmware package stack. But it is on the list.

Hi @MichaIng,
Sorry for delayed reply. I can confirm that after removing step 1 and 3 and following 2 and 4 I am able to pair and connect to bluetooth device successfully.

Thank you.

So both experimental options were required to successfully pair with our BT speakers? What error message do you face when not enabling those?

For experimental option, I was getting message like experiments features unavailable when I checked status of bluetooth service. When I did not have bluez-alsa-utils, I was getting bluez connecting error.
Sorry, these errors I defined in my terms.

I guess these are no errors, but informational, and hence experiments are not required for Bluetooth audio then. That is good, so we know that bluez-alsa-utils and defining the bluealsa as default PCM is (still) all that is needed.

Yes. I think it is the issue here.
Thank you.