2016-04-27 08:01:47

by François Beaufort

[permalink] [raw]
Subject: [PATCH BlueZ] Set RSSI_THRESHOLD to 2


This CL sets the RSSI_THRESHOLD value to 2 from it's original
value of 8. This is still useful for BR/EDR discovery when an
unfiltered scan is being done.

Source: https://chromium.googlesource.com/chromiumos/third_party/bluez/+/2a8288d4146a7b6f85687562ec6047564fd224a0

Francois Beaufort (1):
Set RSSI_THRESHOLD to 2

src/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.7.0



2016-04-28 06:59:57

by François Beaufort

[permalink] [raw]
Subject: Re: [PATCH BlueZ] Set RSSI_THRESHOLD to 2

I believe Chromium team uses a RSSI threshold as low as possible (2)
for two reasons:
- They were experimenting with RSSI for proximity.
- So that they can surface accurate values to JavaScript since Bluez
notifies Chrome right away when the RSSI changes

On Wed, Apr 27, 2016 at 10:47 AM, Luiz Augusto von Dentz
<[email protected]> wrote:
> Hi Francois,
>
> On Wed, Apr 27, 2016 at 11:01 AM, Francois Beaufort
> <[email protected]> wrote:
>> ---
>> src/device.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/device.c b/src/device.c
>> index 5269ee8..1caeee7 100644
>> --- a/src/device.c
>> +++ b/src/device.c
>> @@ -85,7 +85,7 @@
>> #define MIN(a, b) ((a) < (b) ? (a) : (b))
>> #endif
>>
>> -#define RSSI_THRESHOLD 8
>> +#define RSSI_THRESHOLD 2
>>
>> #define GATT_PRIM_SVC_UUID_STR "2800"
>> #define GATT_SND_SVC_UUID_STR "2801"
>> --
>> 2.7.0
>
> Do you guys have any numbers here? This will probably spam more the
> bus with the same device being notified more often, also some
> controllers may not sense that small variation on RSSI or employ some
> filter for duplicated values although HCI inquiry don't seem to
> support that.
>
> --
> Luiz Augusto von Dentz

2016-04-27 08:47:24

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ] Set RSSI_THRESHOLD to 2

Hi Francois,

On Wed, Apr 27, 2016 at 11:01 AM, Francois Beaufort
<[email protected]> wrote:
> ---
> src/device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/device.c b/src/device.c
> index 5269ee8..1caeee7 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -85,7 +85,7 @@
> #define MIN(a, b) ((a) < (b) ? (a) : (b))
> #endif
>
> -#define RSSI_THRESHOLD 8
> +#define RSSI_THRESHOLD 2
>
> #define GATT_PRIM_SVC_UUID_STR "2800"
> #define GATT_SND_SVC_UUID_STR "2801"
> --
> 2.7.0

Do you guys have any numbers here? This will probably spam more the
bus with the same device being notified more often, also some
controllers may not sense that small variation on RSSI or employ some
filter for duplicated values although HCI inquiry don't seem to
support that.

--
Luiz Augusto von Dentz

2016-04-27 08:01:48

by François Beaufort

[permalink] [raw]
Subject: [PATCH BlueZ] Set RSSI_THRESHOLD to 2

---
src/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index 5269ee8..1caeee7 100644
--- a/src/device.c
+++ b/src/device.c
@@ -85,7 +85,7 @@
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

-#define RSSI_THRESHOLD 8
+#define RSSI_THRESHOLD 2

#define GATT_PRIM_SVC_UUID_STR "2800"
#define GATT_SND_SVC_UUID_STR "2801"
--
2.7.0