Raspberry Pi 4 - Issue with bluetooth (org.bluez.Error.Failed )

Viewed 10115

I am looking for a solutions since days...

I have a Raspberry Pi 4, including bluetooth.

I'am trying to connect my Android phone automatically to the Raspberry's bluetooth when i'm getting home.

I have paired and trusted my device :


Device EC:89:14:E9:43:B8 (public)
        Name: MyAndroidPhone
        Alias: MyAndroidPhone
        Class: 0x005a020c
        Icon: phone
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Unknown                   (0000046a-0000-1000-8000-00805f9b34fb)
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
        UUID: PANU                      (00001115-0000-1000-8000-00805f9b34fb)
        UUID: NAP                       (00001116-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: HUAWEI Technologies Co... (0000fe35-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v000Fp107Ed1436

The first time, when i trust and pair the device, it's connect successfully and everything works fine with PulseAudio.

The problems starts if i reboot the Raspberry or if i restart bluetooth with service bluetooth restart.

After that, i'am unable to reconnect to my phone.

[bluetooth]# connect EC:89:14:E9:43:B8
Attempting to connect to EC:89:14:E9:43:B8
Failed to connect: org.bluez.Error.Failed

The strange thing, i can still connect with my phone -> to my raspberry. But not from my raspberry -> to my phone. For my project, i need to make my raspberry able to connect automatically to my phone when it's in range.

Here is the logs of my bluetooth service:

● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-04-08 21:55:48 CEST; 6s ago
     Docs: man:bluetoothd(8)
  Process: 2027 ExecStartPost=/usr/bin/sdptool add SP (code=exited, status=0/SUCCESS)
 Main PID: 2026 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 2200)
   Memory: 784.0K
   CGroup: /system.slice/bluetooth.service
           └─2026 /usr/lib/bluetooth/bluetoothd -C --noplugin=sap

Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Starting SDP server
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Excluding (cli) sap
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Bluetooth management interface 1.14 initialized
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.8 path=/MediaEndpoint/A2DPSource
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.8 path=/MediaEndpoint/A2DPSink
Apr 08 21:55:48 raspberrypi sdptool[2027]: Serial Port service registered
Apr 08 21:55:48 raspberrypi systemd[1]: Started Bluetooth service.
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.417 path=/org/bluez/hci0/A2DP/SBC/Source/1
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.417 path=/org/bluez/hci0/A2DP/SBC/Source/2
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)

2 Answers

I got same problem. (adress already in use) if i do a ps aux | grep pulseaudio There is two process. So pulseaudio --kill And because there is still pulseaudio process running killall pulseaudio And its work , (for me...)

I had the exact same issue and the only thing I found that fixed it was ditching the onboard USB and switching to a USB bluetooth adapter.

Related