title: Raspberry Pi 4 - Issue with bluetooth (org.bluez.Error.Failed )
body: <p>I am looking for a solutions since days...</p>
  
  <p>I have a Raspberry Pi 4, including bluetooth.</p>
  
  <p>I'am trying to connect my Android phone automatically to the Raspberry's bluetooth when i'm getting home.</p>
  
  <p>I have paired and trusted my device :</p>
  
  <pre><code>
  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
  
  </code></pre>
  
  <p>The first time, when i trust and pair the device, it's connect successfully and everything works fine with PulseAudio.</p>
  
  <p>The problems starts if i reboot the Raspberry or if i restart bluetooth with <code>service bluetooth restart</code>.</p>
  
  <p>After that, i'am unable to reconnect to my phone.</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>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.</p>
  
  <p>Here is the logs of my bluetooth service:</p>
  
  <pre><code>● 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)
  
  </code></pre>