1

Failed to pair: org.bluez.Error.ConnectionAttemptFailed.

I am trying to connect my Bluetooth joystick controller '8bitdo Pro 2' to my RPi4. Below is the error I get. This appears to be the same error I have seen constantly asked about since 2014 up to the present day. Why are we still asking it?

I did once get a connection but other events took over & I started a new installation. Having spent 3.5 out of 4 months on this project it looks like I will lose time & considerable expense. There are many answers given, some simple others complex, but none have worked.

My controller connects via the 8bitdo Ultimate S/W on Windows 10 & has connected using approxeng_install_show_controls on RPi4.

I have followed Approximate Engineering - Input - Command-line tools meticulously. It connects to the RPi taskbar icon.

At 78 years I need some help before it's too late.

pi@raspberrypi:~ $ bluetoothctl
Agent registered
[8BitDo Pro 2]# agent on
Agent is already registered
[8BitDo Pro 2]# default-agent
Default agent request successful
[8BitDo Pro 2]# scan on
Discovery started
[CHG] Controller 00:1A:7D:DA:71:15 Discovering: yes
[CHG] Device E4:17:D8:19:2A:D5 RSSI: -37
[CHG] Device E4:17:D8:19:2A:D5 RSSI: -45
[CHG] Device E4:17:D8:19:2A:D5 RSSI: -37
[8BitDo Pro 2]# trust E4:17:D8:19:2A:D5
Changing E4:17:D8:19:2A:D5 trust succeeded
[8BitDo Pro 2]# pair E4:17:D8:19:2A:D5
Attempting to pair with E4:17:D8:19:2A:D5
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
[8BitDo Pro 2]# 

With thanks to anyone brave enough to provide an answer. PS the text was formatted when I wrote it.

Thank you for your further suggestions. I tried 'remove' without success & looked at the Sony wiki. By chance I realised I had started afresh & therefore the 8bitdo pro 2.yaml file was missing from the hidden folder .approxeng.input. I originally had this problem when first successfully connecting. It seems approxeng when generating this file does not write it to the correct folder (though goodness knows where). Fortunately, I run with a USB memory stick and save code, etc if needed. A 'find file' gave me access to copy & paste it to the correct folder. So without using bluetoothctl I rebooted & hey presto!! I still have issues with buttons & the l2/r2 sticks but hey ho tomorrow is another day. My robotic vehicle now roams independently on the kitchen floor. thanks.

5
  • When you start bluetoothctl it is showing [8BitDo Pro 2]# as the prompt. This means the controller is already connected to your RPi. This means that you have already paired and trusted the controller. This is why the pairing attempt is failing. Once the controller and the RPi are paired you don't need to do it again. Is the controller not working when you try and use it?
    – ukBaz
    Sep 9, 2022 at 20:29
  • thanks, you are right. so disconnected controller at the task bar. RPi asked if 'unpair device'. Rebooted & added device at task bar. Got 'Pairing failed, already exists'. Can you suggest a procedure for pairing bluetooth? ie install rpi.gpio, guizero, bluez & blueman, libusb-dev then enable bluetooth.service, usermod bluetooth & reboot. install approxeng.input then bluetoothctl, scan on etc. Sep 10, 2022 at 10:27
  • will start afresh to release any false connections. Sep 10, 2022 at 10:30
  • In bluetoothctl use the command devices to see if the controller is in the list. If it is, use remove to clear the pairing. You've paired the controller before so you must be doing it right. After paring the controller once you don't need to pair again. You use connect instead (if it doesn't connect automatically). The process for any controller should be the same as for the Sony DualShock that is documented at: wiki.gentoo.org/wiki/Sony_DualShock#DualShock_4. It is then what you want to do the controller
    – ukBaz
    Sep 10, 2022 at 14:01
  • Your last update to your question should probably have been posted as an answer, I think, because it is a partial solution to your issue. If you edit your question and put the solution in the question then it sort of messes up the Q&A mechanism of the site. Feb 5, 2023 at 1:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.