Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Occasionally the data connection of my mobile will stall, i.e. it still looks like it does have a data connection (either "H" or "G"), but no server can be contacted.

(In particular, my ROM being a Cyanogen, the data icon will turn gray, meaning that the Google servers can't be contacted at the moment).

This is usually easily solved by switching mobile data off and on again, which is not a terrible nuisance, except sometime this stalled state goes unnoticed for hours, putting me at risk of losing important communications.

  • is there an easy way to detect this "stalled connection" state? preferably a way that could be used in Tasker to trigger a disable/enable mobile data cycle?

  • is there an app to handle these situations? I found many that seem to deal with a similar problem, i.e. when the data connection is completely lost (no "H" or "G" icon), but none that deals with this particular situation.

(This is happening on a rooted HTC Wildfire S with a Cyanogen 9 rom, but my question is not specific to it).

share|improve this question
1  
Interesting question, and I just had the same. I only found apps triggering this depending on signal quality; "funny" thing is I had this stalling at full signal, so this doesn't do. But if you'd accept that as a work-around, or something to try (including a Tasker profile), you easily find a long answer via my profile page. Watch my questions for cell standby -- don't worry, I didn't ask to many here :) –  Izzy Oct 9 '12 at 6:01
    
Hi Izzy, it was definitely an interesting read and it gave me a few ideas :) –  UncleZeiv Oct 9 '12 at 22:44
add comment

2 Answers 2

You can periodically check status of real connection using HTTP GET by Tasker. You can restart the Data again by Tasker in case connection is stalled.

But, its down side is that it'll drain battery faster.

share|improve this answer
    
I guess I'll try this. Are you suggesting to just send a request to a random server, e.g. Google? I wonder what kind of impact it would have on the battery to check for this, say, every 5 minutes, considering that I'm keeping my mobile data always on with full sync. (Also, it's not that much of an issue given that I always keep it in charge at work). –  UncleZeiv Oct 9 '12 at 22:37
    
@UncleZeiv Yes, you can trust Google. If not, do check with multiple hosts. BTW, I don't have idea how much battery juice would a HTTP GET drain (it varies depending on system). Do test it on your device. And, if you always keep your device in charging state, battery draining shouldn't be an issue. –  Sachin Shekhar Oct 10 '12 at 0:42
    
@UncleZeiv I'd guess if you're either at full sync it shouldn't make too much difference -- especially if your device is always on the charger. If that works out, consider posting that Tasker profile as an answer -- there are certainly more interested people who could also run it with different settings (e.g. checking all 15min only) if not continually charging :) You could even have two profiles with the same task but different interval, one with "any power connected" and one with the same but inverted, if concerned about battery drain. –  Izzy Oct 10 '12 at 6:09
add comment

Take a look at apps like Connection Checker or Connection State Notifier

YMMV, it seems to work well for some people whereas not so much for others.

share|improve this answer
    
Hi Sparx, these seem to address a slightly different problem, that is completely losing data connection or changing connection type. In my case, I stay connected, but any Internet request fails. Plus, Connection Checker tries to solve the problem by entering and exiting airplane mode, which is a bit too drastic for me (it requires re-entering the pin number!) given that just switching mobile data on and off suffices. –  UncleZeiv Oct 9 '12 at 22:36
    
I think they work on the same principle suggested by Sachin - pinging a server of choice; if no response, then the data connection is cycled. So even if you have a data connection (shown as connected), but it can't reach the server, it ought to cycle the connection. The notifier at least should help by at least letting you know that there is a connectivity problem, so tapping a widget to turn off / turn on data (loads available) should be an easy thing to do. –  Sparx Oct 10 '12 at 11:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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