Tasker not correctly recognizing %CELLSIG

1,500 views
Skip to first unread message

seth.feinberg

unread,
May 3, 2013, 10:52:38 AM5/3/13
to tas...@googlegroups.com
I use the latest Tasker for a number of tasks on my rooted VZM GNEX running stock 4.2.2.  I have been having serious battery issues lately that I've been trying to track down and one of these Tasks is a profile that turns off mobile data when the variable %CELLSIG is 0, 1 or 2 and turns it back on when the %CELLSIG is 3-8 which from what I could tell has worked great in the past.  Yesterday at a location that I normally have a bad signal I noticed that my phone's battery was CRATERING (without even using it I lost 60% of my extended battery in 2 hours).  I recently downloaded GSam Battery and when I pulled it up it showed that the Screen only accounted for ~10% of the battery loss, but Apps ~90% and Tasker by FAR the biggest hog. Below is a screenshot of the App info inside GSam Battery:


I opened Tasker to see what Profiles were active and despite having zero bars, my Mobile Data On profile (which fires when %CELLSIG is between 3 and 8) was active.  I wrote a quick script to flash the %variable and it kept showing an 8, despite the Zero I was expected according to the bars clearly showing no signal in the upper right.

I have no idea what the "E" is under Wakelock of that first screenshot (the GSam Tasker info), but seems like that is at least a likely contributer to my problem.

Any help would be greatly appreciated.

seth.feinberg

unread,
May 3, 2013, 10:56:12 AM5/3/13
to tas...@googlegroups.com
Sorry here is a Screenshot of Tasker clearly identifying the %CELLSIG incorrectly:

Pent

unread,
May 4, 2013, 3:52:52 AM5/4/13
to Tasker

> I have no idea what the "E" is under Wakelock of that first screenshot (the
> GSam Tasker info), but seems like that is at least a likely contributer to
> my problem.

Have a look at Menu / More / Run Log to see what Tasker is doing
(enable it first)

Pent

Seth Feinberg

unread,
May 4, 2013, 1:04:24 PM5/4/13
to tas...@googlegroups.com
Thanks Pent! Though it obviously didn't specifically nail down the problem it did give me insight into the battery drain.  I have a task that pulls some numbers from a website I made and pushes them as variables to a Minimilistic Text widget I made.  That task is set to only fire when I have a good signal, but since Tasker wasn't reading that i didn't have a signal it was firing up the antenna to full blast constantly trying to get those values, hence the battery drain. But that doesn't explain why Tasker is reading %CELLSIG as an 8 when it is clearly not.  I ran my Test Variable task again and it again read "8" for %CELLSIG despite my phone clearly only displaying 2 bars.  The log isn't much help as all its saying is that i ran the Test Variable task, which I did.  Any other ideas for why its not reading %CELLSIG correctly?



--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Seth.

NOTICE:
This communication may contain information that is legally privileged,
confidential or exempt from disclosure.  If you are not the intended
recipient, please note that any dissemination, distribution, or copying of
this communication is strictly prohibited.  Anyone who receives this
message in error should notify the sender immediately by telephone or by
return e-mail and delete it from their computer.

Pent

unread,
May 4, 2013, 1:27:08 PM5/4/13
to Tasker
> reading %CELLSIG as an 8 when it is clearly not.  I ran my Test Variable
> task again and it again read "8" for %CELLSIG despite my phone clearly only
> displaying 2 bars.  The log isn't much help as all its saying is that i ran
> the Test Variable task, which I did.  Any other ideas for why its not
> reading %CELLSIG correctly?

I think it's more likely that Android is not reporting signal strength
properly
(since it apparently works in other cell areas).

What does %CELLSRV show ?

Pent

Seth Feinberg

unread,
May 4, 2013, 1:42:11 PM5/4/13
to tas...@googlegroups.com
when I run it now it flashes "service".  I don't know for a fact that it is working in other areas, at least not now.  It def worked at one point, but the test I did right now was in my apartment, where my phones read that I had 2 bars of 4 so I was expecting %CELLSIG to read 4, but it read 8.  When I had zero bars and expected a zero for %CELLSIG I was at a bowling alley far away from my apartment.

I turned on Airplane mode and tested both variables.  As expected %CELLSRV flashed "noservice" and %CELLSIG flashed "-1".  The interested thing is that when I turned Airplane mode back off I instantly tested %CELLSIG and before my phone caught a signal it was already flashing "8".  



Pent

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


seth.feinberg

unread,
May 23, 2013, 5:18:51 PM5/23/13
to tas...@googlegroups.com
Any other ideas on this issue? I did a complete wipe/factory reset on my phone and am in the process of rebuilding my Tasker profiles and an still experiencing this issue. My phone reads 1 bar but testing/flashing the %CELLSIG reads "8"...

Basically the only thing I want is an auto syncing schema that only enables auto sync when I have a good signal and my battery is good and it's impossible without a functioning %CELLSIG variable....

seth.feinberg

unread,
May 23, 2013, 5:56:04 PM5/23/13
to tas...@googlegroups.com
I just rebooted my phone and decided on a whim to test/flash the %CELLSIG variable and it has been reading "-1" for about a half hour now through many different bar readings.  See the attached screenshot.  Something very odd is going on with the monitoring of the %CELLSIG variable on my phone.  Still running 4.2.2


