By UncleZeiv


2012-10-09 00:47:58 8 Comments

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).

2 comments

@Android Quesito 2012-10-09 10:24:06

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.

@UncleZeiv 2012-10-09 22:37:55

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).

@Android Quesito 2012-10-10 00:42:41

@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.

@Izzy 2012-10-10 06:09:27

@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.

@Sparx 2012-10-09 09:11:43

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.

@UncleZeiv 2012-10-09 22:36:13

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.

@Sparx 2012-10-10 11:38:26

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.

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] Mobile data on but not working

  • 2015-12-11 08:18:50
  • Mick
  • 26488 View
  • 9 Score
  • 2 Answer
  • Tags:   mobile-data

3 Answered Questions

0 Answered Questions

0 Answered Questions

1 Answered Questions

Can't connect to mobile internet with CyanogenOS 13

2 Answered Questions

0 Answered Questions

Use data connection when WIFI has no internet access

2 Answered Questions

0 Answered Questions

Sponsored Content