Constantly losing data connection

An app like this already exists but I didn't have any luck with it in Froyo:

Connection State Notifier

Associated Android Forum Thread


Could you try it and see if it works for you? I could have set it up wrong.

I read about this app. But I am not sure this would help us, since our data connection (3G) never changes. The app it seems is for when 3G connection is dropped altogether.

We need something that can ping or check a server/host in the internet to make sure the connection is still active. (Keep-Alive)
 
I read about this app. But I am not sure this would help us, since our data connection (3G) never changes. The app it seems is for when 3G connection is dropped altogether.

We need something that can ping or check a server/host in the internet to make sure the connection is still active. (Keep-Alive)

Settings.apk already has a built in ping test. I wonder if we can use it. It is under Settings->Testing->Phone information->ping test. You can access it using launcherpro and creating a shortcut the the Testing activity under Settings.

Here is what the ping test does under the hood:

Process p = Runtime.getRuntime().exec("ping -c 1 www.google.com");
int status = p.waitFor();
if (status == 0) {
mPingHostnameResult = "Pass";
} else {
mPingHostnameResult = "Fail: Host unreachable";
}
} catch (UnknownHostException e) {
mPingHostnameResult = "Fail: Unknown Host";
} catch (IOException e) {
mPingHostnameResult= "Fail: IOException";
} catch (InterruptedException e) {
mPingHostnameResult = "Fail: InterruptedException";
}
 
Last edited:
The script is working!!!.
So I lost internet connectivity, I run the script and it restarted mobile network (3G).
But I think I have to change the wait time from 5 seconds to maybe 10 or 15 seconds.!!!

Now have to figure out how to schedule it and make this run in the background.
 
Last edited:
i have to agree with leslie. most of the time it is an application like battery savers that affect it my solution is the following.
dial *#*#4636#*#*
as soon as u press the last * it will go in to the hidden menu.
click on phone information and hit the "menu"/"settings" button and press "select radio band" the application will force close
go into phone info again n scroll down to 'set preferred network type' n change it to 'CDMA only' then back to 'CDMA auto(PRL)' . this will also fix the bug of the 'cell phone stand by' taking up more then 50% of the battery use. these changes arent permanent so you will have to repeat this after a reboot
 
I read about this app. But I am not sure this would help us, since our data connection (3G) never changes. The app it seems is for when 3G connection is dropped altogether.

We need something that can ping or check a server/host in the internet to make sure the connection is still active. (Keep-Alive)

If you read further down the thread, the last version of the program is set up to ping Google and notify you when it doesn't work.
 
Millas, the quicker way to do that fix is to just simply put your phone into Airplane mode for about a half a minute and then bring it out of Airplane mode.
 
The application posted did not work for me. Did anybody get it working??
Anyways I solved my issue using.

phoneprioritizer:
Scheduled Scripting App - Scheduled Reboots, etc... Phone Prioritizer App - xda-developers
This app can schedule a script to run a x number of minutes or hour. etc.

I put this in my script.txt
if ping -c 1 8.8.8.8|busybox grep -q '1 received'
then
echo $(date) - "Mobile Network is working">>/sdcard/phonePrioritizer/log1.txt
exit
else
svc data disable
sleep 10
svc data enable
echo $(date) - "Mobile Network is re-enabled">>/sdcard/phonePrioritizer/log1.txt
fi

-----------------------
It will create a log with
Thu Mar 17 11:28:43 EDT 2011 - Mobile Network is working
 
  • Like
Reactions: aldamon
Update: Your script works great as is. It toggles both 3G and Wifi. Thanks!
 
Last edited:
I use tasker to mimic this functionality

You can have it turn the 3g data on when wifi is off automatically and I have it set to turn on 3g every 15 minutes for 2 minutes then turn off.

This way I save battery and still get all my emails.

You can also have it periodically turn off 3g and turn it back on so you never really lose conectivity if you want to keep data on all the time.
 
Here is the log of the script. Lost internet connection around 1:20PM. The script detected it at 1:23PM. Renabled Data Network (3G). Internet was back the next time the script run the detection. :-)

As long as VM has no outages, this script will keep you connected with minimal downtime.

---------------Log------------------
Thu Mar 17 13:08:39 EDT 2011 - Mobile Network is working
Thu Mar 17 13:13:38 EDT 2011 - Mobile Network is working
Thu Mar 17 13:18:37 EDT 2011 - Mobile Network is working
Thu Mar 17 13:23:57 EDT 2011 - Mobile Network is re-enabled
Thu Mar 17 13:28:37 EDT 2011 - Mobile Network is working
Thu Mar 17 13:33:45 EDT 2011 - Mobile Network is working
---------------Log------------------

The only caveat of this script is if you do not have cell service. The script will try to renenable data service every single time. I need to find a way to detect if the phone is in airplane mode or if there is no service. Any ideas?
 
If airplane mode is on, nothing will happen if the script runs. Are you worried about battery draw?
 
The only caveat of this script is if you do not have cell service. The script will try to renenable data service every single time. I need to find a way to detect if the phone is in airplane mode or if there is no service. Any ideas?

Maybe have it stop and notify you repeatedly if it can't connect X number of times in a row?
 
Can I get more info on how to use the script? I've never run a standard script on my phone, is there an APK to install, etc?
 
Well if anyone fixes it, it more than likely will not be Virgin Mobile, it'll probably be LG.
 
Well I have been running the script every 15 minutes for about 1 day now. It has worked great. It re-established internet connection 3 times already.
2 times last nite around 3am and 5am.

I have never had such a persistent Internet connection as in the last couple days with VM. Hooorahhhhh
 
This cannot be a permanent solution. I really hope VM is working on it on their end.

I had this problem with my VM Intercept as well, and I have seen reports of this on Sprint forums as well. So I don't think it is specific to our phones or even VM.

It does seem like it happens a lot more to VM users though, but am not sure.
 
I had this problem with my VM Intercept as well, and I have seen reports of this on Sprint forums as well. So I don't think it is specific to our phones or even VM.

It does seem like it happens a lot more to VM users though, but am not sure.

I've owned a VM Intercept for 3 months before i switched to the Optimus, and i've been on sprints service for 4 years before that. The issue with the Optimus was immediately noticeable after a week or so of using it. I've been using smart phones back when windows mobile was the top dog, and have used the HTC hero, and the samsung moment on sprint prior to switching to the intercept on VM.

The issue that i have been experiencing is not normal. If the issue is bad data service/bad provisioning it would not be occurring at the rate that it does. Data service would be returned once you move to a better service area, or when congestion clears up. This should not require intervention from the user to get data service. This is a bug. The samsung moment was notorious for having data that would stop working and required a soft reset, and even that issue was not as annoying as what im experiencing on the optimus V. If a user has to build a script to ping data and reset it when ever it detect its not working (which is a great job by the members of this forum) then that is a serious issue that LG and VM need to address.

If you purchased a cheap new car from a car dealer that would require you to have to get out of the car and jump the battery to get it going again you wouldn't be happy. I think this issue needs to be brought to LG's and VM's attention. I have created a post on LG's own forum to bring this to their attention.


Every one whose unhappy should say so on the post i linked above. The more people that complain the more attention will be given to our issue.Some one should probably also bring this to VM's attention through their twitter account since i dont have one.
 

Trending Posts

Forum statistics

Threads
957,377
Messages
6,972,656
Members
3,163,780
Latest member
RohitPatidar57