public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] link key PIN code authentication
@ 2007-12-20 10:46 Jason Zhan
  2007-12-20 15:13 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Zhan @ 2007-12-20 10:46 UTC (permalink / raw)
  To: Bluez-devel


[-- Attachment #1.1: Type: text/plain, Size: 961 bytes --]

Dear all,

Currently, I am working on a project to handle the pairing procedure. The
aim is quite simple.  If  the authentication is required by the user, the
program will detect whether the link key exists. If not, the program will
print out several lines in the terminal and ask the user entering the PIN
code.  The authentication will perform based on the PIN code which the user
provided and finally the new link key for this connection will be passed to
the host for future connections if the authentication is successful.

The bluez exploits the D-Bus to manage the pin code and link key. Since my
application is very simple, I don't think I need the D-Bus framework.

HCI can send the command to LM by hci_send_cmd() method, but I cannot find
the suitable methods which can read back the request from the LM.

Can anybody give me some expert level suggestions regarding the
authentication?

BTW, Happy Christmas to all bluez developers !

Regards,
Jason

[-- Attachment #1.2: Type: text/html, Size: 1064 bytes --]

[-- Attachment #2: Type: text/plain, Size: 308 bytes --]

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] link key PIN code authentication
  2007-12-20 10:46 [Bluez-devel] link key PIN code authentication Jason Zhan
@ 2007-12-20 15:13 ` Marcel Holtmann
  2007-12-21 16:42   ` Jason Zhan
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2007-12-20 15:13 UTC (permalink / raw)
  To: BlueZ development

Hi Jason,

> Currently, I am working on a project to handle the pairing procedure.
> The aim is quite simple.  If  the authentication is required by the
> user, the program will detect whether the link key exists. If not, the
> program will print out several lines in the terminal and ask the user
> entering the PIN code.  The authentication will perform based on the
> PIN code which the user provided and finally the new link key for this
> connection will be passed to the host for future connections if the
> authentication is successful. 
> 
> The bluez exploits the D-Bus to manage the pin code and link key.
> Since my application is very simple, I don't think I need the D-Bus
> framework. 

D-Bus is a really simple framework and not using D-Bus means you can
also not use hcid. Which means you have to duplicate all the effort
inside hcid. If you have that much free time, have fun. However you time
could be spent more useful ;)

> HCI can send the command to LM by hci_send_cmd() method, but I cannot
> find the suitable methods which can read back the request from the
> LM.  

You would have to open a raw HCI socket and read the HCI events. See the
Bluetooth specification for details. Please don't expect me to get into
details here. The hcid does all this and with the passkey agent
interface you have a nice framework to solve your problem. Use it.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] link key PIN code authentication
  2007-12-20 15:13 ` Marcel Holtmann
@ 2007-12-21 16:42   ` Jason Zhan
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Zhan @ 2007-12-21 16:42 UTC (permalink / raw)
  To: BlueZ development


[-- Attachment #1.1: Type: text/plain, Size: 2713 bytes --]

Hi, Marcel

Thank you for your kindly reply.

I am starting to look at the D-bus framework and passkey-agent.c in
utils/daemon/.

One question regarding the bluetooth applet, maybe it's a little bit stupid.
But I really I can't figure it out by myself.

In my program, I prefer the user enter the passkey from the terminal rather
than from the applet window. I afraid I need to disable the bluetooth
applet, since it always automatically jump out a window when it finds
devices requesting pass key.

The figure 1 presented in "Security interface" shows the applet was built
upon the D-bus. Do I need to do some changes on gnome/applet? Or just modify
the passkey agent.

Please give me some hints on how to disable the applet during the
authentication.

Many thanks and Merry Christmas,
Jason



On 20/12/2007, Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Jason,
>
> > Currently, I am working on a project to handle the pairing procedure.
> > The aim is quite simple.  If  the authentication is required by the
> > user, the program will detect whether the link key exists. If not, the
> > program will print out several lines in the terminal and ask the user
> > entering the PIN code.  The authentication will perform based on the
> > PIN code which the user provided and finally the new link key for this
> > connection will be passed to the host for future connections if the
> > authentication is successful.
> >
> > The bluez exploits the D-Bus to manage the pin code and link key.
> > Since my application is very simple, I don't think I need the D-Bus
> > framework.
>
> D-Bus is a really simple framework and not using D-Bus means you can
> also not use hcid. Which means you have to duplicate all the effort
> inside hcid. If you have that much free time, have fun. However you time
> could be spent more useful ;)
>
> > HCI can send the command to LM by hci_send_cmd() method, but I cannot
> > find the suitable methods which can read back the request from the
> > LM.
>
> You would have to open a raw HCI socket and read the HCI events. See the
> Bluetooth specification for details. Please don't expect me to get into
> details here. The hcid does all this and with the passkey agent
> interface you have a nice framework to solve your problem. Use it.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

[-- Attachment #1.2: Type: text/html, Size: 3408 bytes --]

[-- Attachment #2: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2007-12-21 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-20 10:46 [Bluez-devel] link key PIN code authentication Jason Zhan
2007-12-20 15:13 ` Marcel Holtmann
2007-12-21 16:42   ` Jason Zhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox