2008-08-03 23:39:59

by Chris Rankin

[permalink] [raw]
Subject: Cannot pair A2DP speakers with Belkin Bluetooth adapter

[No, I am *not* having any device conflict with the pegasus driver.]

Hi,

I have a Belkin bluetooth adapter model F8T012xx1, IDs 0x050d:0x0121

http://catalog.belkin.com/IWCatProductPage.process?Product_Id=273100

and I cannot pair it with a set of bluetooth A2DP speakers. These same speakers work fine with my laptop, which has an internal bluetooth device 0x0a5c:0x2110. But whenever I try to pair the Belkin device using the commands

$ hcitool cc <bdaddr>
$ hcitool auth <bdaddr>

then the connection drops after only a few seconds and the pairing fails. To date, I have only been able to pair this adapter with my Nokia mobile phone, after which I have been able to browse the phone's filesystem successfully.

The adapter's device descriptor is:

T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=050d ProdID=0121 Rev= 4.13
S: Manufacturer=Broadcom Corp
S: Product=BELKIN BLUETOOTH USB ADAPTER CL. 1
S: SerialNumber=000A3A7DFF80
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
I:* If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)

Can anyone suggest anything to try in order to keep the BT connection up, please? I have already tried adding the flags HCI_RESET | HCI_WRONG_SCO_MTU without any effect.

Thanks for any help here,
Cheers,
Chris



__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html


2008-08-04 08:47:11

by Johan Hedberg

[permalink] [raw]
Subject: Re: Cannot pair A2DP speakers with Belkin Bluetooth adapter

Hi,

On Aug 4, 2008, at 2:39, Chris Rankin wrote:
> and I cannot pair it with a set of bluetooth A2DP speakers. These
> same speakers work fine with my laptop, which has an internal
> bluetooth device 0x0a5c:0x2110. But whenever I try to pair the
> Belkin device using the commands
>
> $ hcitool cc <bdaddr>
> $ hcitool auth <bdaddr>
>
> then the connection drops after only a few seconds and the pairing
> fails.

For those two low-level test commands the behavior you describe is
perfectly normal and expected. However, they certainly aren't a proper
way to initiate pairing. Where did you get the idea that this is the
right way to do pairing? If it was in some BlueZ documentation we
should fix it ASAP. You might want to check the bluez wiki for some
ways to perform pairing (hint: search for "CreateBonding"):
http://wiki.bluez.org/wiki/HOWTO/Bonding

> Can anyone suggest anything to try in order to keep the BT
> connection up, please? I have already tried adding the flags
> HCI_RESET | HCI_WRONG_SCO_MTU without any effect.

This is not specific in any way to your adapter. You would have gotten
the same behavior with any other adapter as well.

Johan

2008-09-25 20:50:48

by Chris Rankin

[permalink] [raw]
Subject: Re: Cannot pair A2DP speakers with Belkin Bluetooth adapter

> For those two low-level test commands the behavior you describe is
> perfectly normal and expected. However, they certainly aren't a proper
> way to initiate pairing. Where did you get the idea that this is the
> right way to do pairing? If it was in some BlueZ documentation we
> should fix it ASAP. You might want to check the bluez wiki for some
> ways to perform pairing (hint: search for "CreateBonding"):
> http://wiki.bluez.org/wiki/HOWTO/Bonding

Johan,

Sorry for the long delay in responding; I've only just found your reply.

As to my approach to pairing, I was driven to such extremes by a lack of working alternatives :-). Pairing the speakers with the laptop was easy - I was prompted for a PIN code, entered it, and all was well. However, when I tried to do the same for the desktop, the PIN-entry dialog box would always vanish before I could type more than the first digit! As a result, I resorted to lower- and lower-level techniques to find out what on Earth was going wrong.

I actually cracked the problem *only this morning*, having discovered hcidump last night! (This is a problem that's been on the back-burner for a while...) What appears to have been happening is that the speakers only allow devices to bond with them for a few minutes after the speakers are switched on. (This isn't made at all clear in the manual.) If you try to pair after that then the speakers ignore you and just drop the connection. More significantly, they don't even keep the connection alive long enough to respond to (i.e. reject) an outstanding attempt to send a PIN. What I eventually did was the following:

* Run hcidump -V in one window
* Run l2ping <bdaddr> in another window to open a connection and *keep* it open.
* Run hciconfig auth <bdaddr> in a third window.

And no, this didn't work either. But it did at least allow the speakers *refusal* to bond to appear in the dump output :-). Once it became clear that a) the speakers did possess a "pairing mode", and b) that the speakers weren't *in* "pairing mode" then bonding them to the adapter became easy.

As to the Linux Bluetooth documentation, it appears that BT support has evolved rapidly and significantly over the past year or two, and Google has a looong memory. Much of the advice I was digging up seemed out-of-date. Also, it all expected bonding to Just Work, and none of the errors I was seeing gave any indication of what the underlying problem actually was. For example, I think ALSA's error from aplay was about a GET CAPABILITIES call failing. Similarly, a Connect() call from Python just gave an I/O error.

Anyway - it all works NOW :-).

Thanks,
Chris