Skip to content

Instantly share code, notes, and snippets.

@acruise
Created March 19, 2015 21:54
Show Gist options
  • Save acruise/7ec24d91690866a94932 to your computer and use it in GitHub Desktop.
Save acruise/7ec24d91690866a94932 to your computer and use it in GitHub Desktop.
How do you make a Bluetooth headset work in Linux?
#!/bin/bash
mac=00:1A:7D:D0:27:B1
macu=$(echo $mac |tr ":" "_")
dbus-send --system --print-reply=literal --dest="org.bluez" "/org/bluez/hci0/dev_$macu" org.bluez.Device1.Connect
pactl set-card-profile bluez_card.$macu a2dp_sink
@acruise
Copy link
Author

acruise commented Mar 19, 2015

Special thanks to qdbusviewer, which Fedora ships in the qt-qdbusviewer package.

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