List Info

Thread: Plantronics 510 headset: playback partially works, but not recording




Plantronics 510 headset: playback partially works, but not recording
user name
2007-03-11 15:32:23
I'm attempting to get my Plantronics 510 headset talking to
my desktop PC.
I'm using:

- Ubuntu Feisty
- bluez 3.9
- Linux 2.6.20 + sco-flowcontrol-v3.0.diff
- This USB dongle: Bus 003 Device 009: ID 1131:1001
Integrated System Solution Corp. KY-BT100 Bluetooth Adapter

and the example .asoundrc from CVS, modified to set the MAC
address for my headset.

Playback seems to be mostly working.  I can play short
sounds to the headset
using aplay.  I tried playing a song (resampled to 8kHz
mono) as a test, but
it cuts out periodically, approximately once per second.  I
hear about 0.25
seconds of audio followed by 0.75 seconds of silence, etc. 
I'm not sure
whether this is due to aplay or a problem with the bluetooth
setup; is this
expected to work?

Recording with arecord doesn't work at all.  When I try, I
get this from hcidump:

< HCI Command: Add SCO Connection (0x01|0x0007) plen 4
    handle 1 ptype 0x00e0
    Packet type: HV1 HV2 HV3 
> HCI Event: Command Status (0x0f) plen 4
    Add SCO Connection (0x01|0x0007) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 2 bdaddr 00:03:89:97:13:9E type SCO
encrypt 0x01
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:03:89:97:13:9E mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> ACL data: handle 1 flags 0x02 dlen 19
    L2CAP(d): cid 0x0041 len 15 [psm 0]
< ACL data: handle 1 flags 0x02 dlen 14
    L2CAP(d): cid 0x0043 len 10 [psm 0]
> HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:03:89:97:13:9E name 'PLT  510'
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1
> ACL data: handle 1 flags 0x02 dlen 19
    L2CAP(d): cid 0x0041 len 15 [psm 0]
< ACL data: handle 1 flags 0x02 dlen 14
    L2CAP(d): cid 0x0043 len 10 [psm 0]
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 1 packets 1

and this from headsetd:

Mar 11 13:27:45 localhost headsetd[779]: Changing state:
Connected-->Ready
Mar 11 13:27:45 localhost headsetd[779]: Changing state:
Ready-->Opening
Mar 11 13:27:46 localhost headsetd[779]: SCO channel opened
handle=0x0002 mtu=48
Mar 11 13:27:46 localhost headsetd[779]: Changing state:
Opening-->Streaming

The headset beeps and its LED flashes more quickly to tell
me that it's
recording (as expected; it does both with my phone), but no
data is received
by arecord.

Has anyone else seen behaviour like this?  How can I
diagnose the problem?

-- 
 - mdz

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


Re: Plantronics 510 headset: playback partially works, but not recording
user name
2007-03-11 15:55:48
On Sun, Mar 11, 2007 at 01:32:23PM -0700, Matt Zimmerman
wrote:
> Playback seems to be mostly working.  I can play short
sounds to the headset
> using aplay.  I tried playing a song (resampled to 8kHz
mono) as a test, but
> it cuts out periodically, approximately once per
second.  I hear about 0.25
> seconds of audio followed by 0.75 seconds of silence,
etc.  I'm not sure
> whether this is due to aplay or a problem with the
bluetooth setup; is this
> expected to work?

I found an example which used aplay -B 1000000, and that
fixes the
stuttering.  Still no luck yet on recording.

-- 
 - mdz

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


Re: Plantronics 510 headset: playback partially works, but not recording
user name
2007-03-12 11:39:05
Matt Zimmerman wrote:
> On Sun, Mar 11, 2007 at 01:32:23PM -0700, Matt
Zimmerman wrote:
>   
>> Playback seems to be mostly working.  I can play
short sounds to the headset
>> using aplay.  I tried playing a song (resampled to
8kHz mono) as a test, but
>> it cuts out periodically, approximately once per
second.  I hear about 0.25
>> seconds of audio followed by 0.75 seconds of
silence, etc.  I'm not sure
>> whether this is due to aplay or a problem with the
bluetooth setup; is this
>> expected to work?
>>     
>
> I found an example which used aplay -B 1000000, and
that fixes the
> stuttering.  Still no luck yet on recording.
I'm trying to get a similar setup to work, here's my previos
post with 
my status so far, would love to hear of any breakthroughs
you make:


Trying to use a plantronics 510s with skype.

Update on my attempts, I've established the setup that
almost works. By 
almost works I mean:
- aplay, arecord -D headset work, quality is fine for
telephone use.
- aoss skype almost works: I can hear the test call clearly,
I can 
record a message but when it is played back my voice is
garbled beyond 
recognition.

My next step is to fiddle with pcm settings - I've seen
.asoundrc 
scripts for skype and dmix that do conversions between 8 and
16 bit 
formats and other stuff I know nothing about (but am afraid
I'm gonna 
learn). Here are the details of how I got this far:

== DETAILS: based on btsco/docs/build.html from CVS,
slightly modified.

install libsbc:

Note: When asking for a password simply press Enter.

