Skip to content

Instantly share code, notes, and snippets.

@rudylacrete
Created August 15, 2016 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudylacrete/285e530e84f020b3561ade9228e26872 to your computer and use it in GitHub Desktop.
Save rudylacrete/285e530e84f020b3561ade9228e26872 to your computer and use it in GitHub Desktop.
How to make a2dp profile working on raspberry pi 3 with bluez5
Most informations were found here:https://github.com/ev3dev/ev3dev/issues/198
- create systemd service for running pulseaudio: /etc/systemd/system/pulseaudio.service
[Unit]
Description=Pulse Audio
[Service]
Type=simple
ExecStart=/usr/bin/pulseaudio --system --disallow-exit --disable-shm
[Install]
WantedBy=multi-user.target
- reload systemd with systemctl daemon-reload
- Give the pulse user permission to use Bluetooth: /etc/dbus-1/system.d/pulseaudio-bluetooth.conf
<busconfig>
<policy user="pulse">
<allow send_destination="org.bluez"/>
</policy>
</busconfig>
- start the service: systemctl start pulseaudio.service
- enable service at startup: systemctl enable pulseaudio.service
- Paste the following lines to the end of /etc/pulse/system.pa
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
- add the correct permissions for user pi:
sudo gpasswd -a pi pulse-access
sudo gpasswd -a pi audio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment