Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 28653
Joined: Sat Jul 30, 2011 7:41 pm

Re: Failed to connect: org.bluez.Error.Failed

Fri May 07, 2021 4:12 pm

piersw wrote:
Fri May 07, 2021 3:33 pm
Yeah, that's easy - I can easily drop it off somewhere central (Hills Rd?). Want to email me and we can arrange? (can you get my email from the forum?)

I cannot get emails, but if you email info@raspberrypi.com FAO Simon Martin and James Hughes with details, we can arrange something - if you are anywhere nr the Science Park, we are on the opposite side of Milton road, The Maurice Wilkes building. I'm not in the office at the moment, or anywhere nr Cambridge (I live in darkest Fenland) but there are people in there who also live in town and they should be able to arrange something.

EDIT: The engineer who is looking in to this would be happy to drive round and do a swap, so please contact info@ and we can arrange this.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Application's Team.

Posts: 2
Joined: Fri May 07, 2021 3:43 pm

Re: Failed to connect: org.bluez.Error.Failed

Fri May 07, 2021 4:29 pm

I am getting the same issues here and I don't know how to fix it.
After "sudo service bluetooth restart" the controller MAC changes, but after every reboot it once again wrong.
Raspbian and Retropie causes trouble for me with my two boards

Posts: 2
Joined: Fri May 07, 2021 3:43 pm

Re: Failed to connect: org.bluez.Error.Failed

Mon May 10, 2021 8:20 am

@Jamesh do you know how to fix the problem? Maybe this problem can be resolved temporarily if the command "sudo service bluetooth restart" can be implemented while booting the OS, or maybe right after the OS has been booted.
It seems to me like an issue which can be solved at least for now by using this command because the MAC of bluetooth controller is set to right one.
I have little to none experience regarding PI/Linux scripting.

Can you help me please?

Posts: 1
Joined: Tue May 11, 2021 8:02 pm

Re: Failed to connect: org.bluez.Error.Failed

Tue May 11, 2021 8:08 pm

Glad to find this post here, since it shows I am not the only one with this problem. I've recently gotten a raspberry pi 4b for my birthday. I can get the bluetooth devices to work (with some pain), usually only after reseting the bluetooth system service. However, when I restart I have to start over again. Basically, like this I cannot rely on bluetooth devices.

User avatar
Posts: 208
Joined: Wed Jan 27, 2021 5:22 am
Location: OZ

Re: Failed to connect: org.bluez.Error.Failed

Fri May 14, 2021 7:55 pm

Whatever the recent updates were BT is now working on my PI400.
My new Amazon Echo Buds even reconnect when I reboot. Audio automatically switches to them. Pretty freaking cool.

Code: Select all

System:    Kernel: 5.10.35-v8+ aarch64 bits: 64 compiler: N/A Desktop: LXDE 0.10.1 info: lxpanel, plank wm: Openbox 3.6.1 
           vt: 7 dm: LightDM 1.26.0 Distro: Raspberry Pi OS base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: ARM Device System: Raspberry Pi 400 Rev 1.0 details: BCM2835 rev: c03130 serial: <filter> 
CPU:       Info: Quad Core model: N/A variant: cortex-a72 bits: 64 type: MCP arch: ARMv8 rev: 3 bogomips: 432 
           Speed: 2000 MHz max: 2000 MHz Core speeds (MHz): 1: 2000 2: 2000 3: 2000 4: 2000 
           Features: asimd cpuid crc32 evtstrm fp 

Audio:     Device-1: bcm2835-audio driver: bcm2835_audio bus-ID: N/A chip-ID: brcm:bcm2835_audio class-ID: bcm2835_audio 
           Device-2: bcm2711-hdmi0 driver: N/A bus-ID: N/A chip-ID: brcm:soc class-ID: hdmi 
           Device-3: bcm2711-hdmi1 driver: N/A bus-ID: N/A chip-ID: brcm:soc class-ID: hdmi 
           Sound Server-1: ALSA v: k5.10.35-v8+ running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 

Bluetooth: Device-1: pl011 driver: uart_pl011 bus-ID: N/A chip-ID: arm:fe201000 class-ID: serial 
           Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 3.0 lmp-v: 5.0 sub-v: 6606 hci-v: 5.0 
           rev: 36 
If you need any other info let me know.
Raspberry PI 400 Raspberry Pi OS (Unstable) Kernel: 5.10.17-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"

Posts: 2
Joined: Mon May 17, 2021 4:18 am

Re: Failed to connect: org.bluez.Error.Failed

Mon May 17, 2021 4:37 am

Edit: As of pi-bluetooth 0.1.16 this no longer works for me.

Hi. I've been having some issues with the bluetooth as well, and these posts helped me find a workable fix. Thank you all.

I edited the "~/.profile"

Code: Select all

sudo nano ~/.profile
And added "sudo systemctl restart bluetooth" to the end of the file. So the end of the file now looks like this.

Note: Only the last two lines were added.

Code: Select all

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then

# attempt to restart bluetooth
sudo systemctl restart bluetooth
I'm pretty new to the Raspberry Pi, so there might be a better way to do this. It seems to be working for me. Hopes this helps and thanks again.

Posts: 2
Joined: Mon May 17, 2021 4:18 am

Re: Failed to connect: org.bluez.Error.Failed

Tue May 18, 2021 4:47 am

Got a new fix that works with pi-bluetooth 0.1.16.

Modify the /usr/bin/btuart file.

I commented out the if-statement at the beginning so that it always assigned the BDADDR. Just add the "#" in front of the the first if, else, and fi.

Code: Select all

#if grep -q "raspberrypi,4" /proc/device-tree/compatible; then
  SERIAL=`cat /proc/device-tree/serial-number | cut -c9-`
  B1=`echo $SERIAL | cut -c3-4`
  B2=`echo $SERIAL | cut -c5-6`
  B3=`echo $SERIAL | cut -c7-8`
  BDADDR=`printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa))`

Then do a reboot.

The "bluetoothctl show" comes back starting with the 8 now instead of the E and it works.

Hope this helps.

Posts: 1
Joined: Fri May 28, 2021 9:49 am

Re: Failed to connect: org.bluez.Error.Failed

Fri May 28, 2021 10:14 am

Unable to connect any device to my Pi 4 via bluetooth. It is showing me paring error and org.bluez.Error.Failed error. Even to remove a device it shows same error. Completely frustrated by the bluetooth capability of Pi4. Connecting keyboard, mouse, mobile phone, laptop via bluetooth have become most difficult task. Tried many solutions and not getting exactly what I want i.e. getting connected via bluetooth to my Pi4. After the effort of a week or so now I am able to connect at times that too when I reboot or restart my system. Level of frustration no one can imagine is there. No idea why they have given bluetooth compatibilty when it is not working properly.
Connecting via bluetooth to Pi4 should be as simple as we connect two mobile phone via bluetooth.
Kindly ask for any other information needed but solve my issue.
One of these two error I am getting while connecting : paring error and org.bluez.Error.Failed

Return to “Raspberry Pi 400”