Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Lean Mean Battery Power Saving App Review

We talk a lot about battery topics here at XDA TV. We talk about everything from Power Banks to USB … more

Android 5.1 Possibly Coming February 2015

Google released Android 5.0 just over a month ago, and since then Lollipop has been trying to … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Cell signal not being reported correctly

OP MrBiggzz

21st April 2014, 04:11 PM   |  #1  
OP Member
Flag Indianapolis
Thanks Meter: 7
 
59 posts
Join Date:Joined: Jul 2013
Donate to Me
More
Hi!

When my phone is on LTE I notice that the NCSIGN is a positive number when it should be negative. When I turn off LTE and 3G comes on it goes to its correct negative number. NCSIG will report 99 when on LTE.

I can do this in tasker but what good are the functions in Zooper if you have to go outside to get information for something it already provides?

Is there a work around for this? Without getting into a fairly lengthy if .. then statement. Cause then I'd have to be checking whether or not the phone is in LTE or not. /sigh

Side question: Is there a function that will translate what NCCONN or NCCONNS is to its respective 2G,3G,3G-HSPA,4G-WiMax,4G or 4G-LTE laymen terms? Like EVDOrA or Ev as the short version of it goes is one of the 3G's. This might have to be a lengthy if .. then statement but it would be useful!

Any help is good help and I thank you much for it!
22nd April 2014, 01:22 AM   |  #2  
kwerdenker's Avatar
Recognized Themer
Flag Probably the Zooper Forums
Thanks Meter: 2,389
 
1,421 posts
Join Date:Joined: Apr 2010
Donate to Me
More
Quote:
Originally Posted by MrBiggzz

Hi!

When my phone is on LTE I notice that the NCSIGN is a positive number when it should be negative. When I turn off LTE and 3G comes on it goes to its correct negative number. NCSIG will report 99 when on LTE.

I can do this in tasker but what good are the functions in Zooper if you have to go outside to get information for something it already provides?

Is there a work around for this? Without getting into a fairly lengthy if .. then statement. Cause then I'd have to be checking whether or not the phone is in LTE or not. /sigh

Side question: Is there a function that will translate what NCCONN or NCCONNS is to its respective 2G,3G,3G-HSPA,4G-WiMax,4G or 4G-LTE laymen terms? Like EVDOrA or Ev as the short version of it goes is one of the 3G's. This might have to be a lengthy if .. then statement but it would be useful!

Any help is good help and I thank you much for it!

Please use the search function to see if there is already a thread about your problem before posting a new one.

Here is a thread about your problem with explanations and some ideas about workarounds: http://forum.xda-developers.com/show....php?t=2600763

Send from my secret moonbase via space carrier pigeons
22nd April 2014, 01:31 AM   |  #3  
OP Member
Flag Indianapolis
Thanks Meter: 7
 
59 posts
Join Date:Joined: Jul 2013
Donate to Me
More
Sorry.

I saw that thread before and since I've really dove into it Zooper this week the if statement makes sense now.

I do search. Sometimes I just don't know what I'm searching for!

Thanks for the point out!

Sent from my Nexus 5 using Tapatalk
22nd April 2014, 11:14 PM   |  #4  
Member
Thanks Meter: 2
 
73 posts
Join Date:Joined: Jun 2008
Quote:
Originally Posted by MrBiggzz

Hi!

When my phone is on LTE I notice that the NCSIGN is a positive number when it should be negative. When I turn off LTE and 3G comes on it goes to its correct negative number. NCSIG will report 99 when on LTE.

I can do this in tasker but what good are the functions in Zooper if you have to go outside to get information for something it already provides?

Is there a work around for this? Without getting into a fairly lengthy if .. then statement. Cause then I'd have to be checking whether or not the phone is in LTE or not. /sigh

Side question: Is there a function that will translate what NCCONN or NCCONNS is to its respective 2G,3G,3G-HSPA,4G-WiMax,4G or 4G-LTE laymen terms? Like EVDOrA or Ev as the short version of it goes is one of the 3G's. This might have to be a lengthy if .. then statement but it would be useful!

Any help is good help and I thank you much for it!

Several others have posted concerning a similar problem. I posted about it a week ago in this thread, where I proposed that the problem is that Zooper pulls incorrect info when the phone is on LTE (it pulls the RSSI value, instead of the RSRP value). You can try the workarounds suggested above (YMMV) but it'd be nice to have LTE working in a straightforward manner (3G works fine)
Last edited by Scotty1; 22nd April 2014 at 11:18 PM.
22nd April 2014, 11:19 PM   |  #5  
OP Member
Flag Indianapolis
Thanks Meter: 7
 
59 posts
Join Date:Joined: Jul 2013
Donate to Me
More
Tasker incorrectly report LTE cell signal as well ( %CELLSIG ).

Sent from my Nexus 5 using Tapatalk
10th May 2014, 03:41 PM   |  #6  
Senior Member
Thanks Meter: 414
 
