Can't connect to bluetooth headphones

I’m currently trying to connect my bluetooth headphones to the VIM3 board with the latest version of Ubuntu 20.04 and the 4.9 kernel.

When I run bluetoothctl and scan for the devices I can find the device but it when I try to pair it I get this error:

Attempting to pair with 20:74:CF:A0:8B:73
Failed to pair: org.bluez.Error.ConnectionAttemptFailed

After some restarting and a lot of unsuccessful tries I managed to pair once and then I can’t connect:

Attempting to connect to 20:74:CF:A0:8B:73
Failed to connect: org.bluez.Error.Failed

The headphones work and I can easily connect with my phone. Any idea what the reason could be for this unstable behavior?

Hello @brunovollmer ,
1、I have tested the firmware:VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_EMMC_V1.0.9-211217

Test results:

Connect the Bluetooth speaker, which can be successfully connected and controlled.

2、Solution to the problem of connecting Bluetooth speaker in server version:

sudo apt-get install bluez*
sudo apt-get install blueman
sudo apt-get remove blueberry
sudo apt-get update

Restart after operation.

Open the configuration file / etc / bluetooth /main.conf and Find the following:

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual

Change # controllermode = dual to controllermode = bredr and save:

# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = bredr

Then restart the Bluetooth service:

sudo systemctl restart bluetooth

Finally, operate in sequence:

sudo hciconfig hci0 up
sudo bluetoothctl
agent on
default-agent
power on
discoverable on
pairable on
scan on
pair <device_addr>
connect <device_addr>
1 Like