[pulseaudio-discuss] [PATCH 0/5] Fix the conflict between bluetooth-policy and card-restore
Pali Rohár
pali.rohar at gmail.com
Fri Aug 5 16:04:51 UTC 2016
On Friday 05 August 2016 17:42:00 Tanu Kaskinen wrote:
> Do you know how to pair and connect a headset using just command line
> tools with BlueZ 4? bluetoothctl seems to be a newer addition, and my
> bluetooth GUI expects BlueZ 5.
For connecting I have written shell script, which use qdbus:
BT="XX_XX_XX_XX_XX_XX" # replace with your BT address
# first disconnect everything
qdbus --system org.bluez `qdbus --system org.bluez | grep $BT | head -1 2>/dev/null` org.bluez.AudioSink.Disconnect 1>/dev/null 2>&1
qdbus --system org.bluez `qdbus --system org.bluez | grep $BT | head -1 2>/dev/null` org.bluez.Headset.Disconnect 1>/dev/null 2>&1
qdbus --system org.bluez `qdbus --system org.bluez | grep $BT | head -1 2>/dev/null` org.bluez.Audio.Disconnect 1>/dev/null 2>&1
# connect
qdbus --system org.bluez `qdbus --system org.bluez | grep $BT | head -1 2>/dev/null` org.bluez.AudioSink.Connect
qdbus --system org.bluez `qdbus --system org.bluez | grep $BT | head -1 2>/dev/null` org.bluez.Headset.Connect
# set pulseaudio profile to a2dp
pactl set-card-profile bluez_card.$BT a2dp
For pairing is possible to use bluez-simple-agent (python script, needs
only python dbus packages). Some info is on arch wiki:
https://wiki.archlinux.org/index.php/Bluez4#Pairing_with_bluez4
I guess, just download and extract that script from bluez4 package.
Should work out-of-box as it does not depend on any bluez/bluetooth
packages...
Note that you can have registered only one bluez agent, so maybe
killing some gnome/kde/... SW will be needed.
--
Pali Rohár
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20160805/ca19538f/attachment.sig>
More information about the pulseaudio-discuss
mailing list