2005-07-26 04:28:12

by John Gruenenfelder

[permalink] [raw]
Subject: [Bluez-devel] Can't get btsco to connect to Plantronics M2500 headset

I am having no end to troubles getting my Plantronics M2500 headset working
under Linux. As I am quite new to using Bluetooth, I'm not sure where the
problem might lie.

I am using a Linksys USBBT100 adapter to connect with the headset.

This is with Linux 2.6.12 on an AMD64 machines using the latest Bluez packages
from the amd64 Debian port.

hciconfig output appears correct and I can talk to the adapter just fine. SCO
mapping is "HCI".

"hcitool info 00:03:89:6E:C9:11" just gives:

Requesting information ...
Can't create connection: Input/output error

Clearly, that can't be good. But I do not see any error messages in the logs
so I can't really tell why it is failing. Even the hcidump output doesn't
appear to have and noticable error messages.

hcidump -X output after turning on headset:

> HCI Event: Connect Request (0x04) plen 10
0000: 11 c9 6e 89 03 00 0c 04 20 01 ..n..... .
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
0000: 11 c9 6e 89 03 00 00 ..n....
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 09 04 ....
> HCI Event: Role Change (0x12) plen 8
0000: 00 11 c9 6e 89 03 00 00 ...n....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 29 00 11 c9 6e 89 03 00 01 00 .)...n.....
> HCI Event: Connect Request (0x04) plen 10
0000: 11 c9 6e 89 03 00 0c 04 20 01 ..n..... .
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
0000: 11 c9 6e 89 03 00 00 ..n....
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 09 04 ....
> HCI Event: Role Change (0x12) plen 8
0000: 00 11 c9 6e 89 03 00 00 ...n....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 2a 00 11 c9 6e 89 03 00 01 00 .*...n.....
> HCI Event: Connect Request (0x04) plen 10
0000: 11 c9 6e 89 03 00 0c 04 20 01 ..n..... .
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
0000: 11 c9 6e 89 03 00 00 ..n....
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 09 04 ....
> HCI Event: Role Change (0x12) plen 8
0000: 00 11 c9 6e 89 03 00 00 ...n....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 2b 00 11 c9 6e 89 03 00 01 00 .+...n.....
> HCI Event: Connect Request (0x04) plen 10
0000: 11 c9 6e 89 03 00 0c 04 20 01 ..n..... .
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
0000: 11 c9 6e 89 03 00 00 ..n....
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 09 04 ....
> HCI Event: Role Change (0x12) plen 8
0000: 00 11 c9 6e 89 03 00 00 ...n....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 2c 00 11 c9 6e 89 03 00 01 00 .,...n.....


hcidump -X output when running "hcitool info 00:03:89:6E:C9:11" :

< HCI Command: Create Connection (0x01|0x0005) plen 13
0000: 11 c9 6e 89 03 00 18 cc 02 00 00 00 01 ..n..........
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 05 04 ....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 2a 00 11 c9 6e 89 03 00 01 00 .*...n.....


hcidump -X output when running "btsco 00:03:89:6E:C9:11"

