From: Scott James Remnant <scott@netsplit.com>
To: linux-bluetooth@vger.kernel.org
Cc: keybuk@chromium.org, marcel@holtmann.org, hadess@hadess.net,
Scott James Remnant <scott@netsplit.com>
Subject: [PATCHv3 0/4] Support bonding callsbacks and retrying bondings
Date: Thu, 5 Apr 2012 15:40:49 -0700 [thread overview]
Message-ID: <1333665653-30266-1-git-send-email-scott@netsplit.com> (raw)
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
next reply other threads:[~2012-04-05 22:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 22:40 Scott James Remnant [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333665653-30266-1-git-send-email-scott@netsplit.com \
--to=scott@netsplit.com \
--cc=hadess@hadess.net \
--cc=keybuk@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).