cvs -d:pserver:anonymoussbc.cvs.sourceforge.net:/cvsroot/sbc login
cvs -d:pserver:anonymoussbc.cvs.sourceforge.net:/cvsroot/sbc co sbc
cd sbc
./bootstrap
./configure --prefix=/usr
make
sudo make install

install bstco:

cvs 
-d:pserver:anonymousbluetooth-alsa.cvs.sourceforge.net:/cvsroot/bluetooth
-alsa 
login
cvs 
-d:pserver:anonymousbluetooth-alsa.cvs.sourceforge.net:/cvsroot/bluetooth
-alsa 
co btsco
cd btsco
./bootstrap
# Note I added CFLAGS in ./configure. Without them the
plugin emits
# a torrent of debug messages that slow it down and ruin the
sound quality.
# -NDEBUG is essential, -03 is just for good luck.
./configure --prefix=/usr --enable-alsaplugin
CFLAGS="-NDEBUG -03"
make
sudo make install

** Using from skype
My .asoundrc is copied from btsco/alsa-plugins/asound.conf
with the
headset address replaced by my own and the following
addition for aoss:

# Use headset via aoss emulation for skype.

pcm.dsp0 {
  type plug
  slave.pcm "hw_headset"     }

Full .asoundrc attached. Run skype as "aoss skype"
(you need alsa-oss 
package installed.)


== NOTES

The instructions at http
://bluetooth-alsa.sourceforge.net/build.html did 
*not* work for me. The plugz version of the plugin requires
a different 
.asoundrc (based on plugz/asound.conf) but aplay -D headset
gave me:

[aconwayscooter plugz]$ aplay -D headset
/usr/share/sounds/startup3.wav
Playing WAVE '/usr/share/sounds/startup3.wav' : Signed 16
bit Little 
Endian, Rate 44100 Hz, Stereo
aplay: set_params:909: Channels count non available

Cheers,
Alan.

------------------------------------------------------------
------------

pcm.headset {
	type plug;
	slave.pcm "hw_headset";
}

pcm.hw_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:03:89:95:9C:83" # Put your HS
address here
	}

	# 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
}

# Use headset via aoss emulation for skype.

pcm.dsp0 {
   type plug
   slave.pcm "hw_headset"      
}


------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


Re: Plantronics 510 headset: playback partially works, but not recording
user name
2007-03-21 22:18:35
On Mon, Mar 12, 2007 at 12:39:05PM -0400, Alan Conway
wrote:
> Matt Zimmerman wrote:
> > I found an example which used aplay -B 1000000,
and that fixes the
> > stuttering.  Still no luck yet on recording.
> I'm trying to get a similar setup to work, here's my
previos post with 
> my status so far, would love to hear of any
breakthroughs you make:

Thanks for sharing your experience.

> Trying to use a plantronics 510s with skype.
> 
> Update on my attempts, I've established the setup that
almost works. By 
> almost works I mean:
> - aplay, arecord -D headset work, quality is fine for
telephone use.

Interesting, so recording works for you?  I wonder what's
different about
your setup.

> - aoss skype almost works: I can hear the test call
clearly, I can 
> record a message but when it is played back my voice is
garbled beyond 
> recognition.

I've no idea about this; I'm wanting to use Ekiga which has
native ALSA
support.

> == NOTES
> 
> The instructions at http
://bluetooth-alsa.sourceforge.net/build.html did 
> *not* work for me. The plugz version of the plugin
requires a different 
> .asoundrc (based on plugz/asound.conf) but aplay -D
headset gave me:
> 
> [aconwayscooter plugz]$ aplay -D headset
/usr/share/sounds/startup3.wav
> Playing WAVE '/usr/share/sounds/startup3.wav' : Signed
16 bit Little 
> Endian, Rate 44100 Hz, Stereo
> aplay: set_params:909: Channels count non available

I believe I got the same when I tried to play a stereo
stream for a test.
Since then, I've just been using mono files for testing,
which works fine.

> 	# 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
> 	}

Haven't experimented with this; will see if it makes a
difference.

-- 
 - mdz

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


Re: Plantronics 510 headset: playback partially works, but not recording
user name
2007-03-21 23:57:52
On Wed, Mar 21, 2007 at 08:18:35PM -0700, Matt Zimmerman
wrote:
> On Mon, Mar 12, 2007 at 12:39:05PM -0400, Alan Conway
wrote:
> > Matt Zimmerman wrote:
> > > I found an example which used aplay -B
1000000, and that fixes the
> > > stuttering.  Still no luck yet on recording.
> > I'm trying to get a similar setup to work, here's
my previos post with 
> > my status so far, would love to hear of any
breakthroughs you make:
> 
> Thanks for sharing your experience.
> 
> > Trying to use a plantronics 510s with skype.
> > 
> > Update on my attempts, I've established the setup
that almost works. By 
> > almost works I mean:
> > - aplay, arecord -D headset work, quality is fine
for telephone use.
> 
> Interesting, so recording works for you?  I wonder
what's different about
> your setup.

Could you send me an hcidump -V trace of you capturing with
arecord?  I'd
like to compare it to what I see here.

-- 
 - mdz

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )