Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-2316

bluez-alsa service does not start when when bluetooth adapter is inserted

XMLWordPrintable

      This behavior was observed after SPEC-2309 was reported and which is the reason for 2309.

      After booting without usb bluetooth adapter attached the bluez-alsa fails to start.

       

      m3ulcb:~# systemctl status bluez-alsa
      ● bluez-alsa.service - Bluetooth Audio ALSA Backend
       Loaded: loaded (/lib/systemd/system/bluez-alsa.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Thu 2019-04-11 18:41:03 UTC; 13min ago
       Main PID: 3982 (code=exited, status=1/FAILURE)Apr 11 18:41:03 m3ulcb systemd[1]: Started Bluetooth Audio ALSA Backend.
      Apr 11 18:41:03 m3ulcb bluealsa[3982]: /usr/bin/bluealsa: No HCI device available
      Apr 11 18:41:03 m3ulcb systemd[1]: bluez-alsa.service: Main process exited, code=exited, status=1/FAILURE
      Apr 11 18:41:03 m3ulcb systemd[1]: bluez-alsa.service: Unit entered failed state.
      Apr 11 18:41:03 m3ulcb systemd[1]: bluez-alsa.service: Failed with result 'exit-code'.
      

      After inserting a bluetooth adapter and enabling the bluetooth in Settings, pairing with a device is successful, but after connecting to it, the device connecting to the board - e.g. Android phone does not report "Media audio" profile because the bluez-alsa hasn't started after inserting the adapter.

      This is the log from bluetooth service

       

      m3ulcb:~# journalctl -u bluetooth 
      -- Logs begin at Thu 2019-04-11 18:40:50 UTC, end at Thu 2019-04-11 18:43:01 UTC. --
      Apr 11 18:40:55 m3ulcb systemd[1]: Starting Bluetooth service...
      Apr 11 18:40:55 m3ulcb bluetoothd[3611]: Bluetooth daemon 5.46
      Apr 11 18:40:56 m3ulcb systemd[1]: Started Bluetooth service.
      Apr 11 18:40:56 m3ulcb bluetoothd[3611]: Starting SDP server
      Apr 11 18:40:56 m3ulcb bluetoothd[3611]: Bluetooth management interface 1.14 initialized
      Apr 11 18:41:39 m3ulcb bluetoothd[3611]: a2dp-source profile connect failed for 98:29:A6:C9:6E:3D: Protocol not available
      ...snip...

      Manually starting the bluez-alsa:

       

      m3ulcb:~# systemctl start bluez-alsa 
      m3ulcb:~# systemctl status bluez-alsa 
      ● bluez-alsa.service - Bluetooth Audio ALSA Backend 
       Loaded: loaded (/lib/systemd/system/bluez-alsa.service; enabled; vendor preset: enabled) 
       Active: active (running) since Thu 2019-04-11 18:42:35 UTC; 1s ago 
       Main PID: 4322 (bluealsa) 
       Tasks: 5 (limit: 4915) 
       CGroup: /system.slice/bluez-alsa.service 
       └─4322 /usr/bin/bluealsa -p a2dp-sink -p hfp-ofono

      the last part of the log from 

       

      ...snip...
      Apr 11 18:42:35 m3ulcb bluetoothd[3611]: Endpoint registered: sender=:1.28 path=/A2DP/SBC/Sink/1
      Apr 11 18:42:44 m3ulcb bluetoothd[3611]: Unable to get io data for hfp_hf: getpeername: Transport endpoint is not connected (107)

      reconnecting the device

      Apr 11 18:42:59 m3ulcb bluetoothd[3611]: Endpoint registered: sender=:1.28 path=/A2DP/SBC/Sink/2
      Apr 11 18:43:01 m3ulcb bluetoothd[3611]: /org/bluez/hci0/dev_98_29_A6_C9_6E_3D/fd0: fd(24) ready
      

      After reconnecting the device registers the "Media audio" profile properly and audio works.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            gkiagia Georgios Kiagiadakis
            edi.feschiyan Edi Feschiyan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: