Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
Last active May 18, 2020 10:42
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 ZiTAL/9e81b80549a0cb9e810caaec28ca8135 to your computer and use it in GitHub Desktop.
Save ZiTAL/9e81b80549a0cb9e810caaec28ca8135 to your computer and use it in GitHub Desktop.
debian: pair bluetooth audio device
su
apt install bluetooth pulseaudio-module-bluetooth
/etc/init.d/bluetooth stop
pactl unload-module module-bluetooth-discover
pactl load-module module-bluetooth-discover
/etc/init.d/bluetooth start
exit
bluetoothctl
[bluetooth]# untrust F8:DF:15:C7:1C:3D
[bluetooth]# remove F8:DF:15:C7:1C:3D
[bluetooth]# pair F8:DF:15:C7:1C:3D
[bluetooth]# trust F8:DF:15:C7:1C:3D
[bluetooth]# connect F8:DF:15:C7:1C:3D
<!-- /etc/dbus-1/system.d/bluetooth.conf -->
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
<allow send_interface="org.bluez.MediaEndpoint1"/>
<allow send_interface="org.bluez.MediaPlayer1"/>
<allow send_interface="org.bluez.Profile1"/>
<allow send_interface="org.bluez.GattCharacteristic1"/>
<allow send_interface="org.bluez.GattDescriptor1"/>
<allow send_interface="org.bluez.LEAdvertisement1"/>
<allow send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>
<!-- allow users of bluetooth group to communicate -->
<policy group="bluetooth">
<allow send_destination="org.bluez"/>
</policy>
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>
<!-- allow users of lp group (printing subsystem) to
communicate with bluetoothd -->
<policy group="lp">
<allow send_destination="org.bluez"/>
</policy>
<policy context="default">
<allow send_destination="org.bluez"/>
</policy>
</busconfig>
@ZiTAL
Copy link
Author

ZiTAL commented May 18, 2020

untrust F8:DF:15:C7:1C:3D
remove F8:DF:15:C7:1C:3D
pair F8:DF:15:C7:1C:3D
trust F8:DF:15:C7:1C:3D
connect F8:DF:15:C7:1C:3D

untrust F4:BC:DA:1A:B9:2D
remove F4:BC:DA:1A:B9:2D
pair F4:BC:DA:1A:B9:2D
trust F4:BC:DA:1A:B9:2D
connect F4:BC:DA:1A:B9:2D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment