All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] clearing remote name cache
@ 2007-03-27 10:00 Emanuele Novelli
  2007-03-27 10:32 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Emanuele Novelli @ 2007-03-27 10:00 UTC (permalink / raw)
  To: Bluez-users


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

Hi using the hints about reading remote names from various threads I got on
this ML time ago I started experiments with D-Bus API for bluez.

I tried to read a remotename in a thread called from another thread who does
inquiry.
Each time he found a bdaddress he ask for a name
(snipped code)

msg = dbus_message_new_method_call("org.bluez", "/org/bluez/hci0", "
org.bluez.Adapter", "GetRemoteName");
dbus_message_append_args(msg, DBUS_TYPE_STRING,
&bdaddress,DBUS_TYPE_INVALID);
reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err);
 if (reply == NULL) {
 printf("Error %s\n",err.message);

  }
 else {
 dbus_message_get_args(reply, NULL, DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID);
                PBLOG_INFO("%s\n", name);
}

all works well till I change the name of the remote device (a phone). Each
time I run the program I still get the old name, no matter how can try.
Only workaround I got to solve this is to manually invoke hcitool name
<bdaddress> to change the actual name in cache.


P.S.
I'm rather new to dbus, but everywhere I read advices about dont using the
low level api but use an high level bindings (G-lib, Java, python) but most
of examples I found in bluez source codes use low leve apis, so I guess is
correct using that or not ?

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

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

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

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

end of thread, other threads:[~2007-03-31 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 10:00 [Bluez-users] clearing remote name cache Emanuele Novelli
2007-03-27 10:32 ` Marcel Holtmann
2007-03-27 12:44   ` Emanuele Novelli
2007-03-31 14:00     ` Marcel Holtmann

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.