Update signal strength indicator thresholds

These are thresholds for RSSI so nothing is expected to be
greater than 0.
This will allow to have a better granularity (even if with some
modem, we are limited in the number of thresholds configured)

These new thresholds will give the following signal quality range:
  - 11% for -110 dBm
  - 30% for  -94 dBm
  - 50% for  -82 dBm
  - 70% for  -69 dBm
  - 90% for  -57 dBm

We are expecting to receive indication sreport every time the
signal strength crosses one of the configured thresholds.

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
Frederic Martinsons
2021-10-02 07:38:04 +02:00
parent 90ea3ef5db
commit ea7517f0e5

View File

@@ -5063,8 +5063,15 @@ common_enable_disable_unsolicited_events_signal_strength (GTask *task)
g_autoptr(GArray) thresholds = NULL; g_autoptr(GArray) thresholds = NULL;
/* The device doesn't really like to have many threshold values, so don't /* The device doesn't really like to have many threshold values, so don't
* grow this array without checking first */ * grow this array without checking first
static const gint8 thresholds_data[] = { -80, -40, 0, 40, 80 }; * The values are chosen towards their results through STRENGTH_TO_QUALITY
* -106 dBm gives 11%
* -94 dBm gives 30%
* -82 dBm gives 50%
* -69 dBm gives 70%
* -57 dBm gives 90%
*/
static const gint8 thresholds_data[] = { -106, -94, -82, -69, -57 };
ctx = g_task_get_task_data (task); ctx = g_task_get_task_data (task);