linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@nokia.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Implementing the PIN helper support
Date: Mon, 20 Feb 2006 23:14:02 +0200	[thread overview]
Message-ID: <20060220211402.GA6466@localhost.localdomain> (raw)
In-Reply-To: <1140468298.7047.52.camel@localhost>

Hi Marcel,

On Mon, Feb 20, 2006, Marcel Holtmann wrote:
> we need to think about implementing the variable PIN helper support
> within the D-Bus API. What is the best way to implement such kind of
> communication?

I'll first describe a couple of typical usage scenarios when this
feature would be needed so others not involved in previous discussions
know what we are talking about: Currently the D-BUS pin helper works so
that when enabled hcid will call a PinRequest D-BUS method at a
hardcoded service and object path (org.bluez.PinAgent and
/org/bluez/PinAgent).

This works fine as long as there is only need for one generic pin
handler, e.g. a popup dialog. However, a piece of SW might want to
implement e.g. a "pairing wizard" and take over handling of pin requests
for a certain remote device for a short period of time. A SIM Access
Profile implementation might also want to override the default handler
with a GUI that automatically generates a 16 character PIN (which SIM
Access Profile requires).

A (somewhat simple) way to allow this kind of flexibility in PIN
requests could be e.g. to have two methods for registering PIN handlers:

1. For registering the "default" handle you could have
RegisterDefault(string object_path)
This would tell hcid (or bluetoothd) that the "object" at the path
object_path implements the org.bluez.PinAgent
interface and is ready to handle PIN requests. I havent listed the
service (or dbus name as it is called nowdays) in the arguments list
since that information could be picked directly from the method call
(using dbus_message_get_sender()). If we want to allow a service to
register a handler on behalf of another service, then this extra
parameter can of course be added.

2. For registering a "special" pin handler you could have e.g.
RegisterSpecial(string object_path, string bt_addr)
Same applies as for RegisterDefault, except that only PIN requests for
the device identified by bt_addr would be delegated to this handler. A
"unregister" method for this type of handler might not be necessary as
we can have e.g. a timer for removing it automatically if nothing hapens
for a while. The handler would naturally also be removed once pairing
has succeeded with the device that the handler was registered for or if
the service which registered the handler disappears from the bus.

So, if anyone has any thoughts about this feature, feel free to comment.

Johan


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-02-20 21:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-20 20:44 [Bluez-devel] Implementing the PIN helper support Marcel Holtmann
2006-02-20 21:14 ` Johan Hedberg [this message]
2006-02-20 21:31   ` Marcel Holtmann
2006-02-21  9:31     ` Johan Hedberg
2006-02-21 11:35       ` Marcel Holtmann
2006-02-21 12:21         ` Johan Hedberg
2006-02-21 12:56           ` Marcel Holtmann
2006-02-21 12:40         ` Claudio Takahasi
2006-02-21 13:02           ` Marcel Holtmann
2006-02-21 13:02           ` Johan Hedberg
2006-02-21 13:10             ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2006-02-20 20:48 Christopher E Piggott
2006-02-20 20:52 ` Marcel Holtmann

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=20060220211402.GA6466@localhost.localdomain \
    --to=johan.hedberg@nokia.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /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).