1,886 posts
Join Date:Joined: Aug 2011
So I have this partially figured out.

NOTE: This exact command will liklely not work on your phone. I have a Verizon S4 running Carbon, so CM internals.)

Have tasker run this shell command as root:

Code:
dumpsys telephony.registry | grep 'SignalStrength:' | cut -d " " -f 12
and store the results in a variable, then load the variable upon being set to a Zooper variable.

You will have to run the command without piping to cut to see all the output to figure out which field is your dBm.

For my phone, the 12th field in the signal strength line in the dump is the signal strength in dBm as reported by the ROM. (By the way, you can see where Zooper gets it's erroneous 99 value in the the output of the grep before the cut command.) So I can get Zooper to report dBm correctly on LTE, and ASU (its just dBm +140 for LTE).

BUT...

You have to run the dumpsys to get the variable in tasker to change. You can set it to run every two minutes at the most in tasker. Or make it on demand for Zooper, but I have not come up with a way to make it real time. And I am sure this will crush the battery if it runs every 2 minutes all day. But one step closer to getting Zooper to correctly report dBm. My guess is you need a custom API to do it right unless Google standardizes things.
The Following User Says Thank You to brizey For This Useful Post: [ View ]
2nd July 2014, 05:06 AM   |  #7  
Senior Member
Thanks Meter: 414
 
1,886 posts
Join Date:Joined: Aug 2011
OK.

So I have this almost completely figured out.

Here is the git for how Android does signal bars for LTE:

Code:
/**
     * Get LTE as level 0..4
     *
     * @hide
     */
    public int getLteLevel() {
        /*
         * 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 > 300) snrIconLevel = -1;
        else if (mLteRssnr >= 130) snrIconLevel = SIGNAL_STRENGTH_GREAT;
        else if (mLteRssnr >= 45) snrIconLevel = SIGNAL_STRENGTH_GOOD;
        else if (mLteRssnr >= 10) 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 are (0-63, 99) as defined in TS 36.331 */
        if (mLteSignalStrength > 63) rssiIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
        else if (mLteSignalStrength >= 12) 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;

    }
And here are where these values are in the variable mSignalStrength that falls out of my script above:

Code:
public String toString() {
        return ("SignalStrength:"
                + " " + mGsmSignalStrength
                + " " + mGsmBitErrorRate
                + " " + mCdmaDbm
                + " " + mCdmaEcio
                + " " + mEvdoDbm
                + " " + mEvdoEcio
                + " " + mEvdoSnr
                + " " + mLteSignalStrength
                + " " + mLteRsrp
                + " " + mLteRsrq
                + " " + mLteRssnr
                + " " + mLteCqi
                + " " + (isGsm ? "gsm|lte" : "cdma"));
    }
Because of the way it gets parsed out of the dumpsys, mLteRsrp is field 12, mLteRssnr is field 14, and if you are not on LTE, you can use mCdmaDbm, which is field 6. (You have to add three to the field because the dumpsys output leads with a few spaces.) The 17th field tells you if you are on LTE or not. So basically, you can calculate the bars by RSRP and then by SNR, then take the lowest of the two.


By the way, if you want to do bars for 3G on cdma:

Code:
**
     * Get Evdo as level 0..4
     *
     * @hide
     */
    public int getEvdoLevel() {
        int evdoDbm = getEvdoDbm();
        int evdoSnr = getEvdoSnr();
        int levelEvdoDbm;
        int levelEvdoSnr;

        if (evdoDbm >= -65) levelEvdoDbm = SIGNAL_STRENGTH_GREAT;
        else if (evdoDbm >= -75) levelEvdoDbm = SIGNAL_STRENGTH_GOOD;
        else if (evdoDbm >= -90) levelEvdoDbm = SIGNAL_STRENGTH_MODERATE;
        else if (evdoDbm >= -105) levelEvdoDbm = SIGNAL_STRENGTH_POOR;
        else levelEvdoDbm = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;

        if (evdoSnr >= 7) levelEvdoSnr = SIGNAL_STRENGTH_GREAT;
        else if (evdoSnr >= 5) levelEvdoSnr = SIGNAL_STRENGTH_GOOD;
        else if (evdoSnr >= 3) levelEvdoSnr = SIGNAL_STRENGTH_MODERATE;
        else if (evdoSnr >= 1) levelEvdoSnr = SIGNAL_STRENGTH_POOR;
        else levelEvdoSnr = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;

        int level = (levelEvdoDbm < levelEvdoSnr) ? levelEvdoDbm : levelEvdoSnr;
        if (DBG) log("getEvdoLevel=" + level);
        return level;
    }
So similar to LTE, you pick the lowest number of bars for EvdoDbm or EvdoSnr. The signal strengths correspond to #bars: 4, 3, 2, 1, 0


This is from the master branch.
Last edited by brizey; 3rd July 2014 at 02:25 AM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes