[pulseaudio-discuss] problems with bluetooth a2dp to raspberry pi

Ahmed S. Darwish darwish.07 at gmail.com
Fri Mar 18 11:22:43 UTC 2016


Hi :-)

On Wed, Mar 16, 2016 at 06:13:49PM +0100, Hans-Peter Fier wrote:
> Hi,
> I've googled a lot to find any hint on getting a bluetooth connection from
> my tablet (iPad and Android) to pulsaudio running on raspberry pi, but up to
> now without success.
> 
> My Raspberry PI system:
> Linux Kernel 4.1.19-4-ARCH
> bluez 5.37-2
> pulseaudio 8.0-3
> 
> All packets most actual offical versions according to archlinuxarm
> distribution.
> 
> ----------------------------------------------------------
> Trying to connect with bluetoothctl yields:
> 
> $ connect D8:90:E8:A5:95:86
> 
> Attempting to connect to D8:90:E8:A5:95:86
> Failed to connect: org.bluez.Error.Failed
> ----------------------------------------------------------
>

Are you sure your BT controller is powered on? ArchLinux wiki
states that it's OFF by default:

"Start the 'bluetoothctl' interactive command. Turn the power to
the controller on by entering 'power on'. It is off by default."

Ref: https://wiki.archlinux.org/index.php/bluetooth#Bluetoothctl

> 
> here the bluetooth-debug with a2dp relevant output:
> ----------------------------------------------------------
> 
> bluetoothd[6853]: Bluetooth daemon 5.37
> bluetoothd[6853]: src/main.c:parse_config() parsing main.conf
> bluetoothd[6853]: src/plugin.c:add_plugin() Loading sap plugin
> bluetoothd[6853]: src/plugin.c:add_plugin() Loading a2dp plugin
> bluetoothd[6853]: src/plugin.c:add_plugin() Loading avrcp plugin
> bluetoothd[6853]: src/plugin.c:add_plugin() Loading network plugin
> 
> bluetoothd[6853]: src/gatt-database.c:gatt_db_service_added() GATT Service
> added to local database
> bluetoothd[6853]: profiles/audio/a2dp.c:media_server_probe() path
> /org/bluez/hci0
> bluetoothd[6853]: plugins/hostname.c:hostname_probe()
> 
> 
> bluetoothd[6853]: src/adapter.c:add_uuid() sending add uuid command for
> index 0
> bluetoothd[6853]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path
> /org/bluez/hci0
> bluetoothd[6853]: profiles/audio/a2dp.c:a2dp_source_server_probe() path
> /org/bluez/hci0
> bluetoothd[6853]: profiles/sap/manager.c:sap_server_probe() path
> /org/bluez/hci0
> bluetoothd[6853]: Sap driver initialization failed.
> bluetoothd[6853]: sap-server: Operation not permitted (1)
>
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^

That's a red sign. Googling also shows that this happens when
the bluetooth controller is OFF.

Ref: https://archlinuxarm.org/forum/viewtopic.php?f=60&t=8219

...
> bluetoothd[6853]: src/service.c:btd_service_ref() 0x4ebc88: ref=2
> bluetoothd[6853]: src/service.c:change_state() 0x4ebc88: device
> 20:7D:74:94:30:76 profile a2dp-source state changed: unavailable ->
> disconnected (0)
> bluetoothd[6853]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
> 
> bluetoothd[6853]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has
> been enabled
> bluetoothd[6853]: src/device.c:connect_profiles()
> /org/bluez/hci0/dev_D8_90_E8_A5_95_86 (all), client :1.309
> bluetoothd[6853]: profiles/audio/a2dp.c:a2dp_source_connect() path
> /org/bluez/hci0/dev_D8_90_E8_A5_95_86
> bluetoothd[6853]: a2dp-source profile connect failed for D8:90:E8:A5:95:86:
> Protocol not available
>

Hmm, are you sure that a2dp-source is enabled? You'll need to
excplicitly enable it in '/etc/bluetooth/audio.conf'. Further
details are at:

  - https://wiki.archlinux.org/index.php/bluetooth#Using_your_computer.27s_speakers_as_a_bluetooth_headset
  - http://stackoverflow.com/questions/15557933/receive-audio-via-bluetooth-in-android

Regards,

-- 
Darwish
http://darwish.chasingpointers.com


More information about the pulseaudio-discuss mailing list