2006-11-03 12:35:49

by Tobias Wolf

[permalink] [raw]
Subject: [Bluez-devel] Bluetooth-Alsa: headsetd

Hello,

i want to connect Bluetooth-Headsets to my Linux-Workstation for
Voip-Telephony with Ekiga.

So far i have used the btsco2 Userspace-Program with the kernel module
snd_bt_sco.

This is the Hardware, i've been working with:

BT-Dongle: Hama

hciconfig -a
hci0: Type: USB
BD Address: 00:10:60:D0:96:1A ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:808 acl:0 sco:0 events:29 errors:0
TX bytes:460 acl:0 sco:0 commands:28 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'toa8-0'
Class: 0x100100
Service Classes:
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x460 LMP Ver: 1.1 (0x1) LMP Subver:
0x460
Manufacturer: Cambridge Silicon Radio (10)


hciconfig hci0 revision
hci0: Type: USB
BD Address: 00:10:60:D0:96:1A ACL MTU: 192:8 SCO MTU: 64:8
HCI 17.11
Chip version: BlueCore02
Max key size: 128 bit
SCO mapping: HCI

BT-Headset: Logitech Mobile Pro

With the kernel module and btsco2 i have succesfully connected the
headset with Ekiga and was able to make a phone call. Quality was pretty
good, although it happens from time to time the the called person hears
and awfully loud noise for a second or so. No fun in the long run.

So i took a look at http://bluetooth-alsa.sourceforge.net/ and saw that
Brad Midgley has done some updating on the doku since i visited the page
last time.

I read through the instructions on
https://help.ubuntu.com/community/BluetoothAudio. Specially the section
about "Configure SCO (aka mono, aka voice) Driver" and the "preferred
method" without any kernel module impressed me much.

But here starts my misery :S

1) I have compiled and installed project according to the instructions
found in btsco/alsa-plugins/BUILD. I think the alsa-libs were installed.

2) I have created the .asoundrc file:
# ALSA library configuration file

pcm.headset {
@args [BDADDR TIMEOUT MAX_PERIODS]

# The Bluetooth device address for target headset, used for
Audio Gateway (PC) initiated connections
# Please note that this value is ignored when the connection is
Headset initiated
@args.BDADDR {
type string
#default "00:13:17:30:B2:55" # Put your HS address here
default "00:0D:44:5C:86:BA" # Logitech HS05 V02
}

# This value represents how long we will try to reach the
headset, until we give up.
# Value is in milliseconds
@args.TIMEOUT {
type integer
default 6000
}

# This is the size of the buffer used to queue Voice packets.
Value must be between
# 2 and 334 (~ 1 second). Default value is 2 buffers, which
works well most of the
# time, and has the advantage of giving us an ultra low delay
@args.MAX_PERIODS {
type integer
default 334
}

type sco
bdaddr $BDADDR
timeout $TIMEOUT
max_periods $MAX_PERIODS
}

ctl.headset {
type sco
}

pcm.a2dpd {
type a2dpd
}

# Include settings that are under the control of asoundconf(1).
# (To disable these settings, comment out this line.)
</home/tobias/.asoundrc.asoundconf>

3) Now, the instructions tell me to change the device of, eg xmms to
headset, but the device never shows up (even after an reboot). So i
wanted to test with aplay:

aplay -B 1000000 -Dplug:pcm.headset /usr/share/sounds/alsa/Noise.wav

or

aplay -B 1000000 -D headset /usr/share/sounds/alsa/Noise.wav

With this result:

DEBUG: _snd_pcm_sco_open: Starting pcm_sco plugin.
DEBUG: _snd_pcm_sco_open: Open mode is for Playback.
aplay: main:544: Cannot open Audio Device: Permission denied

/var/log/daemon.log shows the following:
Nov 3 13:23:30 toa8 headsetd[14268]: Configuration phase ended: target
bdaddr is 00:0D:44:5C:86:BA, timeout is 6000 ms
Nov 3 13:23:30 toa8 headsetd[14268]: Changing state: Idle-->Paging
Nov 3 13:23:31 toa8 hcid[3371]: link_key_request
(sba=00:10:60:D0:96:1A, dba=00:0D:44:5C:86:BA)
Nov 3 13:23:31 toa8 headsetd[14268]: unable to connect L2CAP socket to
headset: Permission denied
Nov 3 13:23:31 toa8 headsetd[14268]: Changing state: Paging-->Idle


Has anyone a clue why i cant connect to L2CAP socket and what i have to
enable this ?

Furthermore, does anyone know if there exist the possibility to actually
take an incoming come by pressing a button on the headset. In my setup
i have to be a my workstation and click on a button on my Softfon to
take a call.

