2005-04-22 20:06:57

by N. I.

[permalink] [raw]
Subject: [Bluez-users] auto pairing between client & server

I have a laptop which runs my application as server, and another
cellphone as client. Both of them communicate to each other using
Bluetooth (Bluez implementation).

What should I do in order to perform automatic pairing between these 2
devices (knowing the BD_ADDR) inside my application?

How can I detect if the pairing had been done between these
client-server devices inside my application? And from that, how to do
pairing using the "givepin" script?

I want to avoid the pop-ups window asking for entering the PIN.

Please help,

Thanks

N.I.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2005-04-27 08:54:42

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

nice... thanks!

regards
Marco

Marcel Holtmann wrote:
> Hi Marco,
>
>
>>I'm not sure if we talk about the same thing.
>
>
> we are talking about the same thing.
>
>
>>On outgoing connections, when encryption is demanded, the pin_helper,
>>specified in hcid.conf is called and the output has to be like "PIN:1234".
>>
>>If I wan't to use /etc/bluetooth/pin as this pin, I've to write a little
>>pin_helper that outputs this pin.
>>My question now is: is it with the bluez packages >= 2.16 possible to avoid
>>writing an own pin_helper? is hcid.conf configurable so that
>>/etc/bluetooth/pin is automatically used for outgoing connections?
>
>
> You need to enter them in /var/lib/bluetooth/*/pincodes where you can
> specify them like "<bdaddr> <pincode>" per line.
>
> A general /etc/bluetooth/pincodes is maybe coming in the next release.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-27 08:50:14

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi Marco,

> I'm not sure if we talk about the same thing.

we are talking about the same thing.

> On outgoing connections, when encryption is demanded, the pin_helper,
> specified in hcid.conf is called and the output has to be like "PIN:1234".
>
> If I wan't to use /etc/bluetooth/pin as this pin, I've to write a little
> pin_helper that outputs this pin.
> My question now is: is it with the bluez packages >= 2.16 possible to avoid
> writing an own pin_helper? is hcid.conf configurable so that
> /etc/bluetooth/pin is automatically used for outgoing connections?

You need to enter them in /var/lib/bluetooth/*/pincodes where you can
specify them like "<bdaddr> <pincode>" per line.

A general /etc/bluetooth/pincodes is maybe coming in the next release.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-27 08:44:41

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

I'm not sure if we talk about the same thing.
On outgoing connections, when encryption is demanded, the pin_helper,
specified in hcid.conf is called and the output has to be like "PIN:1234".

If I wan't to use /etc/bluetooth/pin as this pin, I've to write a little
pin_helper that outputs this pin.
My question now is: is it with the bluez packages >= 2.16 possible to avoid
writing an own pin_helper? is hcid.conf configurable so that
/etc/bluetooth/pin is automatically used for outgoing connections?

regards
Marco


Marcel Holtmann wrote:
> Hi Marco,
>
>
>> > the PIN helper is a program with specific parameters and it must return
>> > on standard output "PIN:1234" for example or "ERR".
>>
>>Yes, I know. But you wrote in that email that prior to 2.16 this was
>>needed. That let's me assume that now it's possible to use the pin file for
>>outgoing connections too.
>
>
> this is correct. With 2.16 you can create a pincodes file.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 22:31:37

by N. I.

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Thanks for replying to my message.

I'm not quite following the discussion about the pincode file.
Can you please put me in the context of using it?
And also I tol solve my problem with version 2.16?

N.I.


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 19:04:16

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi Marco,

> > the PIN helper is a program with specific parameters and it must return
> > on standard output "PIN:1234" for example or "ERR".
>
> Yes, I know. But you wrote in that email that prior to 2.16 this was
> needed. That let's me assume that now it's possible to use the pin file for
> outgoing connections too.

this is correct. With 2.16 you can create a pincodes file.

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 18:36:15

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

> the PIN helper is a program with specific parameters and it must return
> on standard output "PIN:1234" for example or "ERR".

Yes, I know. But you wrote in that email that prior to 2.16 this was
needed. That let's me assume that now it's possible to use the pin file for
outgoing connections too.
Or how did you mean that?


regards
Marco


