Android Signal Strength calculation method

Source: Internet
Author: User

How GSM is calculated:

A: This is GSM, whether the LTE should be different.


ASU conversion to dbm:dbm=-113+ (2*asu)


All

* Get the GSM Signal strength, valid values is (0-31) as defined in TS

* 27.007 8.5


if (ASU <= 2 | | asu = =) level = Signal_strength_none_or_unknown (0);

else if (ASU >=) level = Signal_strength_great (4);

else if (ASU >= 8) level = Signal_strength_good (3);

else if (ASU >= 5) level = Signal_strength_moderate (2);

else level = Signal_strength_poor (1);


Lte:

The LTE calculation method seems to be related to signal to noise ratio and reception quality, details as follows, (Signalstrength.java)

There are also CDMA in this file.

/*

* TS 36.214 physical Layer section 5.1.3 ts 36.331 RRC RSSI = Received

* signal + noise RSRP = Reference signal dBm RSRQ = quality of signal

* db= number of Resource blocksxrsrp/rssi SNR = gain=signal/noise ratio

* = -10log p1/p2 DB

*/

int rssiiconlevel = Signal_strength_none_or_unknown, Rsrpiconlevel =-1, snriconlevel =-1;


if (Mltersrp > -44) rsrpiconlevel =-1;

else if (MLTERSRP >= -85) rsrpiconlevel = signal_strength_great;

else if (MLTERSRP >= -95) rsrpiconlevel = Signal_strength_good;

else if (MLTERSRP >= -105) rsrpiconlevel = signal_strength_moderate;

else if (MLTERSRP >= -115) rsrpiconlevel = Signal_strength_poor;

else if (MLTERSRP >= -140) rsrpiconlevel = Signal_strength_none_or_unknown;


/*

* Values are-200 db to +300 (snr*10db) Rs_snr >= 13.0 DB =>4 bars 4.5

* DB <= Rs_snr < 13.0 db = 3 Bars 1.0 db <= Rs_snr < 4.5 db = 2 bars

* -3.0 db <= Rs_snr < 1.0 db 1 bar Rs_snr < -3.0 db/no Service antenna

* Icon only

*/

if (Mlterssnr >) snriconlevel =-1;

else if (Mlterssnr >=) snriconlevel = signal_strength_great;

else if (Mlterssnr >=) snriconlevel = Signal_strength_good;

else if (Mlterssnr >=) snriconlevel = signal_strength_moderate;

else if (Mlterssnr >= -30) snriconlevel = Signal_strength_poor;

else if (Mlterssnr >=-200)

Snriconlevel = Signal_strength_none_or_unknown;


if (DBG) log ("GETLTELEVEL-RSRP:" + MLTERSRP + "Snr:" + Mlterssnr + "Rsrpiconlevel:"

+ Rsrpiconlevel + "Snriconlevel:" + snriconlevel);


/* Choose a measurement type to use for notification */

if (snriconlevel! =-1 && rsrpiconlevel! =-1) {

/*

* The number of bars displayed shall be the smaller of the bars

* Associated with LTE RSRP and the bars associated with the LTE

* Rs_snr

*/

Return (Rsrpiconlevel < snriconlevel rsrpiconlevel:snriconlevel);

}


if (snriconlevel! =-1) return snriconlevel;


if (rsrpiconlevel! =-1) return rsrpiconlevel;


/* Valid values is (0-63) as defined in TS 36.331 */

if (Mltesignalstrength > Rssiiconlevel) = Signal_strength_none_or_unknown;

else if (mltesignalstrength >=) rssiiconlevel = signal_strength_great;

else if (mltesignalstrength >= 8) rssiiconlevel = Signal_strength_good;

else if (mltesignalstrength >= 5) rssiiconlevel = Signal_strength_moderate;

else if (mltesignalstrength >= 0) rssiiconlevel = Signal_strength_poor;

if (DBG) log ("Getltelevel-rssi:" + mltesignalstrength + "Rssiiconlevel:"

+ Rssiiconlevel);

return rssiiconlevel;


How TD-SCDMA is calculated:

Framework/base/signalstrength.java

public int Gettdscdmalevel () {

Final int tdscdmadbm = GETTDSCDMADBM ();

int level;


if ((tdscdmadbm >-25) | | (tdscdmadbm = = Signalstrength.invalid))

level = Signal_strength_none_or_unknown;

else if (tdscdmadbm >= -49) level = Signal_strength_great;

else if (tdscdmadbm >= -73) level = Signal_strength_good;

else if (tdscdmadbm >= -97) level = Signal_strength_moderate;

else if (tdscdmadbm >= -120) level = Signal_strength_poor;

else level = Signal_strength_none_or_unknown;


if (DBG) log ("Gettdscdmalevel =" + level);

return level;

}


Android Signal Strength calculation method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.