How to use a Bluetooth headset with DSLForum: DSL Tips and Tricks Topic: How to use a Bluetooth headset with DSL started by: Juanito Posted by Juanito on April 09 2007,06:31
This is part 6 of the DSL Bluetooth how-to. In order to proceed from here, you will need to have Bluetooth up and running on your DSL machine and be able to "pair" with a Bluetooth device as described in part 1 - "How to start Bluetooth & Pair with a remote device".Since bluezsco uses an alsa driver, snd-bluez-sco, based on an older version of alsa than that in alsa.dsl, make sure that alsa.dsl is not loaded. Use lsmod to make sure that no sound drivers are loaded except for soundcore. If some sound drivers are loaded, use rmmod to unload them. You will need to download both bluez-utils.dsl and alsa_bluezsco.dsl and load bluez-utils.dsl first - this is because alsa_bluezsco.dsl will overwrite the pin file (all headsets seem to use 0000) and the hci-usb module (modified to support bluezsco). First load the headset sound driver and check it loaded OK:
Next load the bluetooth modules and bring up the bluetooth interface as described in part 1 of the how-to. Once this is done, you are ready to start to connect to the headset. First put your headset into pairing mode - to put my headset into pairing mode, I needed to hold the volume + & - keys for 5 seconds. Note that this assumes your headset pin is 0000 - change /etc/bluetooth/pin and restart hcid if your pin is something different. If your machine pairs successfully with your headset, it will revert to standby mode. On my headset, the light changes from flashing green/red (pairing mode) to intermittently flashing green (standby) when the prompt returns after the "auth" command:
In order to check that your machine's Bluetooth interface supports hci/sco and to find out which bluetooth channel your headset uses, issue the commands below. Note that you may have to try this more than once - my headset did not always reply first time.
Now you know the bt channel for your headset, the setup can be completed:
With the set up complete, all that remains is to open the link to the headset - note that the prompt will not return until the link is broken by either pressing the button on your headset or <ctrl-c>. To continue to issue commands, you will need to open another terminal window:
In a second terminal window, you can now communicate with the headset:
Changes made in alsamixer will be echoed in the first terminal window. The snd-bluez-sco driver is apparently 8-bit mono - there are more recent drivers, but only for 2.6.x - so the microphone loopback sounds fine but music does not sound that great. Edit 1 ------ I could not get mp3 files to play with alsa, but I suspect this is because I did not get the alsa device naming convention right. According to Google, this might require using .asoundrc to create a "real" rather than a "virtual" device but I have no clue how to go about that. I did get mp3 files to play with oss using mpg123 and mplayer-nogui.uci (which does not have an alsa output module). To do this, the oss modules need to be loaded:
xmms will play also play mp3 files using the oss default (audio device /dev/dsp - mixer /dev/mixer). Edit 2 ------- I manage to download Skype -1.3.0.53 whilst travelling (the government blocks Skype where I live) and it seems to work OK. On start-up Skype automatically detected the alsa headset driver and a test call worked reasonably - my voice was a little distorted but I could hear the other end pefectly. I also tried with OSS and Skype worked fine with /dev/dsp. |