Re: [PATCH 2/2] agent: allow agent to reply to RequestPinCode with bytes

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

 



On Mon, Jan 16, 2012 at 7:44 AM, David Herrmann
<dh.herrmann@xxxxxxxxxxxxxx> wrote:

> On Sat, Jan 14, 2012 at 9:34 PM, Scott James Remnant
> <keybuk@xxxxxxxxxxxx> wrote:
>> On Sat, Jan 14, 2012 at 8:41 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
>>
>>> > Since the specification allows the PIN to be a sequence of arbitrary
>>> > octets, and not a UTF-8 string, allow the userspace agent to reply
>>> > with such a sequence (as a D-Bus Array of Bytes).
>>> >
>>> > This means a userspace agent can deal with devices that require their
>>> > BD_ADDR (or the host's) as a PIN, and take care of trying multiple of
>>> > such requirements.
>>>
>>> this has been discussed before and the answer is a clear no to this.
>>>
>>
>> Why a no? I couldn't find the discussion in the archives.
>
> See here:
> http://thread.gmane.org/gmane.linux.bluez.kernel/13380
>

This thread doesn't give a rationale for why support for Binary PINs
couldn't be added to BlueZ, just an alternate implementation in the
case of the WiiMote.

>>> You can however write a plugin that can handle binary PIN codes.
>>>
>>
>> The problem there is that the plugin can only try one, and can't retry
>> the authentication if that PIN fails.
>
> Does your device provide proper PID/VID information? Then I see no
> need to try several different PINs. Could you provide more information
> with what kind of devices you are working here?
>

No, but the name of the device can be strcmp()d to identify it

But that's not the problem - the problem is that the PIN varies on the
device depending on the exact mode being paired - and that's not
something we can tell from the host.

We simply need to try one of three PINs, two of which are annoyingly
binary (they're the Bluetooth address of the device and the host
respectively)

It's kinda difficult to do this in a plugin since each authentication
request only gets one shot - it's easier (and far cleaner) in the
agent, which can outlive each connection attempt and be used for both,
keeping track of the PINs it's tried.

(Likewise the agent is already trying "0000" on devices, and dealing
with not presenting a PIN for keyboards, etc.)

Scott
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux