Skip to content

Commit

Permalink
Fix roaming RSSI check
Browse files Browse the repository at this point in the history
We shouldn't be checking new AP against the roaming threshold,
it's sufficient if it's significantly better than our current AP.
As reported by the user"
```
Best AP is not much better (RSSI -85 vs -96)
```
We should defintiely hop over to -85 when we are at -96 currently.
  • Loading branch information
rojer committed Dec 5, 2021
1 parent 75d8017 commit 18c36a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mgos_wifi_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,7 @@ static void mgos_wifi_sta_run(int wifi_ev, void *ev_data, bool timeout) {
} else if (s_cur_entry != NULL && memcmp(s_cur_entry->bssid, ape->bssid,
sizeof(ape->bssid)) == 0) {
LOG(LL_INFO, ("Current AP is best AP"));
} else if (ape->rssi <= mgos_sys_config_get_wifi_sta_roam_rssi_thr() ||
(ape->rssi - MGOS_WIFI_STA_ROAM_RSSI_HYST) < cur_rssi) {
} else if (ape->rssi - MGOS_WIFI_STA_ROAM_RSSI_HYST < cur_rssi) {
LOG(LL_INFO, ("Best AP is not much better (RSSI %d vs %d)", ape->rssi,
cur_rssi));
} else {
Expand Down

0 comments on commit 18c36a1

Please sign in to comment.