Any help is greatly appreciated ;)

Have a nice Week-End,

Tobias Wolf

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2006-11-10 11:27:33

by Tobias Wolf

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth-Alsa: headsetd

Fabien Chevalier schrieb:
> Hi Tobias,
>
>> Thx a lot.
>>
>> I have been experimenting a little bit in the last days. I have mangaged
>> to use the alsa-plugin with xmms and it works.
>>
>> But my softphone (EKIGA) doesn't allow me to manually type the alsa
>> device. Maybe i have to give the EKIGA-Community a hint, maybe they
>> change this.
>
> I wrote a patch for Ekiga, so that you are able to select the headset as
> output device.
> It is bundled with a mail i sent to the list yesterday, which
> unfortunately is still waiting for moderator approval, as it is a bit
> too big ;-)
>
Really, well i think i have to get hold of the Ekiga-Sources and try
your patch.

>> But there is a more basic problem with sound quality and i want to know
>> if anyone of the has experienced the same.
>>
>
> Sorry i didn't experience that yet :-)
>
Hmmm, ok, strange, but that might indicate that it is a local phenomenon
and not related to bluetooth-alsa. I have changed the dongels and the
headsets, mostly Logitech, and everytime with the same result.

Tobias

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-10 10:45:52

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth-Alsa: headsetd

Hi Tobias,

>>
> Thx a lot.
>
> I have been experimenting a little bit in the last days. I have mangaged
> to use the alsa-plugin with xmms and it works.
>
> But my softphone (EKIGA) doesn't allow me to manually type the alsa
> device. Maybe i have to give the EKIGA-Community a hint, maybe they
> change this.

I wrote a patch for Ekiga, so that you are able to select the headset as
output device.
It is bundled with a mail i sent to the list yesterday, which
unfortunately is still waiting for moderator approval, as it is a bit
too big ;-)

>
> But there is a more basic problem with sound quality and i want to know
> if anyone of the has experienced the same.
>

Sorry i didn't experience that yet :-)

Cheers,

Fabien

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-10 10:30:30

by Tobias Wolf

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth-Alsa: headsetd

Fabien Chevalier schrieb:
> Tobias,
>
> I'm gonna soon send a new release of the plugin, the daemon, and the
> kernel patch to the list, you might wanna give it a try.
>
> Cheers,
>
> Fabien
>
Thx a lot.

I have been experimenting a little bit in the last days. I have mangaged
to use the alsa-plugin with xmms and it works.

But my softphone (EKIGA) doesn't allow me to manually type the alsa
device. Maybe i have to give the EKIGA-Community a hint, maybe they
change this.

But there is a more basic problem with sound quality and i want to know
if anyone of the has experienced the same.

If i use the kernel module snd_bt_sco and btsco2, i am able to make
phone calls with ekiga. But the people i have called told that sound
quality changed over time from good to very bad, in the end they get a
loud noise sound, and after that sound quality is good for a moment.
This repeats ever on.

As I understand bluetooth there are a set of frequencys and they are
changed frequently between the dongle and the headset. May it be, that i
have something in my enviroment that disturbs some frequencys, that
bluetooth uses, and everytime my headset reaches that region, sound
quality degrades ?

I say this, because we have an windows pc in the same room, and if the
make a call with bluetooth headset over this pc, the caller experiences
the same.

Tobias

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-09 18:35:43

by Marcel Hilzinger

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth-Alsa: headsetd

Am Freitag, 3. November 2006 13:35 schrieb Tobias Wolf:
> Hello,
[...]
> 3) Now, the instructions tell me to change the device of, eg xmms to
> headset, but the device never shows up (even after an reboot). =


You cannot choose it from a list. Just type a2dpd manually. It rocks :-)


-- =

=DCdv=F6zlettel -- Mit freundlichen Gr=FCssen,
Marcel Hilzinger

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-09 17:53:28

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth-Alsa: headsetd

Tobias,

I'm gonna soon send a new release of the plugin, the daemon, and the
kernel patch to the list, you might wanna give it a try.

Cheers,

Fabien



Tobias Wolf wrote:
> Sorry, forgot to tell some detail.
>
> Naturally i have the headset paired with the dongle and headsetd is
> executed ;S
>
> Sorry for not mentioning it in the first mail,
>
> Tobias Wolf
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-03 12:39:54

by Tobias Wolf

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth-Alsa: headsetd

Sorry, forgot to tell some detail.

Naturally i have the headset paired with the dongle and headsetd is
executed ;S

Sorry for not mentioning it in the first mail,

Tobias Wolf


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel