2009-10-28 11:55:46

by Germán Pedrosa

[permalink] [raw]
Subject: bluetooth-agent

Hi,

I am newbie with bluez and I'm developing a research project where I
need to use various Bluetooth USB-dongles.

I need to deploy an automatic bluetooth pairing by command line (it is a
project requirement), but the problem is that bluetooth-agent does only
listen to hci0 device (I mean, if in any case I need to pair with any
other dongle, bluetooth-agent does not reply).

Is there any possibility where bluetooth-agent could respond to the
other devices? The man page for bluetooth-agent is missing, and I have
not found any way to get it.

Thanks a lot and best regards.





2009-10-28 14:43:19

by Germán Pedrosa

[permalink] [raw]
Subject: Re: bluetooth-agent

Dear Claudio,

thanks for your quick answer.

But I'm not using BlueZ's API from a C program. We're using Java, so I'd
like to run bluetooh-agent directly from the shell. Is there any way to
handle requests for all dongles using the command line tool?

I tried using --path, but I didn't get any result. Probably because I'm
not sure how the mapping between bluetooth and unix devices work.

Thanks in advance.

Best,


El mié, 28-10-2009 a las 11:21 -0200, Claudio Takahasi escribió:
>
> Hi German,
>
> you can register the same bluetooth-agent to handle requests for all dongles.
>
> See simple-agent code under test directory, there is an example how to
> register agent.
> Basically you need to call:
> adapter0.RegisterAgent(path, "DisplayYesNo")
> adapter1.RegisterAgent(path, "DisplayYesNo")
> ...
>
> There isn't man pages for bluetooth-agent, see agent-api.txt under doc
> directory.
>
> Cheers,
> krau

On Wed, Oct 28, 2009 at 9:55 AM, Germán Pedrosa
> <[email protected]> wrote:
> > Hi,
> >
> > I am newbie with bluez and I'm developing a research project where I
> > need to use various Bluetooth USB-dongles.
> >
> > I need to deploy an automatic bluetooth pairing by command line (it is a
> > project requirement), but the problem is that bluetooth-agent does only
> > listen to hci0 device (I mean, if in any case I need to pair with any
> > other dongle, bluetooth-agent does not reply).
> >
> > Is there any possibility where bluetooth-agent could respond to the
> > other devices? The man page for bluetooth-agent is missing, and I have
> > not found any way to get it.
> >
> > Thanks a lot and best regards.
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
--
Germán Pedrosa <[email protected]>


2009-10-28 13:21:56

by Claudio Takahasi

[permalink] [raw]
Subject: Re: bluetooth-agent

On Wed, Oct 28, 2009 at 9:55 AM, Germán Pedrosa
<[email protected]> wrote:
> Hi,
>
> I am newbie with bluez and I'm developing a research project where I
> need to use various Bluetooth USB-dongles.
>
> I need to deploy an automatic bluetooth pairing by command line (it is a
> project requirement), but the problem is that bluetooth-agent does only
> listen to hci0 device (I mean, if in any case I need to pair with any
> other dongle, bluetooth-agent does not reply).
>
> Is there any possibility where bluetooth-agent could respond to the
> other devices? The man page for bluetooth-agent is missing, and I have
> not found any way to get it.
>
> Thanks a lot and best regards.
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Hi German,

you can register the same bluetooth-agent to handle requests for all dongles.

See simple-agent code under test directory, there is an example how to
register agent.
Basically you need to call:
adapter0.RegisterAgent(path, "DisplayYesNo")
adapter1.RegisterAgent(path, "DisplayYesNo")
...

There isn't man pages for bluetooth-agent, see agent-api.txt under doc
directory.

Cheers,
krau