Ever wondered how Android decides how many bars to show in the WLAN indicator? (Well, the “bars” are gone, but there’s still exactly the same number of levels) While going through Android source code I’ve found this:
>> WifiWatchdogStateMachine.java
* RSSI levels as used by notification icon
* Level 4 -55 <= RSSI
* Level 3 -66 <= RSSI < -55
* Level 2 -77 <= RSSI < -67
* Level 1 -88 <= RSSI < -78
* Level 0 RSSI < -88
>> WiFiManager.java
/** Anything worse than or equal to this will show 0 bars. */
private static final int MIN_RSSI = -100;/** Anything better than or equal to this will show the max bars. */
private static final int MAX_RSSI = -55;
So, now you know! Of course, vendors may change these values, but let’s hope they don’t! 🙂
Why is this important? This the basis of Android’s Poor Link Detection Watchdog – the thing that causes your WLAN clients to switch to another WLAN profile or to WWAN entirely when you least expect it. But I haven’t grok’d all the code yet. Stay tuned…
Leave a Reply