ble: remove the duplicate events filter
So we get more chances of capturing the advertisement from the device if it is rather static.
This commit is contained in:
parent
380518d0c7
commit
3e5ef6c939
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue