Sunday, November 12, 2017

Playing audio from Raspberry PI3 to A2DP speaker

Basic steps from Arch Linux wiki, with a small Raspbian specific kludge from StackOverflow:
Create /etc/dbus-1/system.d/pulse.conf:



<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <policy user="root">
    <allow own="org.pulseaudio.Server"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Manager"/>
  </policy>
  <policy user="pulse">
    <allow own="org.pulseaudio.Server"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Manager"/>
  </policy>
  <policy context="default">
    <deny own="org.pulseaudio.Server"/>
    <deny send_destination="org.bluez"/>
    <deny send_interface="org.bluez.Manager"/>
  </policy>
</busconfig>


pulseaudio --start
# bluetoothctl
# power on
# agent on
# default-agent
# scan on
# pair 
# connect 
# scan off
# exit

paplay imperial_march.wav --device=bluez_sink.04_FE_xx_xx_xx_xx



No comments:

Post a Comment