2010-02-08 17:34:23

by nirav rabara

[permalink] [raw]
Subject: Unable to get device name while discovery

Hi,

Most of the time I am unable to get device name while discovering for
new device.

I am using Dbus API to discover new devices, I am able to get the
signal DeviceFound() , using this signal I am able to get device
addresses, paired or not, connected or not, but some times its not
showing the name of the device.

Can anybody suggest me what should i do to get device name while
searching for the new devices.

( If the file names available at /var/lib/run/bluetooth/... then it's
shows device name , as per my understanding while searching its trying
to get device name from this "names " file , but if the file is not
available it won't show the device name. If the bluetooth dongle is
connection at first time then no "names" file will be available , so
how to get device name? )


--
With Regards,
Nirav Rabara


2010-02-09 07:48:30

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Unable to get device name while discovery

hi,

On Mon, Feb 8, 2010 at 7:34 PM, nirav rabara <[email protected]> wrote:
> Hi,
>
> Most of the time I am unable to get device name while discovering for
> new device.
>
> I am using Dbus API to discover new devices, I am able to get the
> signal DeviceFound() , using this signal I am able to get device
> addresses, paired or not, connected or not, but some times its not
> showing the name of the device.

It may take some time to resolve the name, specially if there are many
devices to resolve their names.

> Can anybody suggest me what should i do to get device name while
> searching for the new devices.

If you want to display the name you should probably wait until it is
resolved, a new DeviceFound will be emitted with the resolved name.

> ( If the file names available at /var/lib/run/bluetooth/... then it's
> shows device name , as per my understanding while searching its trying
> to get device name from this "names " file , but if the file is not
> available it won't show the device name. ?If the bluetooth dongle is
> connection at first time then no "names" file will be available , so
> how to get device name? )

The names file will be created if it doesn't exist, you just need to
keep the discovery session active to be able to resolve the devices
which may take some time, again once it is done you will receive a new
DeviceFound with the updated name.


--
Luiz Augusto von Dentz
Computer Engineer