Marcel Holtmann wrote:
> Hi Marco,
>
>
>>>If you wanna do that with the bluez-utils prior 2.16 you need to write
>>>your own PIN helper program. With 2.16 you can use a pincodes file for
>>>these task.
>>
>>If I understand you right, it's possible to replace the pinhelper so that
>>etc/bluetooth/pin is read for outgoing connections?
>>what's the configuration parameter?
>>pin_helper auto/file; ?
>
>
> the PIN helper is a program with specific parameters and it must return
> on standard output "PIN:1234" for example or "ERR".
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Tell us your software development plans!
> Take this survey and enter to win a one-year sub to SourceForge.net
> Plus IDC's 2005 look-ahead and a copy of this survey
> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 17:46:52

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi Marco,

> > If you wanna do that with the bluez-utils prior 2.16 you need to write
> > your own PIN helper program. With 2.16 you can use a pincodes file for
> > these task.
>
> If I understand you right, it's possible to replace the pinhelper so that
> etc/bluetooth/pin is read for outgoing connections?
> what's the configuration parameter?
> pin_helper auto/file; ?

the PIN helper is a program with specific parameters and it must return
on standard output "PIN:1234" for example or "ERR".

Regards

Marcel




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 17:37:43

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server



Marcel Holtmann wrote:
> Hi,
>
>
>>I ran a test with the new configuration and found out the bluetooth
>>devices which has this config modified accepted any device coming. The
>>pairing window is not poped up anymore, but the link_key is not
>>updated (still 0 byte).
>>
>>As my understanding, this config ignores the pairing and pin code. It
>>accepts all devices connecting to my device, no authentication. Is
>>that it?
>
>
> check the Bluetooth specification and understand the differences between
> the security modes. Use only security mode 3 if you really know what you
> are doing. Otherwise use the service level security features of L2CAP
> and RFCOMM.
>
>
>>What I want is to avoid the pin popup for certain bluetooth devices
>>(know specific BD_ADDR). When those allowed devices connect to my
>>device, then I will try to provide "silently" the PIN (no popups) and
>>the pairing should be done from there. If other device which BD_ADDR
>>does not belong to the list of addresses that my device has, it should
>>not be rejected.
>
>
> If you wanna do that with the bluez-utils prior 2.16 you need to write
> your own PIN helper program. With 2.16 you can use a pincodes file for
> these task.

If I understand you right, it's possible to replace the pinhelper so that
etc/bluetooth/pin is read for outgoing connections?
what's the configuration parameter?
pin_helper auto/file; ?

regards
Marco


-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 11:31:06

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi,

> I ran a test with the new configuration and found out the bluetooth
> devices which has this config modified accepted any device coming. The
> pairing window is not poped up anymore, but the link_key is not
> updated (still 0 byte).
>
> As my understanding, this config ignores the pairing and pin code. It
> accepts all devices connecting to my device, no authentication. Is
> that it?

check the Bluetooth specification and understand the differences between
the security modes. Use only security mode 3 if you really know what you
are doing. Otherwise use the service level security features of L2CAP
and RFCOMM.

> What I want is to avoid the pin popup for certain bluetooth devices
> (know specific BD_ADDR). When those allowed devices connect to my
> device, then I will try to provide "silently" the PIN (no popups) and
> the pairing should be done from there. If other device which BD_ADDR
> does not belong to the list of addresses that my device has, it should
> not be rejected.

If you wanna do that with the bluez-utils prior 2.16 you need to write
your own PIN helper program. With 2.16 you can use a pincodes file for
these task.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 13:39:20

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi Marco,

> > What I want is to avoid the pin popup for certain bluetooth devices
> > (know specific BD_ADDR). When those allowed devices connect to my
> > device, then I will try to provide "silently" the PIN (no popups) and
> > the pairing should be done from there. If other device which BD_ADDR
> > does not belong to the list of addresses that my device has, it should
> > not be rejected.
>
> I don't think this is possible because you don't know the remote BD_ADDR
> until the device has connected to your device. And if it has already
> connected, it's too late for bluteooth based autentication/encryption. So
> you might implement an own authentication/encryption algorithm for your
> purpose.

you already have an temporary underlaying ACL link, because otherwise it
is impossible to request the authentication and encryption. All pin code
and link key oriented events tell you the remote BD_ADDR. So this is
actually no problem to realize.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 10:44:31

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

