keeblebrox

a2dp-connect.sh

Jul 27th, 2011
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. # Copyright 2011 Brian Crockford
  3. # a2dp-connect.sh
  4.  
  5. # 1. Enable=Source in /etc/bluetooth/audio.conf
  6. # 2. Pair device
  7. # 3. Run script
  8. # Instructions at http://ubuntuforums.org/showpost.php?p=9511043&postcount=10
  9.  
  10. # dbus-send: connect to device
  11. # pactl load-module: link audio stream
  12. SOURCE="Enter your source here (bluetooth device)"
  13. SINK="Enter your sink here (audio output)"
  14. dbus-send --system --print-reply --dest=org.bluez --type=method_call /org/bluez/4546/hci0/dev_00_23_76_79_08_D8 org.bluez.AudioSource.Connect > /dev/null && \
  15. pactl load-module module-loopback source=$SOURCE sink=$SINK
Advertisement
Add Comment
Please, Sign In to add comment