The forma to calculate the signal strength depends on the technology, and our ofono-rilmodem driver basically converts the ASU values to percentage (0-31, 99).
Here's how android calculates the signal bars (for GSM):
"""
int asu = getGsmSignalStrength();
if (asu <= 2 || asu == 99) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
else if (asu >= 12) level = SIGNAL_STRENGTH_GREAT;
else if (asu >= 8) level = SIGNAL_STRENGTH_GOOD;
else if (asu >= 5) level = SIGNAL_STRENGTH_MODERATE;
else level = SIGNAL_STRENGTH_POOR;
if (DBG) log("getGsmLevel=" + level);
return level;
"""
So in order to have a similar result, here's the range and bars based on the output from ofono (0-100%):
>= 38% - GREAT (4 bars)
25% <= x < 38% - GOOD (3 bars)
16% <= x < 25% - MODERATE (2 bars)
6% <= x < 16% - POOR (1 bar)
0% <= 6% - NONE or UNKNOWN
The forma to calculate the signal strength depends on the technology, and our ofono-rilmodem driver basically converts the ASU values to percentage (0-31, 99).
Here's how android calculates the signal bars (for GSM): ength() ; STRENGTH_ NONE_OR_ UNKNOWN; STRENGTH_ GREAT; STRENGTH_ GOOD; STRENGTH_ MODERATE; STRENGTH_ POOR;
"""
int asu = getGsmSignalStr
if (asu <= 2 || asu == 99) level = SIGNAL_
else if (asu >= 12) level = SIGNAL_
else if (asu >= 8) level = SIGNAL_
else if (asu >= 5) level = SIGNAL_
else level = SIGNAL_
if (DBG) log("getGsmLevel=" + level);
return level;
"""
So in order to have a similar result, here's the range and bars based on the output from ofono (0-100%):
>= 38% - GREAT (4 bars)
25% <= x < 38% - GOOD (3 bars)
16% <= x < 25% - MODERATE (2 bars)
6% <= x < 16% - POOR (1 bar)
0% <= 6% - NONE or UNKNOWN