ble: remove the duplicate events filter

So we get more chances of capturing the advertisement from the device
if it is rather static.
pull/14/head
Benjamin Tissoires 2018-01-19 16:47:09 +01:00 committed by Peter Hutterer
parent 380518d0c7
commit 3e5ef6c939
1 changed files with 6 additions and 0 deletions

View File

@ -325,6 +325,9 @@ class BlueZDeviceManager(GObject.Object):
if i is None:
continue
# remove the duplicate data filter so we get notifications as they come in
i.SetDiscoveryFilter('(a{sv})', {'DuplicateData': GLib.Variant.new_boolean(False)})
objpath = obj.get_object_path()
try:
i.StartDiscovery()
@ -364,6 +367,9 @@ class BlueZDeviceManager(GObject.Object):
except GLib.Error as e:
logger.debug('{}: Failed to stop discovery ({})'.format(objpath, e))
# reset the discovery filters
i.SetDiscoveryFilter('(a{sv})', {})
self.emit("discovery-stopped")
def _on_device_updated(self, device):