N. I. wrote:
> Hi Marco,
>
> I ran a test with the new configuration and found out the bluetooth
> devices which has this config modified accepted any device coming. The
> pairing window is not poped up anymore, but the link_key is not
> updated (still 0 byte).

yes. because no link key is created.

> As my understanding, this config ignores the pairing and pin code. It
> accepts all devices connecting to my device, no authentication. Is
> that it?

yes. you can't use security mode 3 for what you're trying to reach. you
need security mode 2 (application based autentication/encryption).

> What I want is to avoid the pin popup for certain bluetooth devices
> (know specific BD_ADDR). When those allowed devices connect to my
> device, then I will try to provide "silently" the PIN (no popups) and
> the pairing should be done from there. If other device which BD_ADDR
> does not belong to the list of addresses that my device has, it should
> not be rejected.

I don't think this is possible because you don't know the remote BD_ADDR
until the device has connected to your device. And if it has already
connected, it's too late for bluteooth based autentication/encryption. So
you might implement an own authentication/encryption algorithm for your
purpose.
Please note that I'm not an expert. Maybee this works and I just don't know it.


regards
Marco

> Any help please?
>
> N.I.
>
> On 4/25/05, Marco Trudel <[email protected]> wrote:
>
>>change to security mode 1. that means to comment out:
>>#auth enable;
>>#encrypt enable;
>>
>>you can keep "security auto".
>>
>>regards
>>Marco
>>
>>
>>N. I. wrote:
>>
>>>In the hcid.conf file, I have:
>>>security auto;
>>>auth enable;
>>>
>>>Is that what you meant I should change to be off?
>>>
>>>
>>>
>>>On 4/23/05, Marco Trudel <[email protected]> wrote:
>>>
>>>
>>>>N. I. wrote:
>>>>
>>>>
>>>>>I have a laptop which runs my application as server, and another
>>>>>cellphone as client. Both of them communicate to each other using
>>>>>Bluetooth (Bluez implementation).
>>>>
>>>>do you really mean the mobile phone is using bluez?
>>>>what for a mobilephone is this?
>>>>
>>>>
>>>>
>>>>>What should I do in order to perform automatic pairing between these 2
>>>>>devices (knowing the BD_ADDR) inside my application?
>>>>>
>>>>>How can I detect if the pairing had been done between these
>>>>>client-server devices inside my application? And from that, how to do
>>>>>pairing using the "givepin" script?
>>>>>
>>>>>I want to avoid the pop-ups window asking for entering the PIN.
>>>>
>>>>disable authentication/encryption. you won't be asked for a pin because no
>>>>one is needed. you haven't to change the default bluez configuration to
>>>>reach this.
>>>>if you use java on your mobile phone, be shure to program the security
>>>>correctly.
>>>>
>>>>regards
>>>>Marco
>>>>
>>>>
>>>>
>>>>>Please help,
>>>>>
>>>>>Thanks
>>>>>
>>>>>N.I.
>>>>>
>>>>>
>>>>>-------------------------------------------------------
>>>>>SF email is sponsored by - The IT Product Guide
>>>>>Read honest & candid reviews on hundreds of IT Products from real users.
>>>>>Discover which products truly live up to the hype. Start reading now.
>>>>>http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
>>>>>_______________________________________________
>>>>>Bluez-users mailing list
>>>>>[email protected]
>>>>>https://lists.sourceforge.net/lists/listinfo/bluez-users
>>>>>
>>>>>
>>>>
>>>>-------------------------------------------------------
>>>>SF email is sponsored by - The IT Product Guide
>>>>Read honest & candid reviews on hundreds of IT Products from real users.
>>>>Discover which products truly live up to the hype. Start reading now.
>>>>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>>>>_______________________________________________
>>>>Bluez-users mailing list
>>>>[email protected]
>>>>https://lists.sourceforge.net/lists/listinfo/bluez-users
>>>>
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>SF email is sponsored by - The IT Product Guide
>>>Read honest & candid reviews on hundreds of IT Products from real users.
>>>Discover which products truly live up to the hype. Start reading now.
>>>http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
>>>_______________________________________________
>>>Bluez-users mailing list
>>>[email protected]
>>>https://lists.sourceforge.net/lists/listinfo/bluez-users
>>>
>>>
>>
>>-------------------------------------------------------
>>SF email is sponsored by - The IT Product Guide
>>Read honest & candid reviews on hundreds of IT Products from real users.
>>Discover which products truly live up to the hype. Start reading now.
>>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>>_______________________________________________
>>Bluez-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/bluez-users
>>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 11:28:40

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi,

