Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Trying to get Bluetooth headset to work, So close but...< Next Oldest | Next Newest >
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Mar. 10 2007,10:41 QUOTE

I've been trying to get a bluetooth headset to work with DSL in order to be able to use it with the Skype unc extension - I'm sure others would be interested in this too - I'm almost there but could use some help if anybody has managed to do this.

The main sources of info are:

the readme in snd-bluez-sco-2003-09-15.tar.gz
http://www.jochem.name/Bluetooth-headset-with-alsa

snd-bluez-sco-2003-09-15.tar.gz contains a number of patches to modify alsa-driver-0.9.6.tar.bz2 and alsa-lib-0.9.6.tar.bz2 so that a snd-bluez-sco alsa module and bluezsco utility can be built. There is a patch for the hci_usb driver but this seems relevant to 2.4.20 and has been built in 2.4.26(?).

After compiling snd-bluez-sco and bluezsco and proceding as per the post "How to start Bluetooth & Pair with a remote device", I did as follows:

# beaver /etc/bluetooth/pin --> change pin to 0000 [used by headsets]
# hcid restart
# insmod snd-hwdep
Using /lib/modules/extra/alsa//snd-hwdep.o
# insmod snd-bluez-sco
Using /lib/modules/2.4.26/kernel/sound/bluez/snd-bluez-sco.o

My headset (Sonyericsson HBH-610) is put in pairing mode by holding the vol+  & vol- keys for 5 secs, after "hcitool auth" the flashing light changes to indicate it is paired.

# hcitool cc 00:12:EE:A6:1D:F4
# hcitool auth 00:12:EE:A6:1D:F4

Search for the Bluetooth channel used by the headset:

# sdptool search --bdaddr 00:12:EE:A6:1D:F4 HS
Searching for HS on 00:12:EE:A6:1D:F4 ...
Service Name: SonyEricsson Headset Service
Service RecHandle: 0x10002
Service Class ID List:
 "Headset" (0x1108)
 "Generic Audio" (0x1203)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 1
Profile Descriptor List:
 "Headset" (0x1108)
   Version: 0x0100

Set up the headset communications on bluetooth channel 1:

# sdptool add --channel=1 HS
Headset service registered
# rfcomm bind 1 00:0A:D9:E8:4A:65 1
# mknod -m 666 /dev/rfcomm1 c 216 1

Configure voice comms and connect to the headset:

# hciconfig hci0 voice 0x0040
# bluezsco 00:12:EE:A6:1D:F4 1
# Device is 1:0
Voice setting: 0x0040
RFCOMM channel connected
SCO audio channel connected (handle 49, 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?

At this point the headset beeps and "noise" comes over its speaker. If I change the xmms application output to /dev/dsp1 (my soundcard is /dev/dsp0) and play the 1kHz tone generator, the "noise" changes tone/increases in volume.

To return to the prompt in the terminal window, I press the headset button and the prompt returns with:

AT+CKPD=200

It occurs to me that I might have to modify some sort of alsa config file (but where are .asoundrc or asound.conf?) to reflect the fact there are now two alsa sound devices on my machine, but they seem to be recognised OK:

# cat /proc/asound/cards
0 [I82801DBICH4   ]: ICH - Intel 82801DB-ICH4
                    Intel 82801DB-ICH4 at 0xfaeff800, irq 11
1 [Headset        ]: Bluez SCO - Bluez Headset
                    Bluez Headset 1

Any help would be gratefully received...
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 07 2007,06:07 QUOTE

Got it...
Quote
There is a patch for the hci_usb driver but this seems relevant to 2.4.20 and has been built in 2.4.26(?).

After going line by line through the patch, I found one line that had not been applied in 2.4.26, basically to change:

if (ep->wMaxPacketSize < size)
to
if (ep->wMaxPacketSize != 9)

After making this modification to hci_usb and recompiling the kernel modules - plus some other tidying up now I start to understand how alsa works - sound comes out of the bluetooth headset  :)
Back to top
Profile PM 
1 replies since Mar. 10 2007,10:41 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Trying to get Bluetooth headset to work

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code