linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/4] Allow hexadecimal encoded pins
@ 2011-04-10 17:11 David Herrmann
  2011-04-10 17:11 ` [PATCH 1/4] Add length argument to hci pincode reply David Herrmann
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: David Herrmann @ 2011-04-10 17:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: johan.hedberg, hadess, dforsi, David Herrmann

This patch series adds support for hexadecimal encoded pins. This is
no final patch and I would be glad to get some feedback.

This patch series solves the problem that the current bluez implementation
does not allow binary PINs that contain ASCII \0 characters. This is needed
for several devices that take bluetooth addresses as PINs. I had the
following ideas to implement binary pins:

 - Hard coding binary pins into bluetoothd by detecting the device with
   PnP VID/PID information as suggested by Marcel Holtmann.
   However, this is not possible (as noted by Bastien Nocera) because
   devices may refuse to offer SDP information for unpaired hosts.
   Furthermore, SDP records are retrieved after pairing with the remote
   device unless they're cached.
 - Adding a new dbus agent interface that returns pins as byte-arrays
   instead of 0-terminated strings. However, this either breaks backward-
   compatibility or needs _huge_ additions to the dbus interface.
 - Adding escape-sequences to pins or special pin parsing. This does break
   backward-compatibility but may be implemented in a way that reduces
   problems to a minimum.

I implemented the first approach a week ago as discussed on the mailing list
which turned out to be not appropriate. The second approach is probably the
cleanest one but requires huge dbus API additions. This patch series
implements the third approach. See patch 3/4 for details on the suggested
PIN encoding.

Pin encoding with the dollar sign is just a temporary approach which makes
the implementation quite easy and shows the idea of this patch. However,
the encoding is of course open for discussion.


Binary pin support is inspired by getting Nintendo Wiimote pairing support.
To test wiimote pairing with this patch series, do the following:
 - assume the local bdaddr is: 01:23:45:67:89:ab
   and the wiimote bdaddr is: ba:98:76:54:32:10
 - Pairing with red-sync button, use pin: $ab8967452301 (host addr. backwards)
 - Pairing with 1+2 buttons, use pin: $1032547698ba (wiimote addr backwards)
Automatic reconnection is only enabled in the wiimote when synced with the
red-sync button. The 1+2 button method is only for temporary connections.


Regards
David

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

end of thread, other threads:[~2011-05-06  1:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 17:11 [RFC][PATCH 0/4] Allow hexadecimal encoded pins David Herrmann
2011-04-10 17:11 ` [PATCH 1/4] Add length argument to hci pincode reply David Herrmann
2011-05-05 17:34   ` Gustavo F. Padovan
2011-04-10 17:11 ` [PATCH 2/4] Make adapter API accept binary pincodes David Herrmann
2011-05-05 17:38   ` Gustavo F. Padovan
2011-04-10 17:11 ` [PATCH 3/4] Parse pin codes starting with '$' as hexadecimal encoded strings David Herrmann
2011-04-10 17:11 ` [PATCH 4/4] Remove 16 byte limit for PIN codes returned by agents David Herrmann
2011-05-02 23:32 ` [RFC][PATCH 0/4] Allow hexadecimal encoded pins Bastien Nocera
2011-05-03 11:51   ` David Herrmann
2011-05-03 12:27     ` Daniele Forsi
2011-05-03 18:28       ` David Herrmann
2011-05-06  1:37         ` Bastien Nocera

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).