Much ado about scripting, Linux & Eclipse: card subject to change

2008-11-15

HOWTO: Bluetooth for Linux (2)

Connecting a Thinkpad X200 to a Sony DR-BT30Q Headset

10 months ago, I went through this exercise on my old T60p. Almost a year later, now running Fedora 10 on an X200, it was still a pain to set up. Really, this should Just Work. It's too bad that some things in Linux are still overly complex.

Anyway, after much ado with outdated walkthroughs, I finally found useful advice for setting up my Sony DR-BT30Q Bluetooth headset to work with my Fedora 10 X200 Thinkpad.

First off, here's what I installed along the way before I finally got things working (/var/log/yum.log):

Nov 15 15:08:03 Installed: pidgin-rhythmbox-2.0-3.fc9.i386
Nov 15 15:15:42 Installed: autoconf-2.63-1.fc10.noarch
Nov 15 15:15:43 Installed: bluez-hcidump-1.42-2.fc10.i386
Nov 15 15:15:44 Installed: alsa-tools-1.0.17-1.fc10.i386
Nov 15 15:15:46 Installed: automake-1.10.1-2.noarch
Nov 15 15:15:48 Installed: alsa-utils-1.0.18-3.rc3.fc10.i386
Nov 15 15:15:51 Installed: alsa-lib-devel-1.0.18-6.rc3.fc10.i386
Nov 15 15:23:01 Installed: bluez-gnome-analyzer-1.8-8.fc10.i386
Nov 15 15:23:01 Installed: obexd-0.6-1.fc10.i386
Nov 15 15:23:01 Installed: bluez-gstreamer-4.17-2.fc10.i386
Nov 15 15:23:01 Installed: bluez-libs-devel-4.17-2.fc10.i386
Nov 15 15:23:02 Installed: pybluez-0.15-2.fc10.i386
Nov 15 15:23:03 Installed: bluez-alsa-4.17-2.fc10.i386
Nov 15 15:30:42 Installed: libbtctl-0.10.0-5.fc10.i386
Nov 15 15:30:42 Installed: gnome-bluetooth-libs-0.11.0-5.fc10.i386
Nov 15 15:30:44 Installed: gnome-bluetooth-0.11.0-5.fc10.i386
Nov 15 15:38:42 Installed: libtool-1.5.26-4.fc10.i386
Nov 15 15:53:49 Installed: 1:glib-1.2.10-30.fc10.i386
Nov 15 15:55:27 Installed: glib2-devel-2.18.2-3.fc10.i386
Nov 15 15:56:45 Installed: dbus-devel-1.2.4-1.fc10.i386
Nov 15 15:56:46 Installed: dbus-glib-devel-0.76-2.fc10.i386
Nov 15 16:43:17 Installed: python-alsa-1.0.17-1.fc10.i386
Nov 15 16:43:19 Installed: alsa-firmware-1.0.17-1.fc10.noarch
Nov 15 16:43:19 Installed: alsa-tools-firmware-1.0.17-1.fc10.i386
Nov 15 16:49:27 Installed: 8:arts-1.5.10-1.fc10.i386
Nov 15 16:49:28 Installed: libgadu-1.8.2-1.fc10.i386
Nov 15 16:49:30 Installed: kadu-0.6.0.1-1.fc10.i386
Nov 15 16:49:30 Installed: kadu-mediaplayer-0.6.0.1-1.fc10.i386
Nov 15 16:49:35 Installed: lash-0.5.4-2.fc9.i386
Nov 15 16:49:35 Installed: fluidsynth-libs-1.0.8-2.fc10.i386
Nov 15 16:49:36 Installed: libbinio-1.4-9.fc9.i386
Nov 15 16:49:36 Installed: lirc-libs-0.8.4a-1.fc10.i386
Nov 15 16:49:36 Installed: libsidplay-1.36.57-17.i386
Nov 15 16:49:36 Installed: kadu-audacious_mediaplayer-0.6.0.1-1.fc10.i386
Nov 15 16:49:38 Installed: audacious-plugins-1.5.1-2.fc10.i386
Nov 15 16:49:41 Installed: audacious-1.5.1-4.fc10.i386
Nov 15 16:49:41 Installed: audacious-plugins-arts-1.5.1-2.fc10.i386

I didn't end up needing to compile btsco from source (which is good since it wouldn't compile!), but I'm sure some of the stuff installed above is required or will be useful eventually.

What did work was this:

  1. Put device into pairing mode. Use Gnome's Bluetooth Applet to connect to new device.
  2. Use hcitool to verify bluetooth radio is working, then discover the headset's MAC address.
    # hcitool dev
    Devices:
     hci0 00:22:44:66:88:00
    
    # hcitool scan
    Scanning ...
     00:11:22:33:44:55 DR-BT30Q
  3. Create ~/.asoundrc file:
    pcm.bluetooth {
       type bluetooth
       device 00:11:22:33:44:55
       profile "auto"
    }
    
    pcm.bluetoothraw {
       type bluetooth
       device 00:11:22:33:44:55
    }
    pcm.bluetooth {
        type plug
        slave {
            pcm bluetoothraw
        }
    }
  4. Install audacious.
  5. Start up audacious. Right-click and select Preferences > Audio > Current Output Plugin > ALSA Output Plugin.
  6. Click Output Plugin Preferences, then under Device settings > Audio device enter "bluetoothraw".
  7. Turn on headset if not already on.
  8. Start playing!

0 comments: