Skip to contentSkip to conversation

auto pairing between client & server

Bluez-users N. I. 4 participants 21 messages Apr 22, 2005 – Apr 27, 2005 Bluetooth drivers

lore
Share & tools
lore

N. I.

author
#0 lore raw

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

maintainer
#1 lore raw

Hi,

Quoted 6 lines

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.

Quoted 5 lines

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

#2 lore raw

El vie, 22-04-2005 a las 23:38 +0200, Marcel Holtmann escribi=F3:

Quoted 11 lines

Hi,
=20

Quoted 6 lines

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

Quoted 8 lines
Quoted 5 lines

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

Quoted 9 lines

=20
Regards
=20
Marcel
=20
=20
=20
=20
-------------------------------------------------------

Quoted 8 lines

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

author
#3 lore raw

Hi,

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

N.I

Quoted 8 lines · Fredy P

El vie, 22-04-2005 a las 23:38 +0200, Marcel Holtmann escribi=F3:

Quoted 7 lines

Hi,

Quoted 5 lines

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

Quoted 10 lines
Quoted 10 lines
Quoted 1 line

devices (knowing the BD_ADDR) inside my application?

there is no such thing than automatic pairing.

Quoted 5 lines

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.

Quoted 19 lines
Quoted 2 lines

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;

Quoted 11 lines

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users=

.

Quoted 6 lines
Quoted 6 lines

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

Quoted 11 lines

=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

author
#4 lore raw
In reply to Marcel Holtmann

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

Quoted 25 lines · Marcel Holtmann

Hi,
=20

Quoted 6 lines

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

Quoted 5 lines

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

Quoted 9 lines

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

maintainer
#5 lore raw

Hi,

Quoted 5 lines

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.

Quoted 3 lines

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

#6 lore raw
In reply to N. I.
Quoted 3 lines · N. I.

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?

Quoted 8 lines

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

Quoted 7 lines

Please help,

Thanks

N.I.

Quoted 11 lines

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

author
#7 lore raw

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

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

Quoted 11 lines · Marco Trudel
Quoted 3 lines · N. I.

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

Quoted 3 lines

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

Quoted 7 lines
Quoted 5 lines

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

Quoted 18 lines

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

Quoted 10 lines

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=

.

Quoted 8 lines
Quoted 8 lines

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

Quoted 11 lines

=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

#8 lore raw

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

you can keep "security auto".

regards
Marco

Quoted 71 lines · N. I.

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

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

Quoted 48 lines · Marco Trudel
Quoted 3 lines · N. I.

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?

Quoted 8 lines

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

Quoted 7 lines

Please help,

Thanks

N.I.

Quoted 11 lines

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

Quoted 10 lines

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

Quoted 11 lines

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

author
#9 lore raw

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.

Quoted 41 lines · Marco Trudel

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

Quoted 30 lines · N. I.

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

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

Quoted 20 lines · Marco Trudel
Quoted 3 lines · N. I.

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?

Quoted 8 lines

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

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

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

Quoted 2 lines

Please help,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

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.

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

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

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users=

.

Quoted 10 lines
Quoted 10 lines
Quoted 7 lines

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

Quoted 3 lines
Quoted 3 lines

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users=

.

Quoted 8 lines
Quoted 8 lines

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

Quoted 11 lines

=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

#10 lore raw
Quoted 6 lines · N. I.

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.

Quoted 3 lines

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

Quoted 6 lines

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

Quoted 118 lines

Any help please?

N.I.

Quoted 99 lines · Marco Trudel

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

you can keep "security auto".

regards
Marco

Quoted 75 lines · N. I.

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

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

Quoted 51 lines · Marco Trudel
Quoted 3 lines · N. I.

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?

Quoted 8 lines

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

Quoted 7 lines

Please help,

Thanks

N.I.

Quoted 11 lines

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

Quoted 10 lines

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

Quoted 11 lines

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

Quoted 10 lines

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

Quoted 11 lines

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

maintainer
#11 lore raw

Hi Marco,

Quoted 7 lines
Quoted 6 lines

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.

Quoted 5 lines

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

maintainer
#12 lore raw
In reply to N. I.

Hi,

Quoted 8 lines

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.

Quoted 6 lines

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

#13 lore raw
Quoted 27 lines · Marcel Holtmann

Hi,

Quoted 8 lines

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.

Quoted 6 lines

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.

Quoted 3 lines

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

maintainer
#14 lore raw

Hi Marco,

Quoted 8 lines
Quoted 3 lines

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

#15 lore raw
Quoted 2 lines

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

Quoted 22 lines · Marcel Holtmann

Hi Marco,

Quoted 7 lines
Quoted 3 lines

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

Quoted 11 lines

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

maintainer
#16 lore raw

Hi Marco,

Quoted 6 lines
Quoted 2 lines

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

author
#17 lore raw

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

#18 lore raw
In reply to Marcel Holtmann

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

Quoted 18 lines · Marcel Holtmann

Hi Marco,

Quoted 4 lines
Quoted 2 lines

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

Quoted 11 lines

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

maintainer
#19 lore raw

Hi Marco,

Quoted 1 line

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

we are talking about the same thing.

Quoted 8 lines

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

#20 lore raw

nice... thanks!

regards
Marco

Quoted 27 lines · Marcel Holtmann

Hi Marco,

Quoted 1 line

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

we are talking about the same thing.

Quoted 4 lines

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

Quoted 11 lines

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