Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: "Daniel Örstadius" <daniel.orstadius@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Spurious authentication request?
Date: Tue, 28 Sep 2010 11:15:13 +0300	[thread overview]
Message-ID: <20100928081513.GA20800@jh-x301> (raw)
In-Reply-To: <AANLkTikrQ2fAHDZwMncOpNRadjm=tdobvDoas=v5eyxH@mail.gmail.com>

Hi Daniel,

On Mon, Sep 27, 2010, Daniel Örstadius wrote:
> Occasionally when pairing with a headset BlueZ issues what looks
> to be an unnecessary "Authentication Requested" after
> receiving "Auth Complete" and "Simple Pairing Complete".
> 
> 2010-09-22 11:23:45.282348 > HCI Event: Auth Complete (0x06) plen 3
>     status 0x00 handle 2
> 2010-09-22 11:23:45.282378 < HCI Command: Set Connection Encryption
> (0x01|0x0013) plen 3
>     handle 2 encrypt 0x01
> [..]
> 2010-09-22 11:23:45.363646 < HCI Command: Authentication Requested
> (0x01|0x0011) plen 2
>     handle 2
> 
> This request is coming from bonding_connect_cb and occurs if that
> callback happens to be executed before the function
> hcid_dbus_bonding_process_complete (triggered by the auth complete
> event). The order between those functions might have been affected
> by this patch
> 
> http://git.kernel.org/?p=bluetooth/bluez.git;a=commit;h=be35d00671519b8d92361c2caad9abeedda151f8
> 
> The request for authentication seems to be used for legacy pairing and
> should probably not be made for simple pairing. Also, it might be
> inconsistent that the kernel issues "Authentication Requested" for
> simple pairing, but bluetoothd does it for legacy?
> 
> I guess enclosing the call in a check for legacy pairing would
> work, if that information is or can be made available to
> bluetoothd.
> 
> Have I understood the situation correctly and if so, what would
> be a good way to fix this issue?

The reason why the extra authentication request is there is to deal with
old kernels that do not initiate authentication by themselves. So
checking for SSP vs legacy pairing wouldn't work.

Johan

  reply	other threads:[~2010-09-28  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27  7:52 Spurious authentication request? Daniel Örstadius
2010-09-28  8:15 ` Johan Hedberg [this message]
2010-09-29 14:39   ` Daniel Örstadius

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=20100928081513.GA20800@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=daniel.orstadius@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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