On Friday, May 3, 2013 9:52:38 AM UTC-5, seth.feinberg wrote:
2013-05-23 16.52.31.png

Rich D

unread,
May 23, 2013, 6:07:04 PM5/23/13
to tas...@googlegroups.com

I would imagine this information is in the shell dumpsys. Perhaps check it there to see if the variables I getting set correctly..

You can look in dumpsys connectivity or dumpsys statusbar

All I seam to get for a value of %CELLSIG  is -1 even after a reboot. I will test some more..

RICH..

Message has been deleted

Bob Hansen

unread,
May 23, 2013, 6:16:15 PM5/23/13
to tas...@googlegroups.com
I decided to check my phone with %CELLSIG and got -1. So I made a call and checked it while on the call, it reported 6. Checked a couple of minutes later it was 8. I had answered a call about 10 minutes before doing this little experiment. I am on 4.1.2.

Rich D

unread,
May 23, 2013, 6:28:12 PM5/23/13
to tas...@googlegroups.com

> I decided to check my phone with %CELLSIG and got -1. So I made a call and checked it while on the call, it reported 6. Checked a couple of minutes later it was 8. I had answered a call about 10 minutes before doing this little experiment. I am on 4.1.2.

Good idea....

I have a moto droid 4 running 2.3.6.   Rooted
Tasker Version 1.3.3u2m

No time for testing now but i will give that a try later...

Seth Feinberg

unread,
May 23, 2013, 6:34:43 PM5/23/13
to tas...@googlegroups.com
Sorry but I'm not sure what the dumpsys is or where to find it.  I enable "Log to SD card" and can find where my Test action fired but cannot discern any useful information from it.


--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bob Hansen

unread,
May 23, 2013, 7:49:45 PM5/23/13
to tas...@googlegroups.com
dumpsys is a linux command. You can run linux commands in a terminal emulator app - but you must be rooted to run this command. The full dumpsys output for a typical android phone will generate about 2.2Mb of text. 

Anyway, to get telephone signal strength you run a command like this:
dumpsys telephony.registry | grep 'SignalStrength:'
That command will extract this line from dumpsys:
mSignalStrength=SignalStrength: 99 0 -74 -70 -120 -1 -1 22 -93 -8 168 2147483647 cdma 0 0 0 false 0 0 5 0 4 16 99 0 5 5 5 5 5 5 5 0

