All of lore.kernel.org
 help / color / mirror / Atom feed
* Right way of pairing?
@ 2009-11-28  5:52 nirav rabara
  2009-11-28 16:40 ` Pierre Ficheux
  0 siblings, 1 reply; 4+ messages in thread
From: nirav rabara @ 2009-11-28  5:52 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I am newbie to bluetooth world, For pairing I am connecting RFCOM
socket, I can show this connection on /org/bluez/789(pid of
process)/hci0 as dev_00_05_AD_EF_F8_A5 and linkkey information in
linkkeys file. but when I close this RFCOM socket (or when application
kills) all the information regarding the device pairing getting lost.

Is this the right way of pairing ??

I know that API has also available for device pairing, but I want to
use Dbus as less as possible due to the time take by dbus fucntions
calls and also I am not so comfortable with dbus API.

Can anybody suggest me the right way to pair devices?? Is it
compulsory to use DBUS API for pairing OR any other way without using
Dbus API

Your suggestion would be a great help for me.....

-- 
With Regards,
Nirav Rabara

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

* Re: Right way of pairing?
  2009-11-28  5:52 Right way of pairing? nirav rabara
@ 2009-11-28 16:40 ` Pierre Ficheux
  2009-11-30  4:30   ` nirav rabara
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Ficheux @ 2009-11-28 16:40 UTC (permalink / raw)
  To: linux-bluetooth

nirav rabara a écrit :
> Hi,
> 
> I am newbie to bluetooth world, For pairing I am connecting RFCOM
> socket, I can show this connection on /org/bluez/789(pid of
> process)/hci0 as dev_00_05_AD_EF_F8_A5 and linkkey information in
> linkkeys file. but when I close this RFCOM socket (or when application
> kills) all the information regarding the device pairing getting lost.
> 
> Is this the right way of pairing ??
> 
> I know that API has also available for device pairing, but I want to
> use Dbus as less as possible due to the time take by dbus fucntions
> calls and also I am not so comfortable with dbus API.
> 
> Can anybody suggest me the right way to pair devices?? Is it
> compulsory to use DBUS API for pairing OR any other way without using
> Dbus API
> 
> Your suggestion would be a great help for me.....
> 


You can use "simple-agent". It's a text based python script you can find
in the "test" directory of bluez sources.

Once your phone request for pairing, the original version of the script
allows you to input the PIN code. You can modify the script to send a
default PIN code value  such as 0000.

Works fine for me.

regards

-- 
Pierre FICHEUX -/- CTO OW/OS4I, France -\- pierre.ficheux@openwide.fr
                                         http://www.os4i.com
                                         http://www.ficheux.org
I would love to change the world, but they won't give me the source code



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

* Re: Right way of pairing?
  2009-11-28 16:40 ` Pierre Ficheux
@ 2009-11-30  4:30   ` nirav rabara
  2009-11-30  6:17     ` nirav rabara
  0 siblings, 1 reply; 4+ messages in thread
From: nirav rabara @ 2009-11-30  4:30 UTC (permalink / raw)
  To: Pierre Ficheux; +Cc: linux-bluetooth

Thanks Pierre for your suggestion.

I have one more question. If I open RFCOM socket connection, connect
with another device, then close that RFCOM socket, Will bluetoothd
remove all the pairing information from the linkkeys file or not.

Because When I close RFCOM connection pairing information is getting
lost, I would like to know weather it's a common or am I doing
something wrong??

Your suggestion would be a great help for me..

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

* Right way of pairing?
  2009-11-30  4:30   ` nirav rabara
@ 2009-11-30  6:17     ` nirav rabara
  0 siblings, 0 replies; 4+ messages in thread
From: nirav rabara @ 2009-11-30  6:17 UTC (permalink / raw)
  To: linux-bluetooth

I forgot to tell that, for headset device paring, I have hard coded
the pin code  "0000" in bluetoothd.

Now  If I open RFCOM socket connection, connect with another device,
then close that RFCOM socket, Will bluetoothd remove all the pairing
information from the linkkeys file or not.

Because When I close RFCOM connection pairing information is getting
lost, I would like to know weather it's a common or am I doing
something wrong??

Your suggestion would be a great help for me..



-- 
With Regards,
Nirav Rabara

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

end of thread, other threads:[~2009-11-30  6:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-28  5:52 Right way of pairing? nirav rabara
2009-11-28 16:40 ` Pierre Ficheux
2009-11-30  4:30   ` nirav rabara
2009-11-30  6:17     ` nirav rabara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.