Hi,
recently I was changing my work machine. When I wanted to do my usual
setup (hacked up test-network script) to connect to the internet via my
mobile phone, I got "bnep error".
It is this piese of code in network/connection.c:
270 if (rsp->ctrl != BNEP_SETUP_CONN_RSP)
271 return TRUE;
272
273 r = ntohs(rsp->resp);
274
275 if (r != BNEP_SUCCESS) {
276 error("bnep failed");
277 goto failed;
278 }
I then found out that it did work with some dongles, and it did not
work with others. Apparently there was no connection to the "quality"
of the dongles (but I have to admit, that AFAIR all were broadcom or
worse), there was a very cheap one that did work and more expensive
ones that didn't.
I always thought that the "supported profiles" list on the packaging
was just a "what we licensed in the driver" list and that all hardware
could do everything.
Am I wrong?
Thanks,
Stefan
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
On Fri, 18 Sep 2009 12:07:55 +0200
Stefan Seyfried <[email protected]> wrote:
> Will do so, too, if I can make it fail again.
Was pretty easy ;), with an el-cheapo dongle:
strolchi:~ # hciconfig -a
hci0: Type: USB
BD Address: 00:02:72:C3:4C:58 ACL MTU: 377:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:7145 acl:43 sco:0 events:179 errors:0
TX bytes:1390 acl:35 sco:0 commands:108 errors:0
Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy:
Link mode: SLAVE ACCEPT
Name: 'Broadcom BCM2035'
Class: 0x4a010c
Service Classes: Networking, Capturing, Telephony
Device Class: Computer, Laptop
HCI Ver: 1.2 (0x2) HCI Rev: 0xa LMP Ver: 1.2 (0x2) LMP Subver: 0x309
Manufacturer: Broadcom Corporation (15)
I attached bluetoothd.log (bluetoothd -nd) and hcidump.log
(hcidump -XVt) because of their size.
JFTR: it works fine with the built-in adapter:
strolchi:~ # hciconfig -a
hci0: Type: USB
BD Address: 00:16:41:25:5F:C3 ACL MTU: 1017:8 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:2597 acl:19 sco:0 events:50 errors:0
TX bytes:2016 acl:18 sco:0 commands:32 errors:0
Features: 0xff 0xff 0x8d 0xfe 0x9b 0xf9 0x00 0x80
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'strolchi-builtin'
Class: 0x4a010c
Service Classes: Networking, Capturing, Telephony
Device Class: Computer, Laptop
HCI Ver: 2.0 (0x3) HCI Rev: 0x204a LMP Ver: 2.0 (0x3) LMP Subver: 0x4127
Manufacturer: Broadcom Corporation (15)
The ACL MTU is bigger on the built in dongle, but I am quite sure that
I did not set anything, it's all plain plug-and-play.
lsusb shows the following for the two dongles:
Bus 002 Device 004: ID 0a5c:200a Broadcom Corp. Bluetooth dongle
Bus 004 Device 019: ID 03f0:171d Hewlett-Packard Wireless (Bluetooth + WLAN) Interface [Integrated Module]
The HP is the one that works.
Thanks,
seife
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
On Wed, 16 Sep 2009 15:48:11 -0300
Luiz Augusto von Dentz <[email protected]> wrote:
> Hi Stefan,
>
> On Wed, Sep 16, 2009 at 1:19 PM, Stefan Seyfried
> <[email protected]> wrote:
> > Hi,
> >
> > recently I was changing my work machine. When I wanted to do my
> > usual setup (hacked up test-network script) to connect to the
> > internet via my mobile phone, I got "bnep error".
> >
> > It is this piese of code in network/connection.c:
> >
> > 270 if (rsp->ctrl != BNEP_SETUP_CONN_RSP)
> > 271 return TRUE;
> > 272
> > 273 r = ntohs(rsp->resp);
> > 274
> > 275 if (r != BNEP_SUCCESS) {
> > 276 error("bnep failed");
> > 277 goto failed;
> > 278 }
>
> Weird, are you sure that it is failing in one of those checks? It
Yes, it is exactly "bnep failed" and this is the only occurence of this
string in the code ;)
> never happened to me before, you just switch dongle, right?
Yes. The builtin dongle on my new (old ;) machine did not work, so I
started to investigate. I tried various external dongles, some worked,
others didn't. All with the same setup (I'm not 100% sure if I did pair
the phone in advance or if I waited for the bnep-connect to request
pairing, but I am pretty sure that I did it the same with all dongles).
Finally I exchanged the internal module (it's an HP machine, the
modules all have the same form factor, and I found another one which
did work).
> Make sure you did paired with device before attempting to connect, you
> can also mark it as trusted so it does ask for confirmation, if it
> still fail could you please send us the hcidump and bluetooth output?
I'll check if I still have a dongle that fails, and if so, I'll debug
it.
I was just not sure if there was hardware / firmware involved, so
wanted to check that first ;)
> Nope, you are correct, the hardware should not affect much the
> profiles, of course profiles depending on things like SCO may be
> affected by the hardware but that's it. IIRC the only special
> requirement for BNEP is that the MTU should be configured to 1691.
> (this is easy to check with hcidump)
Will do so, too, if I can make it fail again.
Thanks,
seife
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
Hi Stefan,
On Wed, Sep 16, 2009 at 1:19 PM, Stefan Seyfried
<[email protected]> wrote:
> Hi,
>
> recently I was changing my work machine. When I wanted to do my usual
> setup (hacked up test-network script) to connect to the internet via my
> mobile phone, I got "bnep error".
>
> It is this piese of code in network/connection.c:
>
> 270 ? ? ? ? if (rsp->ctrl != BNEP_SETUP_CONN_RSP)
> 271 ? ? ? ? ? ? ? ? return TRUE;
> 272
> 273 ? ? ? ? r = ntohs(rsp->resp);
> 274
> 275 ? ? ? ? if (r != BNEP_SUCCESS) {
> 276 ? ? ? ? ? ? ? ? error("bnep failed");
> 277 ? ? ? ? ? ? ? ? goto failed;
> 278 ? ? ? ? }
Weird, are you sure that it is failing in one of those checks? It
never happened to me before, you just switch dongle, right?
> I then found out that it did work with some dongles, and it did not
> work with others. Apparently there was no connection to the "quality"
> of the dongles (but I have to admit, that AFAIR all were broadcom or
> worse), there was a very cheap one that did work and more expensive
> ones that didn't.
Make sure you did paired with device before attempting to connect, you
can also mark it as trusted so it does ask for confirmation, if it
still fail could you please send us the hcidump and bluetooth output?
> I always thought that the "supported profiles" list on the packaging
> was just a "what we licensed in the driver" list and that all hardware
> could do everything.
>
> Am I wrong?
Nope, you are correct, the hardware should not affect much the
profiles, of course profiles depending on things like SCO may be
affected by the hardware but that's it. IIRC the only special
requirement for BNEP is that the MTU should be configured to 1691.
(this is easy to check with hcidump)
--
Luiz Augusto von Dentz
Engenheiro de Computa??o