Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: btpin - setting blank passwords

On Sun, 27 Nov 2011, Nat Sloss wrote:

> < HCI Command: Authentication Requested (0x01|0x0011) plen 2
>     handle 42
> > HCI Event: Read Clock Offset Complete (0x1c) plen 5
>     status 0x00 handle 42 clkoffset 0x05bc
> > HCI Event: Command Status (0x0f) plen 4
>     Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> > HCI Event: Link Key Request (0x17) plen 6
>     bdaddr 00:43:54:48:30:00
> < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
>     bdaddr 00:43:54:48:30:00 key 0995D79EFA5A16A9586A0BCB8A1FC286

although you say that no PIN was required, we do request auth there (that
is the default, for HIDs), and we also supply a key.. so at some point in
your experimentation, the device *has* been paired successfully :)

> > ACL data: handle 42 flags 0x01 dlen 6
>     L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 28
>       MTU 48 QoS 0x01 (Best effort)

> < ACL data: handle 42 flags 0x02 dlen 16
>     L2CAP(s): Config rsp: scid 0x0051 flags 0x00 result 3 clen 2
>       Failure - unknown options
>       QoS 00

> I was able to remedy this by modifying l2cap_signal.c (I found this after many
> trial and error attempts.)
> Here is the patch:

I see. Your patch works Ok in that instance but would not work properly
for a device requesting "Guaranteed" QoS, because basically it just
ignores the QoS request, and since NetBSD does not support any QoS in
L2CAP we would need to respond that at least.

But, the default mode (no QoS requested) is the same as "Best effort" and
any specific values given (the hcidump program does not display them) are
considered optional, so I guess it would be fine to accept any such
setting. I will check the specification to see what must be done with
other possible requests and expand it a little.

(I think, that ultimately the L2CAP QoS settings were never really that
useful, and they were supplanted by the retransmission/flow control
option.. so receiving a "Guaranteed" QoS request is not likely to happen)


Home | Main Index | Thread Index | Old Index