Now the fun part. Which of these numbers is the value used for the value of %CELLSIG ?
I have done a number of dumps and Identified the values that change, but no value matches what %CELLSIG shows.
To change the signal strength, I shielded the phone with aluminium. 
None of these values appear to directly correlate to the values I see in %CELLSIG (the bold numbers are in columns in which the value changed.  

mSignalStrength=SignalStrength: 99 0 -81 -105 -120 -1 -1 25 -88 -8 176 2147483647 cdma 0 0 0 false 0 0 4 0 4 4 99 0 5 5 5 5 5 5 5 0
mSignalStrength=SignalStrength: 99 0 -78 -70 -120 -1 -1 22 -95 -8 168 2147483647 cdma 0 0 0 false 0 0 4 0 4 8 99 0 5 5 5 5 5 5 5 0
mSignalStrength=SignalStrength: 99 0 -82 -70 -120 -1 -1 19 -103 -11 76 2147483647 cdma 0 0 0 false 0 0 4 0 3 8 99 0 5 5 5 5 5 5 5 0
mSignalStrength=SignalStrength: 99 0 -73 -70 -120 -1 -1 22 -93 -8 158 2147483647 cdma 0 0 0 false 0 0 5 0 4 16 99 0 5 5 5 5 5 5 5 0
mSignalStrength=SignalStrength: 99 0 -74 -70 -120 -1 -1 22 -93 -8 168 2147483647 cdma 0 0 0 false 0 0 5 0 4 16 99 0 5 5 5 5 5 5 5 0

So I am still trying to figure this out...

Bob Hansen

unread,
May 23, 2013, 8:01:35 PM5/23/13
to tas...@googlegroups.com
From the Tasker User's Guide it states:

Cell Signal Strength (dynamic,monitored) 
%CELLSIG 
The current phone signal level from 0-8 inclusive on a rougly linear scale. On some CDMA phones, the level will rise in steps of 2 (0,2,4,6,8). The value is -1 if the value is unknown or there is e.g. no service. 
There is a bug with some Android versions that the reported signal strength is not updated until the device is turned off and on.

From my experience, the -1 value is a tasker defined value.

It could be that I am looking at the wrong place for the value.

Rich D

unread,
May 23, 2013, 8:02:16 PM5/23/13
to tas...@googlegroups.com

> Sorry but I'm not sure what the dumpsys is or where to find it.

Ahhh, it is actually very easy, take it from someone who knew nothing about this stuff when I started... and is extremely useful. 

1. Download 'Terminal emulator ' from the play store

2. When you start it you should see a prompt with blah blah blah :/$
     Type in "su" <cr>  now you should see blah blah blah :/#
    This gives it root permision

3. Type in dumpsys connectivity <cr>

This will give you a bunch of system information about your connection. You need to read through it and try to find something like lastsignallevel

Or try dumpsys statusbar <cr> and look for the signal notification. 

Although you will most likely find what I have so far. That the tasker side of things seem to be working. It appears, as pent suggested android is not reporting it correctly ..

Seth Feinberg

unread,
May 23, 2013, 8:01:57 PM5/23/13
to tas...@googlegroups.com
haha, whoa.  Are all 5 of the last dumps with Aluminum foil around your phone?


--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Seth Feinberg

unread,
May 23, 2013, 8:07:35 PM5/23/13
to tas...@googlegroups.com
ahh i gotcha and I gave that a try.  though I'll need some time to decipher this:).  From my understanding a -1 means Airplane mode is on...


--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rich D

unread,
May 23, 2013, 9:58:37 PM5/23/13
to tas...@googlegroups.com

Nice info Bob, after some more testing I still can only get a value of -1 in %CELLSIG, This is on a call, off a call, airplane mode on, off.  However in   my android settings the signal strength is reported.  I can watch it change in the settings screen  but it does not seem to be linked to the bars in the status bar as they do not change at the same time.  A strong signal will show a value of -96 dBm which does correlate directly with the third number listed in mSignalStrength=SignalStrength.   So in your example below it would be -74

I would try monitoring that and not try to compare it to the bars to see if you can get a reliable result.  I do not know how the signal bars in the status bar gets its information but I have noticed it being incorrect on several occasions when I drop a call In a known bad cell area and it is reporting full bars....

Bob Hansen

unread,
May 23, 2013, 10:26:31 PM5/23/13
to tas...@googlegroups.com
I'm on Verizon so my signal is CDMA. The signal level is calculated different from GSM. What I have figured out is that the data used in the calculuation is in the telephony.registry part of the dumpsys. I have also learned that the number of bars shown as signal strength is better described as signal quality as it really is based on the signal to noise ratio.  I still can't find the calculation for the signal strength reported by tasker. A good explaination of the calculation for signal level can be found at http://stackoverflow.com/questions/9464671/range-for-signalstrength-in-dbm-for-cdma-devices

Anyway, I've learned a lot, but we're no closer to solving the original problem -- unless the solution is to switch to Verizon :>0

Rich D

unread,
May 23, 2013, 10:27:10 PM5/23/13
to tas...@googlegroups.com

Found this....

If you want to check out just where you are at in raw numbers, you can check the status screen in Android's menu. Just pull up the menu, scroll down and select About Phone, then select Status. On this screen you will be able to see your signal displayed in dBm as well as ASU. ASU is just a representation of the rate at which the phone is able to update its location by connecting to the towers near it. It basically measures the same thing as dBm, but on a more linear scale. You can convert ASU to dBm with this formula: dBm= -113+(2*ASU).

Here....

http://www.tested.com/tech/android/557-how-to-measure-cell-signal-strength-on-android-phones/

In my android settings it reports both d Bm and ASU however ASU is always 0.  So perhaps it is just the reported  ASU that is flakey. 

Maybe Pent could fix this android problem by getting the dBm and converting it...

Rich..

Rich D

unread,
May 23, 2013, 10:32:11 PM5/23/13
to tas...@googlegroups.com

I am on verizon as well...

Bob Hansen

unread,
May 23, 2013, 10:37:31 PM5/23/13
to tas...@googlegroups.com
Now it's getting weird. It works for me but not for you. I'm using stock 4.1.2. You? 
I'm betting it is ROM related.


Rich D

unread,
May 23, 2013, 10:39:03 PM5/23/13
to tas...@googlegroups.com

Posted earlier... 

I have a moto droid 4 running 2.3.6.   Rooted
Tasker Version 1.3.3u2m

On May 23, 2013 10:37 PM, "Bob Hansen" <rghan...@gmail.com> wrote:
Now it's getting weird. It works for me but not for you. I'm using stock 4.1.2. You? 
I'm betting it is ROM related.


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Rich D

unread,
May 23, 2013, 10:42:31 PM5/23/13
to tas...@googlegroups.com

Bob, I am assuming you can see a value for ASU in your android settings.  Is this the number you get with %CELLSIG ?

Bob Hansen

unread,
May 23, 2013, 10:52:37 PM5/23/13
to tas...@googlegroups.com
No, not even close. The %CELLSIG number for cdma does follow the 2, 4, 6, 8 values mentioned in the tasker user's guide. But on the bright side, the signal strength number matches what I believed to be the number in the dumpsys.

Bob Hansen

unread,
May 23, 2013, 10:57:15 PM5/23/13
to tas...@googlegroups.com
I'm using Tasker 4.1b1
May be that it is related to Tasker after all.

Rich D

unread,
May 23, 2013, 11:03:28 PM5/23/13
to tas...@googlegroups.com

> No, not even close. The %CELLSIG number for cdma does follow the 2, 4, 6, 8 values mentioned in the tasker user's guide. But on the bright side, the signal strength number matches what I believed to be the number in the dumpsys.

Is it the same one as I posted about earlier,  the third one listed in the dumpsys ?

Bob Hansen

unread,
May 23, 2013, 11:22:46 PM5/23/13
to tas...@googlegroups.com
I don't think so. 
As best as I can tell it is this one
mSignalStrength=SignalStrength: 99 0 -81 -105 -120 -1 -1 25 -88 -8 176 2147483647 cdma 0 0 0 false 0 0 4 0 4 4 99 0 5 5 5 5 5 5 5 0

Rich D

unread,
May 24, 2013, 6:12:55 AM5/24/13
to tas...@googlegroups.com

>
> I don't think so. 
> As best as I can tell it is this one
> mSignalStrength=SignalStrength: 99 0 -81 -105 -120 -1 -1 25 -88 -8 176 2147483647 cdma 0 0 0 false 0 0 4 0 4 4 99 0 5 5 5 5 5 5 5 0
>

H,mmmm seems a bit odd. I made a task to flash shell dumpsys telephony.registry | grep 'SignalStrength:' and then watched the signal strength in my Android settings and on my device it is definitely the third number reported. -78 in the example below.. 

mSignalStrength=SignalStrength: 99 -1 -78 -70 -63 -1 8 cdma 0 0 0 0 0 0 -108 -1

@ Seth, I pasted the task I used below,  if you would like to try it simply build this task in the task edit tab. You Should see a run button to start the task at a stop button to stop task.  The shell action is found under script / shell. 

Sig (12)
A1: Run Shell [ Command:dumpsys telephony.registry | grep 'SignalStrength:' Timeout (Seconds):0 Use Root:On Store Result In:%Asig ]
A2: Flash [ Text:%Asig Long:Off ]
A3: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A4: Goto [ Type:Action Number Number:1 Label: ]

I set it to a global variable so you can easily go into the variables tab to copy and paste the results. 

Rich...

Seth Feinberg

unread,
May 24, 2013, 9:10:50 AM5/24/13
to tas...@googlegroups.com

Alright I'll give it a shot today and report back

--

Rich D

unread,
May 24, 2013, 9:21:53 AM5/24/13
to tas...@googlegroups.com

>
> Alright I'll give it a shot today and report back
>

Just to be clear.. I am comparing the number I get back back from the dumpsys to the number that is reported in my android settings and this is not the same value you see in %CELLSIG.  It is reported in "dBm" 

Rich..

Seth Feinberg

unread,
May 24, 2013, 9:56:10 AM5/24/13
to tas...@googlegroups.com

That's clear.  But to clarify this task flash's this shell result every 2 secs ad infinitum, right?  Shouldn't there be a stop in there somewhere

--

Rich D

unread,
May 24, 2013, 10:03:58 AM5/24/13
to tas...@googlegroups.com

> That's clear.  But to clarify this task flash's this shell result every 2 secs ad infinitum, right?  Shouldn't there be a stop in there somewhere

That's correct..  you could add a 'stop if %SCREEN matches off '  or any other switch you like or even a loop count but 2 sec is plenty of time to allow you to stop it using the stop button in the task edit tab. So to stop just reopen tasker and got to the task tab where you created it click on the task and there will be a stop button close to where the start button was.

Rich..

Seth Feinberg

unread,
May 24, 2013, 10:34:04 AM5/24/13
to tas...@googlegroups.com

Ah of course. OK I ran but I'm going to assume I got something in the shell part wrong cause it's only flashing 0.  however, running that shell command inside the terminal emulator yields closer to expects results.  Some screenshots...

--
Screenshot_2013-05-24-09-29-16.png
Screenshot_2013-05-24-09-29-01.png
Screenshot_2013-05-24-09-32-06.png

Rich D

unread,
May 24, 2013, 12:32:19 PM5/24/13
to tas...@googlegroups.com

> Ah of course. OK I ran but I'm going to assume I got something in the shell part wrong cause it's only flashing 0. 

I think I see the problem in the shell action. I was running an older version of tasker which only had a 'store result in' field.  The new version has 'store output in' , 'Store error in' and 'store results in'.  So you simply need to change the %Asig from the 'store results in' and put it in the 'store output in' field.

however, running that shell command inside the terminal emulator yields closer to expects results.  Some screenshots...

Those results look very similar to mine. I think once you get the task working and are able to view your Android settings while the flash is going you will see it is the same number ( third number reported) as I found.

Post back what you find...

Rich..

Seth Feinberg

unread,
May 24, 2013, 1:11:10 PM5/24/13
to tas...@googlegroups.com

Yup that was it, stupid on my part, def should've figured that out myself.  Thanks for being patient.

I ran it and obviously the tasker flash was fluctuating while the android settings reading was static but the 3rd number you highlighted showed values around what my settings Signal Strength was displaying dBm. Screenshot attached.

--
Screenshot_2013-05-24-12-07-35.png

Rich D

unread,
May 24, 2013, 1:34:01 PM5/24/13
to tas...@googlegroups.com

>
> I ran it and obviously the tasker flash was fluctuating while the android settings reading was static

Are you sure it is static? On my device it is updated very frequently while on the same screen. I can watch both of them change almost together.  I found the best place to test is in a moving car. This gives lots of changes.

What may be usefully as well is to add the %CELLSIG To the flash and set a second global variable as well to record the data I would do something like

Variable set %Asig2 to %Asig <cr> %CELLSIG <cr>

This will tell us if shell command is getting the correct signal when the %CELLSIG fails....

Hopefully with more testing you will be able to confirm that we are looking at the correct number in the dumpsys and that it has the correct value when the %CELLSIG fails.  

Rich..

Bob Hansen

unread,
May 24, 2013, 5:25:06 PM5/24/13
to tas...@googlegroups.com
@Rich
I went back and double checked the suspected signal strength value. I used your profile and brought up the android settings > about phone > status. On my phone the third value that you identified is about 15 below the value in the status display. The value I identified matches perfectly. It's weird that we would see it differently.

Seth Feinberg

unread,
May 24, 2013, 6:23:57 PM5/24/13
to tas...@googlegroups.com
I'm pretty sure its static.  Certainly more static than the Tasker flash.  Though I haven't tested it in a car yet...  @Bob Which value of yours coincides more with the dBm?


On Fri, May 24, 2013 at 4:25 PM, Bob Hansen <rghan...@gmail.com> wrote:
@Rich
I went back and double checked the suspected signal strength value. I used your profile and brought up the android settings > about phone > status. On my phone the third value that you identified is about 15 below the value in the status display. The value I identified matches perfectly. It's weird that we would see it differently.

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bob Hansen

unread,
May 24, 2013, 8:29:32 PM5/24/13
to tas...@googlegroups.com
I think the one highlighted in green (9th).
mSignalStrength=SignalStrength: 99 0 -74 -70 -120 -1 -1 22 -93 -8 168 2147483647 cdma 0 0 0 false 0 0 5 0 4 16 99 0 5 5 5 5 5 5 5 0

Rich D

unread,
May 24, 2013, 8:37:52 PM5/24/13
to tas...@googlegroups.com

> @Rich
> I went back and double checked the suspected signal strength value. I used your profile and brought up the android settings > about phone > status. On my phone the third value that you identified is about 15 below the value in the status display. The value I identified matches perfectly. It's weird that we would see it differently.

@Bob
That does seem a little strange..my guess would be android version.  from zeth's screen shot it looks like he might be getting the same result as you. It will be interesting to see what he comes up with.. have you checked %CELLSIG at all when testing the dumpsys to see if the dumpsys reports a value when %CELLSIG does not?

Rich..

Bob Hansen

unread,
May 24, 2013, 9:17:06 PM5/24/13
to tas...@googlegroups.com
When I first started looking into this problem, I created a simple task to flash $CELLSIG. When I initially ran it (without exiting out of Tasker, it showed -1. So I made a call and checked it while on the call, it reported 6. Checked a couple of minutes later it was 8.
I think what happened in my test is that I didn't exit tasker before running my task and that's when I got -1. I exited tasker to place a call and then went back to tasker to run my task at that time it showed 6. Ever since then it has had a value. I'm thinking tasker didn't start updating %CELLSIG until I exited tasker.

Rich D

unread,
May 24, 2013, 9:41:08 PM5/24/13
to tas...@googlegroups.com

Interesting find.....

I had searched the group on this matter before but there is alot of %CELLSIG posts. I just was poking around again and came across this one. 

https://groups.google.com/group/tasker/browse_thread/thread/d922e6b7652f3da5/c58434bbeb642dc6?hl=en&lnk=gst&q=%25CELLSIG+-1#c58434bbeb642dc6

It would make sense if you were not having this problem before and your area just got 4g....

You could try setting to 3g and see if the problem is still there..

Rich..

Bob Hansen

unread,
May 24, 2013, 10:06:00 PM5/24/13
to tas...@googlegroups.com
As far as I can tell, selecting 3g is not an option on my Droid RAZR HD.

Rich D

unread,
May 24, 2013, 10:16:33 PM5/24/13
to tas...@googlegroups.com

> As far as I can tell, selecting 3g is not an option on my Droid RAZR HD.

Oops, meant to direct that one to Zeth.  As he seems to get a constant 8 for a value of %CELLSIG as did the poster on the link...

Seth Feinberg

unread,
May 24, 2013, 10:46:20 PM5/24/13
to tas...@googlegroups.com

That was before, its been only showing -1 since my last boot...

On May 24, 2013 9:16 PM, "Rich D" <ricp...@gmail.com> wrote:

> As far as I can tell, selecting 3g is not an option on my Droid RAZR HD.

Oops, meant to direct that one to Zeth.  As he seems to get a constant 8 for a value of %CELLSIG as did the poster on the link...

--

Rich D

unread,
May 25, 2013, 8:55:51 AM5/25/13
to tas...@googlegroups.com

>
> That was before, its been only showing -1 since my last boot...

Well now its getting strange, it appears we are in the same boat now. I just upgraded tasker I now have a moto droid 4 running 2.3.6.   Rooted
Version 1.6u1m and still get a constant -1.

Just to double check you do not have a custom ROM,  correct?

Rich D

unread,
May 25, 2013, 9:07:22 AM5/25/13
to tas...@googlegroups.com

@Seth, do you get a. "Asu' signal value in your android settings?

Rich D

unread,
May 25, 2013, 9:17:53 AM5/25/13
to tas...@googlegroups.com

> @Seth, do you get a. "Asu' signal value in your android settings?

Here is a screen shot of my settings..

shot_000040.png

Seth Feinberg

unread,
May 25, 2013, 3:15:28 PM5/25/13
to tas...@googlegroups.com

Well my ROM is stock but deodexed, but I was having issues before on a straight stock ROM. I have a asu.  Screenshot attached.

On May 25, 2013 8:18 AM, "Rich D" <ricp...@gmail.com> wrote:

> @Seth, do you get a. "Asu' signal value in your android settings?

Here is a screen shot of my settings..

--
Screenshot_2013-05-25-14-14-07.png

Rich D

unread,
May 25, 2013, 7:07:13 PM5/25/13
to tas...@googlegroups.com

> You received this message because you are subscribed to the Google Groups "Tasker" group.

> To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.

Rich D

unread,
May 25, 2013, 7:32:04 PM5/25/13
to tas...@googlegroups.com

> Well my ROM is stock but deodexed, but I was having issues before on a straight stock ROM. I have a asu.  Screenshot attached.
>

If you search the group this variable has had a few issues in the past but not to many lately.  My issue seems to be that android is not reporting the correct value based on my ASU value being 0.  Yours seems to be a bit eradicate. 

Have you found a consistent signal strength that matches your dBm in the android settings?

Perhaps we could ask Pent for a variable for the dBm value.

  It would be easy enough to check with the shell action but it can not be used as a context  without having a tasker variable. 

Rich..

Seth Feinberg

unread,
May 25, 2013, 8:02:04 PM5/25/13
to tas...@googlegroups.com

What do you mean by a consistent signal strength that matches?

--

Rich D

unread,
May 25, 2013, 8:39:18 PM5/25/13
to tas...@googlegroups.com

> What do you mean by a consistent signal strength that matches?

Sorry,
I meant to say that constantly matches... IE using the task that flashes the dumpsys values and comparing it to your android settings signal value.

Rich..

seth.feinberg

unread,
May 28, 2013, 1:23:21 PM5/28/13
to tas...@googlegroups.com
Sorry for the delayed response but Nah, nothing seems to match up in any meaningful way to the ASM variable...

Rich D

unread,
May 28, 2013, 5:23:12 PM5/28/13
to tas...@googlegroups.com

>
> Sorry for the delayed response but Nah, nothing seems to match up in any meaningful way to the ASM variable...

Actually it was the dBm value  in the android settings we were looking to match..  Rich..

Seth Feinberg

unread,
May 28, 2013, 5:34:00 PM5/28/13
to tas...@googlegroups.com

Yeah that matches to the 9th number of the shell output...

On May 28, 2013 4:23 PM, "Rich D" <ricp...@gmail.com> wrote:

>
> Sorry for the delayed response but Nah, nothing seems to match up in any meaningful way to the ASM variable...

Actually it was the dBm value  in the android settings we were looking to match..  Rich..

--

seth.feinberg

unread,
May 30, 2013, 10:08:03 AM5/30/13
to tas...@googlegroups.com
So what do you two think?  Should I bail on %CELLSIG and try to split out the variable from that Shell command?  Or wait til its actually implemented correctly?


On Tuesday, May 28, 2013 4:34:00 PM UTC-5, seth.feinberg wrote:

Yeah that matches to the 9th number of the shell output...

On May 28, 2013 4:23 PM, "Rich D" <ricp...@gmail.com> wrote:

>
> Sorry for the delayed response but Nah, nothing seems to match up in any meaningful way to the ASM variable...

Actually it was the dBm value  in the android settings we were looking to match..  Rich..

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.

Bob Hansen

unread,
May 30, 2013, 11:06:33 AM5/30/13
to tas...@googlegroups.com
It depends on how much you want a signal strength value. I doubt that this will be "fixed" any time soon. Most of the work is done as far as splitting out the signal strength value from dumpsys. So why not use it?

Seth Feinberg

unread,
May 30, 2013, 11:40:38 AM5/30/13
to tas...@googlegroups.com

Haha just wishful thinking holding me back I guess (I was avoiding how to consistently, accurately split just the 9th variable...)

On May 30, 2013 10:06 AM, "Bob Hansen" <rghan...@gmail.com> wrote:
It depends on how much you want a signal strength value. I doubt that this will be "fixed" any time soon. Most of the work is done as far as splitting out the signal strength value from dumpsys. So why not use it?

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/qKd9wM647OM/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.

Bob Hansen

unread,
May 30, 2013, 12:32:27 PM5/30/13
to tas...@googlegroups.com
I believe this would be reliable. Use a the Run Shell command as shown and then Variable Split. The correct signal strength value is Asig11. (Ideally you should change the variable to all lowercase to save memory and tasker overhead  to add these to its variable list.)

Sig (14)
A1: Run Shell [ Command:dumpsys telephony.registry | grep 'SignalStrength: 
' Timeout (Seconds):0 Use Root:On Store Output In:%Asig Store Errors In: 
Store Result In: ]
A2: Variable Split [ Name:%Asig Splitter: Delete Base:Off ]
A3: Flash [ Text:%Asig11 Long:Off ]
A4: Wait [ MS:0 Seconds:2 Minutes:0 Hours:0 Days:0 ]
A5: Goto [ Type:Action Number Number:1 Label: ]

Seth Feinberg

unread,
May 30, 2013, 12:56:38 PM5/30/13
to tas...@googlegroups.com

Cool this for the advice.  Slightly of topic, but what are the finer differences between using caps in a variable and not?  I think I understand that using a capital letter makes it "global", which I take it means the variable is available outside of that specific task, but what are the more specific cost/benefits of the two options? Also is it just at least one capital letter that distinguishes it or is a variable in ALL caps something different?

--

Bob Hansen

unread,
May 30, 2013, 1:18:47 PM5/30/13
to tas...@googlegroups.com


On Thursday, May 30, 2013 9:56:38 AM UTC-7, seth.feinberg wrote:

Cool this for the advice.  Slightly of topic, but what are the finer differences between using caps in a variable and not?  I think I understand that using a capital letter makes it "global", which I take it means the variable is available outside of that specific task, but what are the more specific cost/benefits of the two options? Also is it just at least one capital letter that distinguishes it or is a variable in ALL caps something different?

Global variables (any variable name that has 1 or more upper case letters) exist outside of the task, as you said. It is all about managing resources both memory and cpu. A global variable must exist longer thus it uses memory longer and that is not desired. Since tasker displays global variables, the more there are the more processing that is required to display them. Is the difference in memory usage and cpu usage significant? For normal simple things no, but it could be if you are handling many variables - say a variable split of a very large text.

Seth Feinberg

unread,
May 30, 2013, 1:29:01 PM5/30/13
to tas...@googlegroups.com

Thanks for the very informative explanation!!

--

Rich D

unread,
May 30, 2013, 4:47:22 PM5/30/13
to tas...@googlegroups.com


(Ideally you should change the variable to all lowercase to save memory and tasker overhead  to add these to its variable list.)

@Seth, I would definitely recommend changing it to a local variable. I will often use global variables like this one when building and Troubleshooting tasks. It allows you to go to the variables tab and easily check there values. Then after the task is working I simply go back and remove the "A"  

Just curious, were you able to try using just 3G to see if you could get a value with %CELLSIG ?

Seth Feinberg

unread,
May 31, 2013, 11:36:21 AM5/31/13
to tas...@googlegroups.com

@Rich, thanks for the excellent advice.  I recently wiped my phone because of really poor performance and battery life which ended up being related to this issue with the %CELLSIG not being read properly (and subsequently many profiles I wrote that depended on it causing more harm than good).  But I'm sure misuse of global variables was partially to blame (I had a task that took financial numbers from a webstring that split a bunch of times and they are all global variables... doh).  So I can't thank you enough got the tip.

Anyways i turned off LTE and reran my/your flashing task and compared to the settings.  Attached the screenshot.  The first number in the flash is %CELLSIG, then the shell output.   So %CELLSIG is still -1 but interestingly enough the dBm value in the android settings seems to not be correlating with the 3rd number in the shell output. And now ASM is super low and may be the 3rd number minus the 9th number of the shell output...

--
Screenshot_2013-05-31-10-07-39.png

Seth Feinberg

unread,
May 31, 2013, 11:38:35 AM5/31/13
to tas...@googlegroups.com

Eh I take that last part back, just ran it again and asm is NOT the difference between those two values. 

seth.feinberg

unread,
May 31, 2013, 11:50:22 AM5/31/13
to tas...@googlegroups.com
Also in that first post, it should read that it is NOW correlating to the 3rd number in the output, not the 9th that it was relating to when LTE is enabled.  Which is going to be problematic for reading the variable for signal strength, that is if it changes depending on which mobile network its using.  Also the signal strength meters seem to still read even if Airplane mode is on, which should be easier to get around but still an issue.

Sorry for the 3 subsequent posts...
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.

Rich D

unread,
May 31, 2013, 12:51:05 PM5/31/13
to tas...@googlegroups.com

> Also in that first post, it should read that it is NOW correlating to the 3rd number in the output, not the 9th that it was relating to when LTE is enabled.  Which is going to be problematic for reading the variable for signal strength, that is if it changes depending on which mobile network its using.  Also the signal strength meters seem to still read even if Airplane mode is on, which should be easier to get around but still an issue.

Our devices seem to be reporting these values differently ( the values in the dumpsys) here is a copy of my dumpsys...

 
4g...

mSignalStrength=SignalStrength: 99 -1 -86 -70 -63 -1 5 cdma 12 2147483647 -105 99 161 0 -108 -1

3g...

  mSignalStrength=SignalStrength: 99 -1 -88 -70 -63 -1 7 cdma 0 0 0 0 0 0 -108 -1

As stated before the third value matches exactly with the android settings value for the dBm with and without LTE enabled.  

I would guess if you can not find one of these values to consistently match your values in android settings this might not work for your device..

I suppose you could spilt out the most likely values and flash those as you are driving (I mean riding with someone else driving :))  and see if they fluctuate with the android setting and the bars to give a reasonable ( not exact) reading of actual signal...

You could check a few other places in the dumpsys in the emulator to see if you can find anything.

You can look in dumpsys connectivity or dumpsys statusbar using the emulator.  On my device I get a value reported for the battery in the  dumpsys statusbar but there is no signal reported.

Rich..

andy.m...@gmail.com

unread,
Jun 18, 2013, 9:52:54 PM6/18/13
to tas...@googlegroups.com
I just wanted to thank you guys for this discussion so far, and to chip in some more data from a Sprint cdma phone (Sprint version Samsung Galaxy Note 2, rooted, Tasker 4.1u3).

For some reason Tasker stopped reading the correct CELLSIG value a few weeks ago and reports a value of "-1" regardless of actual signal strength/quality.

Using dumpsys-signalstrength I was able to get the following output:

mSignalStrength=SignalStrength: 99 0 -88 -15 -91 -1 8 99 2147483647 2147483647 2147483647 2147483647 cdma 0x400

The third value (-88) represents dBa, but the interesting thing for me is that the final value (0x400) corresponds to the signal strength as displayed in the status bar. Obviously this doesn't help everyone, as the contents/format of the dumpsys output may vary by carrier, but I thought it was worth mentioning.

seth.feinberg

unread,
Jun 19, 2013, 2:31:49 PM6/19/13
to tas...@googlegroups.com
Andy, thanks for chiming in.  I was very excited the last two times I saw an update to Tasker and very disappointed that %CELLSIG was still not reading correctly.  I'm pretty sure none of us have those 7 numbers printed 3 times or anything like the 0x400 you see after cdma (though I have a sneaking suspicion that the 7 numbers are your phone number so you might want to take that down if possible).

I keep running my task that flashes the dumpsys and comparing it to what Android reports in Settings->About Phone->Status.  As stated above, it seems that the LTE signal strength is reported as my 9th number and cdma is reported as the 3rd number.  I'm trying to come up with a way to use the worse of the 2 numbers to make my own Cell strength variable but I'm afraid that constantly running the shell command will cause much more battery drain than anything I'll save applying the newly found variables to various profiles allowing and disallowing various background syncs/mobile data.  But for posterity stake, what values are you guys getting for strength?  I'm def seeing -125 when there is no signal and it seems to range as high as -70.  Anybody see a similar range? That seems to be in line with what I would expect from the info in this wiki article: http://en.wikipedia.org/wiki/DBm

Pent

unread,
Oct 23, 2013, 10:16:35 AM10/23/13
to tas...@googlegroups.com
Guys, I havn't followed this whole discussion, but here's the code for the level calculation.

if ( ss.isGsm() )
                    level = asuToLevel( ss.getGsmSignalStrength() );
// CDMA HERE
else {
                 int levelDbm = 0;
                 int levelEcio = 0;
                 int cdmaDbm = ss.getCdmaDbm();
                 int cdmaEcio = ss.getCdmaEcio();

                 if (cdmaDbm >= -75) levelDbm = 4;
                 else if (cdmaDbm >= -85) levelDbm = 3;
                 else if (cdmaDbm >= -95) levelDbm = 2;
                 else if (cdmaDbm >= -100) levelDbm = 1;
                 else levelDbm = 0;
                   
                 // Ec/Io are in dB*10
                 if (cdmaEcio >= -90) levelEcio = 4;
                 else if (cdmaEcio >= -110) levelEcio = 3;
                 else if (cdmaEcio >= -130) levelEcio = 2;
                 else if (cdmaEcio >= -150) levelEcio = 1;
                 else levelEcio = 0;

                 level = ( (levelDbm < levelEcio) ? levelDbm : levelEcio ) * 2;
}

If you can suggest using a different value based on your observations, let me know.

Pent

seth.feinberg

unread,
Oct 23, 2013, 10:52:47 AM10/23/13
to tas...@googlegroups.com
Pent,

Thanks so much for replying!  I've kind of moved on at this point and was never the expert in the matter, I basically just did what @Rich and @Bob told me to and reported back.  Just to summarize my/our findings for you: I/We typed "dumpsys telephony.registry | grep 'SignalStrength:'" into terminal and found that in the output (which looks like this: mSignalStrength=SignalStrength: 99 -1 -83 -100 -75 -100 5 31 -86 -5 130 14 gsm|lte) the 9th number correlated exactly with what the Android settings were reporting for dBm when LTE was enabled and the 3rd number correlated exactly with what Android settings were reporting for dBm when LTE was disabled. @Rich and @Bob reported slightly different values (we were all using different phones and not all on the same carrier) but that was indisputably what I experienced.  9th number of the dumpsys output was LTE signal strength and 3rd was non LTE.

Pent

unread,
Oct 24, 2013, 1:25:54 PM10/24/13
to tas...@googlegroups.com
Ah, I see there are some relatively new functions e.g. getEvdoDbm(). I will put some logging in with various available parameters
and perhaps someone on this thread can get back to me with the values (and what's seen in the phone signal bar at those
times).

Pent

Roberto Taormina

unread,
Jul 17, 2016, 6:09:24 PM7/17/16
to Tasker
I need to reset signal iPhone when is 0. How Can i do that? I tried to signal streght without success...
Reply all
Reply to author
Forward
0 new messages