linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help understanding Agent 'capabilities'.
@ 2011-10-13  5:55 NeilBrown
  2011-10-13  7:39 ` Luiz Augusto von Dentz
  2011-10-13  7:48 ` Johan Hedberg
  0 siblings, 2 replies; 6+ messages in thread
From: NeilBrown @ 2011-10-13  5:55 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]


Hi,
 I've been trying enhance my understanding of bluetooth and as part of that
 I have been experimenting with simple-agent to create pairing between two
 Linux hosts (a phone and a laptop as it happens).

 My understanding of Secure Simple Pairing is that there are a number of
 authentication mechanism and that the "best" would be chosen based on the
 that capabilities given to the agent.

 So if both devices tell the monitor "DisplayYesNo", it would not be able to
 do Passkey entry and would choose Numeric comparison.
 So both agents would get RequestConfirmation call backs.

 But I cannot make that happen.

 No matter what capability I give to simple-agent, one of them asks me for a
 pass key, then the other one does, and they have to match.  i.e. they both
 get RequestPinCode.
 So they seem to be assuming at least one device has a keyboard (the first
 could generate a number in the agent and display it I guess).

 Is there something else I have to change to force it to use Numeric
 comparison (or even 'just works') authentication?  Is this documented
 somewhere?

 I'm using 4.88 on one system and 4.96 on the other.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: Help understanding Agent 'capabilities'.
  2011-10-13  5:55 Help understanding Agent 'capabilities' NeilBrown
@ 2011-10-13  7:39 ` Luiz Augusto von Dentz
  2011-10-13 11:14   ` NeilBrown
  2011-10-13  7:48 ` Johan Hedberg
  1 sibling, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2011-10-13  7:39 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-bluetooth

Hi Neil,

On Thu, Oct 13, 2011 at 8:55 AM, NeilBrown <neilb@suse.de> wrote:
>
> Hi,
>  I've been trying enhance my understanding of bluetooth and as part of that
>  I have been experimenting with simple-agent to create pairing between two
>  Linux hosts (a phone and a laptop as it happens).
>
>  My understanding of Secure Simple Pairing is that there are a number of
>  authentication mechanism and that the "best" would be chosen based on the
>  that capabilities given to the agent.
>
>  So if both devices tell the monitor "DisplayYesNo", it would not be able to
>  do Passkey entry and would choose Numeric comparison.
>  So both agents would get RequestConfirmation call backs.
>
>  But I cannot make that happen.
>
>  No matter what capability I give to simple-agent, one of them asks me for a
>  pass key, then the other one does, and they have to match.  i.e. they both
>  get RequestPinCode.
>  So they seem to be assuming at least one device has a keyboard (the first
>  could generate a number in the agent and display it I guess).
>
>  Is there something else I have to change to force it to use Numeric
>  comparison (or even 'just works') authentication?  Is this documented
>  somewhere?
>
>  I'm using 4.88 on one system and 4.96 on the other.

For SSP you need both controllers to be >= 2.1, if you are seeing
pincode requests then probably one or both controller are using legacy
pairing.

-- 
Luiz Augusto von Dentz

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

* Re: Help understanding Agent 'capabilities'.
  2011-10-13  5:55 Help understanding Agent 'capabilities' NeilBrown
  2011-10-13  7:39 ` Luiz Augusto von Dentz
@ 2011-10-13  7:48 ` Johan Hedberg
  1 sibling, 0 replies; 6+ messages in thread
From: Johan Hedberg @ 2011-10-13  7:48 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-bluetooth

Hi Neil,

On Thu, Oct 13, 2011, NeilBrown wrote:
>  I've been trying enhance my understanding of bluetooth and as part of that
>  I have been experimenting with simple-agent to create pairing between two
>  Linux hosts (a phone and a laptop as it happens).
> 
>  My understanding of Secure Simple Pairing is that there are a number of
>  authentication mechanism and that the "best" would be chosen based on the
>  that capabilities given to the agent.
> 
>  So if both devices tell the monitor "DisplayYesNo", it would not be able to
>  do Passkey entry and would choose Numeric comparison.
>  So both agents would get RequestConfirmation call backs.
> 
>  But I cannot make that happen.
> 
>  No matter what capability I give to simple-agent, one of them asks me for a
>  pass key, then the other one does, and they have to match.  i.e. they both
>  get RequestPinCode.

If you get RequestPinCode it means that at least one of the devices
isn't capable of SSP, i.e. is a pre-2.1 Bluetooth controller. In such
cases the IO capability is irrelevant (as the concept doesn't exist for
2.0 and older devices).

Johan

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

* Re: Help understanding Agent 'capabilities'.
  2011-10-13  7:39 ` Luiz Augusto von Dentz
