Hello,It seems that once a friendly name has been cached to /var/lib/bluetooth/*/names, RemoteNameUpdated signals contain this cached name forever, and user is never informed of a name change unless those "names" files are deleted.
It can be easily tested using the small python program attached. Just start it and play around with your device's friendly name, and with /var/lib/bluetooth/*/names (for example simply delete it).
So is there a way to get notified when a device's name has actually changed? Maybe I didn't wait long enough? According to the signal's name ("RemoteNameUpdated"), I would expect to be notified when the name actually change.
Best Regards, Pierre-Yves
#!/usr/bin/python import dbus import dbus.glib import gobject def rem_dev_name_signal(address, name): print 'Signal: RemoteNameUpdated(%s, %s)' % (address, name) def disc_completed_signal(): adapter.DiscoverDevices() bus = dbus.SystemBus(); bus.add_signal_receiver(rem_dev_name_signal, 'RemoteNameUpdated', 'org.bluez.Adapter', 'org.bluez', '/org/bluez/hci0') bus.add_signal_receiver(disc_completed_signal, 'DiscoveryCompleted', 'org.bluez.Adapter', 'org.bluez', '/org/bluez/hci0') obj = bus.get_object('org.bluez', '/org/bluez/hci0') adapter = dbus.Interface(obj, 'org.bluez.Adapter') adapter.DiscoverDevices() gobject.threads_init() dbus.glib.init_threads() main_loop = gobject.MainLoop() main_loop.run()
------------------------------------------------------------------------- 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
_______________________________________________ Bluez-devel mailing list Bluez-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/bluez-devel