* [RFC BlueZ] core/device: Make filtered discovery able to detect beacons
@ 2016-05-27 11:18 Luiz Augusto von Dentz
2016-05-27 19:47 ` Vinicius Costa Gomes
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2016-05-27 11:18 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes it possible to use SetDiscoveryFilter to disable checking
discoverable flags making it possible to see beacons such as the ones
create by tools/eddystone that doesn't show on regular discovery sessions
since they are not discoverable/connectable.
---
This is an alternative to core/device: Fix checking flags for
non-connectable advertisements as it would not spam the UI trying to
configure new devices with beacons and improve the filtered discovery
to be more useful in regard of matching beacons.
doc/adapter-api.txt | 6 +++++-
src/adapter.c | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt
index 4dbf879..97462a3 100644
--- a/doc/adapter-api.txt
+++ b/doc/adapter-api.txt
@@ -80,7 +80,11 @@ Methods void StartDiscovery()
When discovery filter is set, Device objects will be
created as new devices with matching criteria are
- discovered. PropertiesChanged signals will be emitted
+ discovered regardless of they are connectable or
+ discoverable which enables listening to
+ non-connectable and non-discoverable devices.
+
+ PropertiesChanged signals will be emitted
for already existing Device objects, with updated RSSI
value. If one or more discovery filters have been set,
the RSSI delta-threshold, that is imposed by
diff --git a/src/adapter.c b/src/adapter.c
index f4fbf82..5499bfc 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -5451,7 +5451,7 @@ static void update_found_devices(struct btd_adapter *adapter,
memset(&eir_data, 0, sizeof(eir_data));
eir_parse(&eir_data, data, data_len);
- if (bdaddr_type == BDADDR_BREDR)
+ if (bdaddr_type == BDADDR_BREDR || adapter->filtered_discovery)
discoverable = true;
else
discoverable = eir_data.flags & (EIR_LIM_DISC | EIR_GEN_DISC);
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC BlueZ] core/device: Make filtered discovery able to detect beacons
2016-05-27 11:18 [RFC BlueZ] core/device: Make filtered discovery able to detect beacons Luiz Augusto von Dentz
@ 2016-05-27 19:47 ` Vinicius Costa Gomes
0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Costa Gomes @ 2016-05-27 19:47 UTC (permalink / raw)
To: Luiz Augusto von Dentz, linux-bluetooth
Hi Luiz,
Luiz Augusto von Dentz <luiz.dentz@gmail.com> writes:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This makes it possible to use SetDiscoveryFilter to disable checking
> discoverable flags making it possible to see beacons such as the ones
> create by tools/eddystone that doesn't show on regular discovery sessions
> since they are not discoverable/connectable.
> ---
> This is an alternative to core/device: Fix checking flags for
> non-connectable advertisements as it would not spam the UI trying to
> configure new devices with beacons and improve the filtered discovery
> to be more useful in regard of matching beacons.
>
I like this alternative better. I, too, dislike the idea of showing
non-connectable devices by default.
Cheers,
--
Vinicius
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-27 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27 11:18 [RFC BlueZ] core/device: Make filtered discovery able to detect beacons Luiz Augusto von Dentz
2016-05-27 19:47 ` Vinicius Costa Gomes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).