linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Binary PIN Support
@ 2011-06-01 14:47 David Herrmann
  2011-06-01 15:32 ` Anderson Lizardo
  2011-06-02  1:08 ` Marcel Holtmann
  0 siblings, 2 replies; 8+ messages in thread
From: David Herrmann @ 2011-06-01 14:47 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: johan.hedberg, marcel, Gustavo F. Padovan

Hi

Since only half of my binary-PIN patches got applied upstream, I want to start
a new discussion about binary PIN support.

The thing is, the wiimote device (and as reported also some other
devices) requires
a BT-address (which may contain \0) as bluetooth pin. Current dbus
design forbids
strings containing \0 (used as string terminator) and so an agent cannot send
binary PINs to bluetoothd as return value of RequestPinCode().

The BT specs 3.0+ HS (Volume 3, Part C, 3.2.3 Bluetooth Passkey) say
the UI-input shall
be UTF-8 encoded and preferably use only the UFT-8 range 0x00-0x7F to
avoid multibyte
characters. There is also a recommendation for multi-byte characters.
Dbus uses utf-8 encoded strings so bluetoothd does not need to modify the
PIN, but current implementation restricts/violates the specs because
it disallows 0x00 as
valid PIN character.

Since the idea with hex-encoding binary PINs and prefixing them with
'$' did not get
accepted, I have some other ideas for this:

1: Use hard coded PINs for those devices. That is, use VID/PID
detection during pairing
and send hardcoded PIN (or based on src/dst address). Problem: VID/PID
information is
not available during pairing or may not be available, yet. Some
devices may even reject
SDP requests when not paired (as mentioned on IRC). Maybe someone has
an idea how to
get this working.

2: Extend DBus Agent API with a function RequestBinaryPinCode() which
works exactly
like RequestPinCode() but returns a bytearray (with length) instead of a string.
A dbus agent then needs to signal to bluetoothd that it provides this
method and bluetoothd
shall call RequestBinaryPinCode() instead of RequestPinCode().
However, I couldn't figure out a proper way to signal this capability
to bluetoothd.
The agent could send some kind of EnabledBinaryPinSupport-Signal to
bluetoothd...

3: Use some kind of encoding in the UTF-8 string as proposed with the
'$' character.
However, this might break old software.


Any comments or other ideas?

Regards
David

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-06-16 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 14:47 Binary PIN Support David Herrmann
2011-06-01 15:32 ` Anderson Lizardo
2011-06-01 20:06   ` Gustavo F. Padovan
2011-06-02  1:08 ` Marcel Holtmann
2011-06-08  1:36   ` Johan Hedberg
2011-06-08  5:08     ` Marcel Holtmann
2011-06-16 16:18     ` David Herrmann
2011-06-16 20:27       ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).