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

Ahmed S. Darwish darwish.07 at gmail.com
Tue Mar 22 00:14:24 UTC 2016


Hi,

[ Adding removed pulseaudio-discuss list back to CC. Please use
  reply-to-all, even for simple ACKs, to make sure everyone
  benefits .. ]

[ Also no top-posting please (now fixed). Check
  http://www.idallen.com/topposting.html .. ]

On Mon, Mar 21, 2016 at 11:50:47AM +0100, Hans-Peter Fier wrote:
>
> Hi,
> 
> thanks for your response.
> 
> On Freitag, 18. März 2016 12:22, Ahmed S. Darwish wrote:
> >
> > 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
> >
> 
> I had seen that sometimes the bluetooth controller was in the power-off state
> and I was sure that I’d set the Controller to power on.
> 
> Now after a reboot it came up in the power-on state and now it seems to work! 
>
> For some reason I can’t explain the Show-command also Shows much more UUIDs
> 
>         UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
>         UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
>         UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
>         UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
>         UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
>         UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
>         UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
>         UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
> 
> At least the Headset and the Audio sink/source weren’t visible before.
> 
> Thank you very much
> HP
> 

Exellent. Glad that everything now works. Bluez documentation,
on the user-space side of things, is actually very scarce and
the ArchLinux wiki serves as almost as the first go-to source ;-)

Good luck,

> > 
> > 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
> 

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


More information about the pulseaudio-discuss mailing list