> Thanks for replying. I'm using an old version of BlueZ stack, which
> link key file is a binary file. I know we have a new thread talking
> about changing this file to ascii. Since my product is already in
> development phase, I can't wait until the new BlueZ release coming out
> to use that feature.

actually there should be no problem to upgrade, because nobody
complained about any problems so far.

> Do you know any tool that can go and extract the content of the link
> key file from binary to readable format ascii? (That's how I should
> verify the pairing state in the link key file, right?)

With an easy answer, yes. If you have a link key, then you are paired.
However I don't know of any tool that extracted the binary link key file
format to an ASCII based version.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 10:02:50

by N. I.

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi Marco,

I ran a test with the new configuration and found out the bluetooth
devices which has this config modified accepted any device coming. The
pairing window is not poped up anymore, but the link_key is not
updated (still 0 byte).

As my understanding, this config ignores the pairing and pin code. It
accepts all devices connecting to my device, no authentication. Is
that it?

What I want is to avoid the pin popup for certain bluetooth devices
(know specific BD_ADDR). When those allowed devices connect to my
device, then I will try to provide "silently" the PIN (no popups) and
the pairing should be done from there. If other device which BD_ADDR
does not belong to the list of addresses that my device has, it should
not be rejected.

Any help please?

N.I.

On 4/25/05, Marco Trudel <[email protected]> wrote:
> change to security mode 1. that means to comment out:
> #auth enable;
> #encrypt enable;
>=20
> you can keep "security auto".
>=20
> regards
> Marco
>=20
>=20
> N. I. wrote:
> > In the hcid.conf file, I have:
> > security auto;
> > auth enable;
> >
> > Is that what you meant I should change to be off?
> >
> >
> >
> > On 4/23/05, Marco Trudel <[email protected]> wrote:
> >
> >>N. I. wrote:
> >>
> >>>I have a laptop which runs my application as server, and another
> >>>cellphone as client. Both of them communicate to each other using
> >>>Bluetooth (Bluez implementation).
> >>
> >>do you really mean the mobile phone is using bluez?
> >>what for a mobilephone is this?
> >>
> >>
> >>>What should I do in order to perform automatic pairing between these 2
> >>>devices (knowing the BD_ADDR) inside my application?
> >>>
> >>>How can I detect if the pairing had been done between these
> >>>client-server devices inside my application? And from that, how to do
> >>>pairing using the "givepin" script?
> >>>
> >>>I want to avoid the pop-ups window asking for entering the PIN.
> >>
> >>disable authentication/encryption. you won't be asked for a pin because=
no
> >>one is needed. you haven't to change the default bluez configuration to
> >>reach this.
> >>if you use java on your mobile phone, be shure to program the security
> >>correctly.
> >>
> >>regards
> >>Marco
> >>
> >>
> >>>Please help,
> >>>
> >>>Thanks
> >>>
> >>>N.I.
> >>>
> >>>
> >>>-------------------------------------------------------
> >>>SF email is sponsored by - The IT Product Guide
> >>>Read honest & candid reviews on hundreds of IT Products from real user=
s.
> >>>Discover which products truly live up to the hype. Start reading now.
> >>>http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick
> >>>_______________________________________________
> >>>Bluez-users mailing list
> >>>[email protected]
> >>>https://lists.sourceforge.net/lists/listinfo/bluez-users
> >>>
> >>>
> >>
> >>-------------------------------------------------------
> >>SF email is sponsored by - The IT Product Guide
> >>Read honest & candid reviews on hundreds of IT Products from real users=
.
> >>Discover which products truly live up to the hype. Start reading now.
> >>http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> >>_______________________________________________
> >>Bluez-users mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/bluez-users
> >>
> >
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users=
.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick
> > _______________________________________________
> > Bluez-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bluez-users
> >
> >
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-26 10:07:39

by N. I.

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

