public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Claudio Takahasi" <cktakahasi@gmail.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Error: Authentication Failure
Date: Tue, 3 Oct 2006 13:54:11 -0300	[thread overview]
Message-ID: <e1effdeb0610030954o50ef2d6elf25e77e3a85737ac@mail.gmail.com> (raw)
In-Reply-To: <4521DCC4.6090705@vasmac.com>

On 10/3/06, Jose Vasconcellos <jose@vasmac.com> wrote:
> I've run into authentication problems doing the following:
>
> 1. Pair device (say headset) with USB Bluetooth dongle on Linux with Bluez.
> 2. Disconnect dongle and insert on Windows. Windows will ask for
>     the key.
> 3. Disconnect device from Windows and put back on Linux.
>     Linux is unable to connect to the device.
>
> Here's a trace for step 3:
>
> HCI sniffer - Bluetooth packet analyzer ver 1.32
> < HCI Command: Create Connection (0x01|0x0005) plen 13
>     bdaddr 00:14:CF:00:A7:76 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
>     Packet type: DM1 DM3 DM5 DH1 DH3 DH5
>  > HCI Event: Command Status (0x0f) plen 4
>     Create Connection (0x01|0x0005) status 0x00 ncmd 1
>  > HCI Event: Link Key Request (0x17) plen 6
>     bdaddr 00:14:CF:00:A7:76
> < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
>     bdaddr 00:14:CF:00:A7:76 key 3FECD3A6AB67EA063B3E78CCB155CBC1
>  > HCI Event: Command Complete (0x0e) plen 10
>     Link Key Request Reply (0x01|0x000b) ncmd 1
>     status 0x00 bdaddr 00:14:CF:00:A7:76
>  > HCI Event: Connect Complete (0x03) plen 11
>     status 0x05 handle 42 bdaddr 00:14:CF:00:A7:76 type ACL encrypt 0x00
>     Error: Authentication Failure
> < HCI Command: Create Connection (0x01|0x0005) plen 13
>     bdaddr 00:0C:55:06:CE:46 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
>     Packet type: DM1 DM3 DM5 DH1 DH3 DH5
>  > HCI Event: Command Status (0x0f) plen 4
>     Create Connection (0x01|0x0005) status 0x00 ncmd 1
>  > HCI Event: Link Key Request (0x17) plen 6
>     bdaddr 00:0C:55:06:CE:46
> < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
>     bdaddr 00:0C:55:06:CE:46 key 843E102AA026008F44FC7A2D5DDE0306
>  > HCI Event: Command Complete (0x0e) plen 10
>     Link Key Request Reply (0x01|0x000b) ncmd 1
>     status 0x00 bdaddr 00:0C:55:06:CE:46
>  > HCI Event: Connect Complete (0x03) plen 11
>     status 0x05 handle 42 bdaddr 00:0C:55:06:CE:46 type ACL encrypt 0x00
>     Error: Authentication Failure
>
> The problem is that hcid contains a cached key that is no longer valid.
> Once it gets the first authentication failure it should discard that
> and ask the user for a new pin (i.e. invoke the passkey agent) but it
> doesn't do that. I've tested with bluez-utils-3.7.
>
> Regards,
>
> Jose
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
Hi Jose,

Good catch! if there is an invalid cached key the client must call
RemoveBonding to remove the invalid entry. I will check with Marcel if
it is possible remove the key automatically on this situation without
insert a complex code. I am not sure, but I think some implementations
drop the connection automatically when the pairing fails. Consequently
ask a new PIN automatically will be more complex.

BR,
Claudio.
-- 
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-10-03 16:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03  3:45 [Bluez-devel] Error: Authentication Failure Jose Vasconcellos
2006-10-03 16:54 ` Claudio Takahasi [this message]
2006-10-03 17:48   ` Claudio Takahasi
2006-10-04  1:41     ` Jose Vasconcellos
2006-10-04  3:37       ` Mayank BATRA
2006-10-04  8:26       ` Marcel Holtmann
2006-10-04 12:13         ` Jose Vasconcellos

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=e1effdeb0610030954o50ef2d6elf25e77e3a85737ac@mail.gmail.com \
    --to=cktakahasi@gmail.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