@ 2011-10-13 11:14   ` NeilBrown
  2011-10-13 11:28     ` Johan Hedberg
  0 siblings, 1 reply; 6+ messages in thread
From: NeilBrown @ 2011-10-13 11:14 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

On Thu, 13 Oct 2011 10:39:22 +0300 Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:

> Hi Neil,
> 
> On Thu, Oct 13, 2011 at 8:55 AM, NeilBrown <neilb@suse.de> wrote:
> >
> > Hi,
> >  I've been trying enhance my understanding of bluetooth and as part of that
> >  I have been experimenting with simple-agent to create pairing between two
> >  Linux hosts (a phone and a laptop as it happens).
> >
> >  My understanding of Secure Simple Pairing is that there are a number of
> >  authentication mechanism and that the "best" would be chosen based on the
> >  that capabilities given to the agent.
> >
> >  So if both devices tell the monitor "DisplayYesNo", it would not be able to
> >  do Passkey entry and would choose Numeric comparison.
> >  So both agents would get RequestConfirmation call backs.
> >
> >  But I cannot make that happen.
> >
> >  No matter what capability I give to simple-agent, one of them asks me for a
> >  pass key, then the other one does, and they have to match.  i.e. they both
> >  get RequestPinCode.
> >  So they seem to be assuming at least one device has a keyboard (the first
> >  could generate a number in the agent and display it I guess).
> >
> >  Is there something else I have to change to force it to use Numeric
> >  comparison (or even 'just works') authentication?  Is this documented
> >  somewhere?
> >
> >  I'm using 4.88 on one system and 4.96 on the other.
> 
> For SSP you need both controllers to be >= 2.1, if you are seeing
> pincode requests then probably one or both controller are using legacy
> pairing.
> 

Thanks.  That does explain it.

I knew about that but must have been confusing 'pass code' and 'pin code' in
my mind and so thought it didn't look like the legacy version.

What is the easiest way to find out what bluetooth version the controller is
using?  I tried looking around and didn't find anything obvious.
Or is the LegacyPairing property the best hint?

Thanks again (and to Johan).

NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: Help understanding Agent 'capabilities'.
  2011-10-13 11:14   ` NeilBrown
@ 2011-10-13 11:28     ` Johan Hedberg
  2011-10-16 21:27       ` NeilBrown
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Hedberg @ 2011-10-13 11:28 UTC (permalink / raw)
  To: NeilBrown; +Cc: Luiz Augusto von Dentz, linux-bluetooth

Hi Neil,

On Thu, Oct 13, 2011, NeilBrown wrote:
> What is the easiest way to find out what bluetooth version the controller is
> using?  I tried looking around and didn't find anything obvious.

E.g. the output of "hciconfig hci0 version" should show you this.

Johan

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

* Re: Help understanding Agent 'capabilities'.
  2011-10-13 11:28     ` Johan Hedberg
@ 2011-10-16 21:27       ` NeilBrown
  0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2011-10-16 21:27 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: Luiz Augusto von Dentz, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

On Thu, 13 Oct 2011 14:28:30 +0300 Johan Hedberg <johan.hedberg@gmail.com>
wrote:

> Hi Neil,
> 
> On Thu, Oct 13, 2011, NeilBrown wrote:
> > What is the easiest way to find out what bluetooth version the controller is
> > using?  I tried looking around and didn't find anything obvious.
> 
> E.g. the output of "hciconfig hci0 version" should show you this.
> 
> Johan

and so it does. 
One of the devices I was using is indeed 2.0. The other is 3.0

Thanks a lot.

NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

end of thread, other threads:[~2011-10-16 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13  5:55 Help understanding Agent 'capabilities' NeilBrown
2011-10-13  7:39 ` Luiz Augusto von Dentz
2011-10-13 11:14   ` NeilBrown
2011-10-13 11:28     ` Johan Hedberg
2011-10-16 21:27       ` NeilBrown
2011-10-13  7:48 ` Johan Hedberg

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