hi Marcel,
Thanks for replying. I'm using an old version of BlueZ stack, which
link key file is a binary file. I know we have a new thread talking
about changing this file to ascii. Since my product is already in
development phase, I can't wait until the new BlueZ release coming out
to use that feature.
Do you know any tool that can go and extract the content of the link
key file from binary to readable format ascii? (That's how I should
verify the pairing state in the link key file, right?)

N.I

On 4/22/05, Marcel Holtmann <[email protected]> wrote:
> Hi,
>=20
> > I have a laptop which runs my application as server, and another
> > cellphone as client. Both of them communicate to each other using
> > Bluetooth (Bluez implementation).
> >
> > What should I do in order to perform automatic pairing between these 2
> > devices (knowing the BD_ADDR) inside my application?
>=20
> there is no such thing than automatic pairing.
>=20
> > How can I detect if the pairing had been done between these
> > client-server devices inside my application? And from that, how to do
> > pairing using the "givepin" script?
> >
> > I want to avoid the pop-ups window asking for entering the PIN.
>=20
> Write your own PIN helper shell script that uses a fixed PIN. Check the
> link key file for the current state of the pairing.
>=20
> Regards
>=20
> Marcel
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-25 14:38:03

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

change to security mode 1. that means to comment out:
#auth enable;
#encrypt enable;

you can keep "security auto".

regards
Marco


N. I. wrote:
> In the hcid.conf file, I have:
> security auto;
> auth enable;
>
> Is that what you meant I should change to be off?
>
>
>
> On 4/23/05, Marco Trudel <[email protected]> wrote:
>
>>N. I. wrote:
>>
>>>I have a laptop which runs my application as server, and another
>>>cellphone as client. Both of them communicate to each other using
>>>Bluetooth (Bluez implementation).
>>
>>do you really mean the mobile phone is using bluez?
>>what for a mobilephone is this?
>>
>>
>>>What should I do in order to perform automatic pairing between these 2
>>>devices (knowing the BD_ADDR) inside my application?
>>>
>>>How can I detect if the pairing had been done between these
>>>client-server devices inside my application? And from that, how to do
>>>pairing using the "givepin" script?
>>>
>>>I want to avoid the pop-ups window asking for entering the PIN.
>>
>>disable authentication/encryption. you won't be asked for a pin because no
>>one is needed. you haven't to change the default bluez configuration to
>>reach this.
>>if you use java on your mobile phone, be shure to program the security
>>correctly.
>>
>>regards
>>Marco
>>
>>
>>>Please help,
>>>
>>>Thanks
>>>
>>>N.I.
>>>
>>>
>>>-------------------------------------------------------
>>>SF email is sponsored by - The IT Product Guide
>>>Read honest & candid reviews on hundreds of IT Products from real users.
>>>Discover which products truly live up to the hype. Start reading now.
>>>http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
>>>_______________________________________________
>>>Bluez-users mailing list
>>>[email protected]
>>>https://lists.sourceforge.net/lists/listinfo/bluez-users
>>>
>>>
>>
>>-------------------------------------------------------
>>SF email is sponsored by - The IT Product Guide
>>Read honest & candid reviews on hundreds of IT Products from real users.
>>Discover which products truly live up to the hype. Start reading now.
>>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>>_______________________________________________
>>Bluez-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/bluez-users
>>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-25 14:29:28

by N. I.

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

In the hcid.conf file, I have:
security auto;
auth enable;

Is that what you meant I should change to be off?



On 4/23/05, Marco Trudel <[email protected]> wrote:
> N. I. wrote:
> > I have a laptop which runs my application as server, and another
> > cellphone as client. Both of them communicate to each other using
> > Bluetooth (Bluez implementation).
>=20
> do you really mean the mobile phone is using bluez?
> what for a mobilephone is this?
>=20
> > What should I do in order to perform automatic pairing between these 2
> > devices (knowing the BD_ADDR) inside my application?
> >
> > How can I detect if the pairing had been done between these
> > client-server devices inside my application? And from that, how to do
> > pairing using the "givepin" script?
> >
> > I want to avoid the pop-ups window asking for entering the PIN.
>=20
> disable authentication/encryption. you won't be asked for a pin because n=
o
> one is needed. you haven't to change the default bluez configuration to
> reach this.
> if you use java on your mobile phone, be shure to program the security
> correctly.
>=20
> regards
> Marco
>=20
> > Please help,
> >
> > Thanks
> >
> > N.I.
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users=
.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick
> > _______________________________________________
> > Bluez-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bluez-users
> >
> >
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-25 14:26:33

