Overview | History | Future work | Download & build | Credits | Contact us
Note: When asking for a password simply press Enter.
cvs -d:pserver:anonymous@sbc.cvs.sourceforge.net:/cvsroot/sbc login cvs -d:pserver:anonymous@sbc.cvs.sourceforge.net:/cvsroot/sbc co sbc cd sbc ./bootstrap ./configure --prefix=/usr make sudo make installinstall btsco:
cvs -d:pserver:anonymous@bluetooth-alsa.cvs.sourceforge.net:/cvsroot/bluetooth-alsa login cvs -d:pserver:anonymous@bluetooth-alsa.cvs.sourceforge.net:/cvsroot/bluetooth-alsa co btsco cd btsco ./bootstrap ./configure --prefix=/usr --enable-alsaplugin make sudo make install
Discover the headset's address by doing a bluetooth scan. The headset may need to be in pairing mode for this address to appear:
hcitool scan
The address will look something like 00:14:CF:03:17:8C
cp alsa-plugins/sample.a2dprc ~/.a2dprc
edit ~/.a2dprc to contain the address of your headset on the address= line.
create ~/.asoundrc with simply:
pcm.a2dpd { type a2dpd }
and run a2dpd (it's not advised to run it as root). You'll have to arrange for this to be started up subsequently.
You can also have the SDP records for A2DP and AVRCP activated at boot time; this may allow you in some setups to have the headset initiate the connection to a2dpd to start up a stream.
sdptool add A2SRC sdptool add AVRTG
If this is a combo headset, turn off your phone first! (Otherwise, the headset will be complicating things by trying to connect to two devices at once)
Turn the headset on in pair mode and hit play in xmms. On the first connect, you should get a popup asking for the pin. Then audio should start.
If your set can do AVRCP, it will be set up to do track advance/pause/stop/play through xmms command-line control. To make AVRCP work with different clients, you'll need to customize ~/.a2dprc.
alsadev=a2dpd
For some reason the GUI will not allow you to set this device. Also set "Audio Desynchronization Compensation" in the gui to a value between -200 and -600, depending on your headset's latency, to improve audio/video sync.
There's a bit of delay between the picture and the voice but it's bearable for me.
The old method involves a kernel module and the btsco daemon. See below for the details for this method.
The preferred method uses an outstanding alsa plugin written by Fabien Chevalier instead and requires no kernel patches nor modules. The plugin was installed when you performed the btsco install above.
If you base your .asoundrc on the example alsa-plugins/asound.conf from cvs, you can edit it and add your SCO headset address. Then change the alsa device in xmms to headset and run /usr/bin/headsetd. You should be able to use the headset at this point.
If you subsequently change your .asoundrc, you will have to restart xmms but I don't think you need to restart headsetd.
You will have to set your applications to use the alsa device headset similar to what we did above with a2dpd. Unfortunately some applications won't let you choose this device because they won't let you type in the name of the device and they don't use the extended alsa api for finding alsa plugin devices. At least in the case of vlc, you can edit its configuration directly to get around this.
You will occasionally get static and might even crash if you don't have a kernel patch applied to keep tighter controls on the audio stream. Get the patch here: bluez-sco-flowcontrol-mh7.patch.
If that still doesn't help or if you're using KDE, there may be an equivalent kde app or you could try changing pin_helper in /etc/bluetooth/hcid.conf:
pin_helper /usr/bin/bluez-pin;
and restart bluetooth.
If audio is choppy, try putting
lm accept,master;
in hcid.conf. Also note that other bluetooth connections (like getting internet through a cellphone) at the same time you're trying to play music will probably create problems.
cd kernel make make install depmod -e make clean
modprobe snd_bt_sco
esdctl stop
hciconfig hci0 voice 0x0060
btsco bdaddress
aplay -B 1000000 -D plughw:Headset sound.wav
A2DP provides a way to send stereo high-quality audio to some of the newer headsets. On all the headsets I've seen so far, this is one-way audio, so if you were expecting to get something like a gaming headset (talking to other players, getting stereo sound back from the game), you should wait for the next generation of headsets to get 2-way A2DP.
To test stereo audio without installing the alsa plugin, you can run:
mpg123 --au - file.mp3 | ./a2play 00:0D:3C:30:32:ADWhere you replace file.mp3 with a good mp3 file and bdaddr with the address of your headset. You can send live audio from line-in etc using a command like:
./a2play -s -d -r 44100 00:0D:3C:30:32:AD /dev/dspDon't be surprised to get a delay. It's probably under 500ms but not much under that.
The A2DP sink code receives a stream from another device. Run it with:
hciconfig hci0 class 0x200404 sdptool add A2SNK ./a2recvIt will try to bind to the bluetooth adapter and send audio out to /dev/dsp.