How to use a Bluetooth headset with DSL-N


Forum: DSL-N
Topic: How to use a Bluetooth headset with DSL-N
started by: Juanito

Posted by Juanito on April 27 2007,10:41
There are a couple of ways to get a Bluetooth headset working with DSL-N - one uses an alsa module, snd-bt-sco and the other uses an alsa plug-in, plugz. I managed to compile both of the solutions but, so far, only the btsco works for me.

Most of the material is covered in < this > how-to for DSL, but since there are a few small differences between that and DSL-N, some of it is repeated here.

Two extensions are required, bluez-utils.dsl and alsa_btsco.dsl - both found < here >. The bluez-utils extension should be loaded first since the pin file and hci-usb driver will be overwritten. Once the extensions are loaded, you can remove any sound modules (except soundcore) that might be there and then load the headset driver:

Code Sample
# su dsl mydsl-load /path-to-file/bluez-utils.dsl
# su dsl mydsl-load /path-to-file/alsa_btsco.dsl
# rmmod -f snd_mixer_oss
# rmmod -f snd          
# modprobe snd-bt-sco
# lsmod
snd_bt_sco             13984  0
snd_pcm_oss            48420  0
snd_mixer_oss          18304  1 snd_pcm_oss
snd_pcm                81540  2 snd_bt_sco,snd_pcm_oss
snd_timer              23556  1 snd_pcm
snd_page_alloc         13060  2 snd_bt_sco,snd_pcm
snd_hwdep              10884  1 snd_bt_sco
snd                    46052  6 snd_bt_sco,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep
soundcore              11104  1 snd


Next bring up the Bluetooth interface, pair with your headset and bind the Bluetooth headset channel to rfcomm:

Code Sample
# modprobe hci_usb
# modprobe l2cap
# modprobe rfcomm
# modprobe sco
# modprobe bnep
# lsmod
bnep                   19840  0
sco                    18688  0
rfcomm                 39832  0
l2cap                  28416  6 bnep,rfcomm
hci_usb                16776  2
bluetooth              48900  9 bnep,sco,rfcomm,l2cap,hci_usb
# hciconfig hci0 up
# hcitool cc 00:12:EE:A6:1D:F4 [use your bt address here]
# hcitool auth 00:12:EE:A6:1D:F4
# sdptool add --channel=1 HS [use your headset channel number here]
Headset service registered
# rfcomm bind 1 00:0A:D9:E8:4A:65 1 [bind rfcomm1 to channel 1]
# mknod -m 666 /dev/rfcomm1 c 216 1


If that went OK, then you are ready to start using the headset. Note that, once connected, the headset daemon will tie up the terminal window so you will need to open a second one to send commands to it.

Code Sample
# hciconfig hci0 voice 0x0040
# btsco 00:12:EE:A6:1D:F4 1 [enter your bt address and headset channel number]
Device is 0:0
Voice setting: 0x0040
RFCOMM channel connected
SCO audio channel connected (handle 50, mtu 64)
Setting sco fd
Done setting sco fd
AT*ECBP=?
AT+VGS=6
Sending up speaker change 6
AT+CLIP=1
AT+CSCS="UTF-8"
AT*SEAM="HBH-610",13
AT+CLAN?
[changes made in alsamixer are echoed here]
speaker volume: 6 mic volume: 2
speaker volume: 6 mic volume: 3
speaker volume: 6 mic volume: 4
speaker volume: 6 mic volume: 5
speaker volume: 6 mic volume: 6
speaker volume: 6 mic volume: 7
speaker volume: 6 mic volume: 8
speaker volume: 7 mic volume: 8
speaker volume: 8 mic volume: 8
[use <ctrl-c> once finished]
AT+CKPD=200


Note that I sometimes had to issue the btsco command several times before the headset would connect properly. In a second terminal window you can use alsamixer to adjust the sound/microphone volume and to un-mute loopback to test the headset. You can also play mp3 files to test the headset, both oss and alsa sound work:

Code Sample
# mplayer -ao oss /path-to-file/music.mp3
# mplayer -ao alsa /path-to-file/music.mp3


I didn't get chance to test this with Skype, but the DSL version works with Skype 1.3.0.53 so I believe this version should also work.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.