2

What is stock RSSI range for the WiFi indicator icon in notification bar?

Example ranges:

  • 0 bars   -100 to -70
  • 1 bar     -70 to -55
  • 2 bars   -55  to -45
  • 3 bars   -45  to -35
  • 4 bars   -45  to -35
3

I didn't look back through older versions, but here's information accurate as of Android 7.1.2.

The code that performs the transformation from RSSI to signal "level" is found in the WifiManager.calculateSignalLevel method:

public static int calculateSignalLevel(int rssi, int numLevels) {
    if (rssi <= MIN_RSSI) {
        return 0;
    } else if (rssi >= MAX_RSSI) {
        return numLevels - 1;
    } else {
        float inputRange = (MAX_RSSI - MIN_RSSI);
        float outputRange = (numLevels - 1);
        return (int)((float)(rssi - MIN_RSSI) * outputRange / inputRange);
    }
}

...where MIN_RSSI is -100 and MAX_RSSI is -55 (source). The input range is "dynamic" in the sense that its based off of how many resource files are available for the WiFi icon, but in AOSP this value will be 5 because it has icons for 0-4 bars. Using the above logic and values, the ranges come out to approximately:

  • -55 or higher: 4 bars
  • -56 to -66: 3 bars
  • -67 to -77: 2 bars
  • -78 to -88: 1 bar
  • -89 or lower: 0 bars

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.