2009-11-09 09:06:53

by nirav rabara

[permalink] [raw]
Subject: Pair device list query

Hi,

I am newbie to Bluez-bluetooth and using bluetooth v2.0 dongle with my
custom board.

I want to access this paired device list frequently and some time need
to delete any of the paired device of list.
According to my understanding bluetoothd will create folder (MAC
address as name), in that folder one file name linkkeys having the
detail of all the paired device address with link keys.
Is this the only way to get paired device list? OR Is there any
specific data structure in bluez stack code??

Or if somebody can guide me what should I read for above.

Thanks in advance.

--
With Regards,
Nirav Rabara


2009-11-09 09:27:15

by Johan Hedberg

[permalink] [raw]
Subject: Re: Pair device list query

Hi,

On Mon, Nov 09, 2009, nirav rabara wrote:
> I want to access this paired device list frequently and some time need
> to delete any of the paired device of list.
> According to my understanding bluetoothd will create folder (MAC
> address as name), in that folder one file name linkkeys having the
> detail of all the paired device address with link keys.
> Is this the only way to get paired device list? OR Is there any
> specific data structure in bluez stack code??
>
> Or if somebody can guide me what should I read for above.

You should use the BlueZ D-Bus API for getting this list. The API
reference can be found in doc/*-api.txt in the source tree. You could
also take a look at existing code that accesses the API. The programs
and scripts under the test subdirectory (e.g. test/list-devices) as well
as the gnome-bluetooth source code would be good places to start from.

Johan