linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/4] Support bonding callsbacks and retrying bondings
@ 2012-04-05 22:40 Scott James Remnant
  2012-04-05 22:40 ` [PATCHv3 1/4] Add support for retrying a bonding Scott James Remnant
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Scott James Remnant @ 2012-04-05 22:40 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: keybuk, marcel, hadess, Scott James Remnant

Rationale: in many pairing scenarios, it's desirable to be automatically
provide a PIN (either generated or fixed) for a device and only involve
the user if that PIN is rejected by the host.

Both GNOME Bluetooth and Android handle this inside their Agent which
means each deployment has to implement its own code to do the same
thing. These patches allow this behavior to be common by moving it into
BlueZ.

This patch set adds plugin support for a callback called when bonding
of a device successfully completes, fails, or is cancelled. In the
success and failure cases, the callback may return TRUE to cause the
bonding to be retried after a short backoff period.

Backoff drops the ACL connection and reopens again later, this is not
only cleaner to implement in the bluetoothd code itself, but matches
the behavior of both Android (which implements this in its Agent) and
OS X, so is more likely to be compatible with devices out there even
though we could theoretically hold the ACL link open.

btsnoop of OS X performing PIN generation and falling back to PIN can
be seen here: 

http://chromium-os.googlecode.com/issues/attachment?aid=280220006001&
 name=BT+Motorola+Wireless+Keyboard.cfa&
 token=SA_vDEsF87_CU-BcqJ1C8bWd6Zk%3A1333665473760

Scott James Remnant (4):
  Add support for retrying a bonding
  plugin: Add bonding callback support for plugins
  bonding: retry if callback returns TRUE
  bonding: call plugin callback on cancellation

 src/adapter.c |    2 +-
 src/device.c  |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/device.h  |    9 ++++++
 3 files changed, 99 insertions(+), 1 deletions(-)

-- 
1.7.7.3


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

end of thread, other threads:[~2012-04-12 11:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 22:40 [PATCHv3 0/4] Support bonding callsbacks and retrying bondings Scott James Remnant
2012-04-05 22:40 ` [PATCHv3 1/4] Add support for retrying a bonding Scott James Remnant
2012-04-05 22:40 ` [PATCHv3 2/4] plugin: Add bonding callback support for plugins Scott James Remnant
2012-04-05 22:54   ` Vinicius Costa Gomes
2012-04-06 19:37     ` Scott James Remnant
2012-04-06 19:37     ` [PATCHv3 2/4v2] bonding: retry if callback returns TRUE Scott James Remnant
2012-04-12 11:28       ` Johan Hedberg
2012-04-05 22:40 ` [PATCHv3 3/4] " Scott James Remnant
2012-04-05 22:40 ` [PATCHv3 4/4] bonding: call plugin callback on cancellation Scott James Remnant

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