by N. I.

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi,

I will try to incorporate this into my Java program.
Thanks

N.I

On 4/24/05, Fredy P <[email protected]> wrote:
> El vie, 22-04-2005 a las 23:38 +0200, Marcel Holtmann escribi=F3:
> > Hi,
> >
> > > I have a laptop which runs my application as server, and another
> > > cellphone as client. Both of them communicate to each other using
> > > Bluetooth (Bluez implementation).
> > >
> > > What should I do in order to perform automatic pairing between these =
2
> > > devices (knowing the BD_ADDR) inside my application?
> >
> > there is no such thing than automatic pairing.
> >
> > > How can I detect if the pairing had been done between these
> > > client-server devices inside my application? And from that, how to do
> > > pairing using the "givepin" script?
> > >
> > > I want to avoid the pop-ups window asking for entering the PIN.
> >
> > Write your own PIN helper shell script that uses a fixed PIN. Check the
> > link key file for the current state of the pairing.
> /usr/local/bin/bluez-localpin:
> #!/bin/sh
> echo "PIN":$(cat /etc/bluetooth/pin)
>=20
> and put in /etc/bluetooth/hcid.conf:
> pin_helper /usr/local/bin/bluez-localpin;
> >
> > Regards
> >
> > Marcel
> >
> >
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users=
.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> > _______________________________________________
> > Bluez-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bluez-users
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id=14396&opclick
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-24 16:17:54

by digitalfredy

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

El vie, 22-04-2005 a las 23:38 +0200, Marcel Holtmann escribi=F3:
> Hi,
>=20
> > I have a laptop which runs my application as server, and another
> > cellphone as client. Both of them communicate to each other using
> > Bluetooth (Bluez implementation).
> >=20
> > What should I do in order to perform automatic pairing between these 2
> > devices (knowing the BD_ADDR) inside my application?
>=20
> there is no such thing than automatic pairing.
>=20
> > How can I detect if the pairing had been done between these
> > client-server devices inside my application? And from that, how to do
> > pairing using the "givepin" script?
> >=20
> > I want to avoid the pop-ups window asking for entering the PIN.
>=20
> Write your own PIN helper shell script that uses a fixed PIN. Check the
> link key file for the current state of the pairing.
/usr/local/bin/bluez-localpin:
#!/bin/sh
echo "PIN":$(cat /etc/bluetooth/pin)

and put in /etc/bluetooth/hcid.conf:
pin_helper /usr/local/bin/bluez-localpin;=20
>=20
> Regards
>=20
> Marcel
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-23 21:31:41

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

N. I. wrote:
> I have a laptop which runs my application as server, and another
> cellphone as client. Both of them communicate to each other using
> Bluetooth (Bluez implementation).

do you really mean the mobile phone is using bluez?
what for a mobilephone is this?

> What should I do in order to perform automatic pairing between these 2
> devices (knowing the BD_ADDR) inside my application?
>
> How can I detect if the pairing had been done between these
> client-server devices inside my application? And from that, how to do
> pairing using the "givepin" script?
>
> I want to avoid the pop-ups window asking for entering the PIN.

disable authentication/encryption. you won't be asked for a pin because no
one is needed. you haven't to change the default bluez configuration to
reach this.
if you use java on your mobile phone, be shure to program the security
correctly.

regards
Marco

> Please help,
>
> Thanks
>
> N.I.
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-04-22 21:38:09

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] auto pairing between client & server

Hi,

> I have a laptop which runs my application as server, and another
> cellphone as client. Both of them communicate to each other using
> Bluetooth (Bluez implementation).
>
> What should I do in order to perform automatic pairing between these 2
> devices (knowing the BD_ADDR) inside my application?

there is no such thing than automatic pairing.

> How can I detect if the pairing had been done between these
> client-server devices inside my application? And from that, how to do
> pairing using the "givepin" script?
>
> I want to avoid the pop-ups window asking for entering the PIN.

Write your own PIN helper shell script that uses a fixed PIN. Check the
link key file for the current state of the pairing.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users