Connecting GuruPlug to a Bluetooth Headphone

From PlugWiki
Jump to: navigation, search

Contents

Bluetooth Functionality

  • The Bluetooth functionality is available in both WiFi Access Point mode and WiFi Client mode.
  • Upon bootup, GuruPlug will come up in Access Point mode. There is no need to switch to WiFi Client mode for BT functionality.

Associating Bluetooth Headphone with GuruPlug

  • Scan near-by Bluetooth devices using following command, and note the MAC address of the BT Headphone you want to associate with.
 hcitool -i hci0 scan
  • A python wrapper script is available to help associate with any Bluetooth device. You can download it from here.
    • This script needs python dbus module. Install it using following command.
apt-get install python-dbus
  • Now run scipt and enter MAC address of BT Headphone you want to associate with (noted in the first step).
./bt_headphones.py
Please put your headphones in pairing mode and press Enter:
Enter the BT headphones' MAC Address:
  • The headphones will now be associated with GuruPlug.


Playing a .wav file on the Bluetooth Headphones

  • After successful association, create asoundrc file using following command.
 cp /usr/share/alsa/bluetooth.conf ~/.asoundrc
  • Now you can play any .wav file using following command.
aplay -Dplug:headset -f S16_LE <file name>


Reference

http://wiki.bluez.org/wiki/HOWTO/AudioDevices

Personal tools