< HCI Command: Create Connection (0x01|0x0005) plen 13
0000: 11 c9 6e 89 03 00 18 cc 02 00 00 00 00 ..n..........
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 05 04 ....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 29 00 11 c9 6e 89 03 00 01 00 .)...n.....
< HCI Command: Read Voice Setting (0x03|0x0025) plen 0
> HCI Event: Command Complete (0x0e) plen 6
0000: 01 25 0c 00 60 00 .%..`.
< HCI Command: Create Connection (0x01|0x0005) plen 13
0000: 11 c9 6e 89 03 00 18 cc 02 00 00 00 00 ..n..........
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 05 04 ....
> HCI Event: Link Key Request (0x17) plen 6
0000: 11 c9 6e 89 03 00 ..n...
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 11 c9 6e 89 03 00 32 b5 cd e8 3c 27 06 39 dc 56 ..n...2...<'.9.V
0010: 91 aa ea c5 cb af ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 11 c9 6e 89 03 00 ......n...
> HCI Event: Connect Complete (0x03) plen 11
0000: 05 2a 00 11 c9 6e 89 03 00 01 00 .*...n.....


btsco itself gives:

swordfish:~# btsco 00:03:89:6E:C9:11
Error: Failed to connect to SDP server: Permission denied
Assuming channel 2

Can't connect RFCOMM channel: Permission denied


I've been working at this for a few days and I'm no closer to understanding
what the problem is. A few extra notes:

* When I first got the adapter and headset, I trtied to use it in Windows XP.
This occured before the first use in Linux. There, I was able to pair the
device, but when checking the "services" tab there was nothing listed.
Also, I had no way of testing it in Windows.

* The first time I tried to use the headset in Linux, I encountered these same
problems, but I *did* get it to work. I was even able to play and record
audio. After a short time, btsco exited and I haven't gotten it to work
again. :(

* That first time, I also found an entry in the logs which I have never seen
again:
hcid[4365]: pin_code_request (sba=00:0C:41:E1:E2:F1, dba=00:03:89:6E:C9:11)
This comes immediately after a link_key_request. I still see the
link_key_request messages every time I I do any bluetooth commands, but I
have not seen the pin_code_request line again. I don't know if that is
significant.

Please help!


--
--John Gruenenfelder Research Assistant, Steward Observatory, U of Arizona
[email protected]
Try Weasel Reader for PalmOS -- http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
--Sam of Sam & Max


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-07-26 22:55:14

by John Gruenenfelder

[permalink] [raw]
Subject: Re: [Bluez-devel] Can't get btsco to connect to Plantronics M2500 headset

On Mon, Jul 25, 2005 at 11:29:58PM -0700, John Gruenenfelder wrote:
>On Mon, Jul 25, 2005 at 11:30:00PM -0600, Brad Midgley wrote:
>>
>>I've looked at your messages and I can't think of many other things. Do
>>you have other bluetooth devices you can try? Can you easily try it with
>>a 32-bit kernel/userland?
>
>I do have an old laptop that I can test with. I will try this tomorrow. I
>don't actually intend to use the headset on my 64bit machine, but as it is my
>desktop, it's what I use for testing. So if it works with a 32bit machine,
>that will be just fine.

Okay, I tried to use the headset on my laptop. Unfortunately, the result was
the same.

I did find that when I first turned on the headset with the bluetooth dongle
plugged into the laptop, I saw the "pin_request" events in the hcidump
output. After reading up on what the link key is and how it is generated, it
now seems to me that this is just fine.

If I understand correctly, the first time a device is connected to a bluetooth
host, they will negotiate the link key. This usually involves transmitting
the PIN and generating the encryption key. After that, this procedure no
longer needs to be done. This would explain why I never saw those messages
again on my other machine. The link setup had already been performed.

So... if the link status is fine, and the device is properly paired... what
could be wrong? If it weren't for the fact that I breifly had it functioning,
I would strongly suspect that the headset is broken.

Is such a breakage possible, where the radio/link is working, but everything
past that doesn't function?

I don't know anybody else with anything bluetooth (even a phone), so it's hard
for me to test this. My only other option right now is the tiny iota of
information I can get out of Windows. In XP, the pairing succeeds, but when I
check the headset "Properties" and check the "Services" tab, it pauses for a
second, but lists nothing. If anybody here has any idea what, if anything,
should be listed in that tab, please let me know. Otherwise I'll try to
contact Plantronics support and see what they say.


--
--John Gruenenfelder Research Assistant, Steward Observatory, U of Arizona
[email protected]
Try Weasel Reader for PalmOS -- http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
--Sam of Sam & Max


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-26 06:29:58

by John Gruenenfelder

[permalink] [raw]
Subject: Re: [Bluez-devel] Can't get btsco to connect to Plantronics M2500 headset

On Mon, Jul 25, 2005 at 11:30:00PM -0600, Brad Midgley wrote:
>John,
>
>You can force the pairing to be built again by removing
>/etc/bluetooth/link_key

I thought something like this might be possible. If I have hcidump running,
when I start hcid I see:

< HCI Command: Read Stored Link Key (0x03|0x000d) plen 7
> HCI Event: Command Complete (0x0e) plen 8

Which says to me that a key is stored somewhere. However, I have never seen
the file /etc/bluetooth/link_key on my system. Is there anyplace else it
might be located, perhaps under /var? I searched my machine for any
*link_key* files, but didn't find anything.

>I've looked at your messages and I can't think of many other things. Do
>you have other bluetooth devices you can try? Can you easily try it with
>a 32-bit kernel/userland?

I do have an old laptop that I can test with. I will try this tomorrow. I
don't actually intend to use the headset on my 64bit machine, but as it is my
desktop, it's what I use for testing. So if it works with a 32bit machine,
that will be just fine.


--
--John Gruenenfelder Research Assistant, Steward Observatory, U of Arizona
[email protected]
Try Weasel Reader for PalmOS -- http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
--Sam of Sam & Max


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-07-26 05:30:00

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Can't get btsco to connect to Plantronics M2500 headset

John,

You can force the pairing to be built again by removing
/etc/bluetooth/link_key

I've looked at your messages and I can't think of many other things. Do
you have other bluetooth devices you can try? Can you easily try it with
a 32-bit kernel/userland?

Brad

> * The first time I tried to use the headset in Linux, I encountered these same
> problems, but I *did* get it to work. I was even able to play and record
> audio. After a short time, btsco exited and I haven't gotten it to work
> again. :(
>
> * That first time, I also found an entry in the logs which I have never seen
> again:
> hcid[4365]: pin_code_request (sba=00:0C:41:E1:E2:F1, dba=00:03:89:6E:C9:11)
> This comes immediately after a link_key_request. I still see the
> link_key_request messages every time I I do any bluetooth commands, but I
> have not seen the pin_code_request line again. I don't know if that is
> significant.
>
> Please help!
>
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel