• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP] Connection State Checker

Search This thread

danielherrero

Senior Member
Oct 3, 2006
3,280
247
Madrid
www.softwaredhr.es
HISTORY

V1.1 [2009-10-05]
1) Options dialog to change timeout to run the program automatically (10 by default) and web server to reach (www.google.com by default)
2) Option to reset statistics.
3) When the gui is opened its auto-refreshed automatically each 2 seconds
3) Minor fixes

V1.0[2009-10-04]
1) Initial release.

History
Hi
I ve developed a little program to solve a problem I ve many years ago. I use direct push so I need a permanent connection. This is achieved using activesync (direct push) or setting a connection as always on.
PROBLEM TO SOLVE:
Many times a connecion is stablished minutes or hours ago. But it doesnt work correctly. I dont know if the problem is in phone operator system, or in the device or some roms. Simply the connection is corrupted. If you try to suf a web it doesnt work. Clicking "sync" in activesync keeps rolling for ever. So I ve to close the connection manually (hang button long press) and stablishing a connection again. And then all works again
WHAT I SEARCHED AND DIDNT FIND:
1)A program that tries to reach a server (www.google.es) each x minutes. If there is an active connection but cant reach it then kill the connection and stablish it again. The program doesnt download the page content. Simply reach the server so very little data usage (a few bytes each time)
2) very little, no cpu consuming and no resident. Windows should run it each x minutes. Do its job in a few milliseconds and exit.
3) perform its job even if the device is suspended..
4) So I wrote my little program. It works correctly.
5) If the phone is in fly mode then it skip its job
USAGE:
Just install. No need to run it manually. It installs too a little GUI program (ConnectionStateCheckerGUI) to see some statistics (stored in the registry) like number of checks, corrupt connections, last check, etc. You can set the timeout (10 minutes) and server (http://www.google.com) in the registry.

My job needs a 100% safe real time mailing working. This little program guarantees it and maybe there are other people in my situation.
Greetings
Dani

pd: The black background is because of omnia2 skin. In other devices is a tipical white dialog.
 

Attachments

  • ConnectionStateChecker_1.1.CAB
    32.5 KB · Views: 834
  • conn1.jpg
    conn1.jpg
    54 KB · Views: 537
  • conn2.jpg
    conn2.jpg
    29 KB · Views: 323
Last edited:

danielherrero

Senior Member
Oct 3, 2006
3,280
247
Madrid
www.softwaredhr.es
Thanks :)
Sure, you can use, upload, distribute or what you want with it :)
...and if someone has any suggestion....
First I was going to do icmp ping instead of http get but my phone company (and probably other) has blocked pings....
Greetings
Dani
 

UncleBeer

Senior Member
Jul 11, 2008
381
24
Any chance of a Today screen icon? That would be more helpful than having to call the program in order to see connection status.
 

cumisquid

Member
Jul 25, 2009
7
1
Jakarta
Thank you for this nice piece of software.
However I have few questions, right after installing and soft-resetting, then changed web reference to www.google.com and interval to 1 minute, it keeps saying that the Last Result is KO, and only Connection Fixed has the increment.
What makes it odd, is that the connection is actually OK, I can connect to www.google.com via UCWeb and Slick is running too.
This is quite bugging me, however since I only installed it for less than an hour, I'll report again whether my connection would be kept alive permanently or not by this program.

(Dopod 818Pro aka HTC Prophet/WM6.1/My Buble Blue ROM by varanusvincent)

Andi
 
Last edited:

danielherrero

Senior Member
Oct 3, 2006
3,280
247
Madrid
www.softwaredhr.es
Thank you for this nice piece of software.
However I have few questions, right after installing and soft-resetting, then changed web reference to www.google.com and interval to 1 minute, it keeps saying that the Last Result is KO, and only Connection Fixed has the increment.
What makes it odd, is that the connection is actually OK, I can connect to www.google.com via UCWeb and Slick is running too.
This is quite bugging me, however since I only installed it for less than an hour, I'll report again whether my connection would be kept alive permanently or not by this program.

Andi
Hi
Please dont remove "http://" because this is used by WinInet to choose the correct destination. Leave http://www.google.com (or any other site but using http://) and it will work again.... :)
Dani
 

cumisquid

Member
Jul 25, 2009
7
1
Jakarta
I did, it's http://www.google.com, with the http://
The connection is still KO (though Slick is up and running smoothly)
Does it matter if the GPRS connection has the proxy setup?

And when I tried disconnecting the GPRS, and then use the Check Now, it won't reconnect.

Oh, btw, the Last Check field is always empty.

Andi
 
Last edited:

danielherrero

Senior Member
Oct 3, 2006
3,280
247
Madrid
www.softwaredhr.es
I did, it's http://www.google.com, with the http://
The connection is still KO (though Slick is up and running smoothly)
Does it matter if the GPRS connection has the proxy setup?

And when I tried disconnecting the GPRS, and then use the Check Now, it won't reconnect.

Andi
Yes, for sure is related with GPRS Proxy. Let me take a look at this.....
 

cumisquid

Member
Jul 25, 2009
7
1
Jakarta
Dani,
Sorry for the late reply. I have just finished installing and voila! The Last Check is not empty anymore. I have changed the web reference to http://www.google.com, and interval still to 1 minute, and guess what, now the Last Result is OK!! and Connections OK is now the one who gets the increment. So yes! It works! When WM finished loading up, and when I use the Check Now function, it is now connecting the GPRS automatically.

So I supposed it would close and then reconnect GPRS if ever the connection gets corrupted, right?

Once again, Bravo!

Andi
 

cumisquid

Member
Jul 25, 2009
7
1
Jakarta
Just wondering really, if I can get it scheduled for certain time only? Or I can get it stop, perhaps? It would be better than filling in the interval time of 360 minutes every night? :)
 
Last edited:

cumisquid

Member
Jul 25, 2009
7
1
Jakarta
Dani,
Just find another thing here.

I did say it does make an automatic connection, it *is* connecting, however, i have just found out, it does *not* end up connected at all.
What I meant by connecting, the antenna icon is having two arrows and the small box with G in it, but it won't be connected at the end of the animation.

The Connection Fix number is added, but since there is no connection in real.
In the end, I still have to use UCWeb or Slick to get connected.

-------edited

Okay, strange enough, I changed the interval to 5 minutes, and after awaited for 2 times trial, it did finally made the connection. Hm.

-------edited again

I did try certain things again. I changed back the interval to 1 minute. Then I tried the following:
* Changed the web reference to http://wap.telkomsel.com (the provider's default wap page), 3 times trial, all failed.
* Changed the web reference to http://www.google.co.id, 2 times trial, finally connected.
* Changed the web reference to http://www.google.com, 3 times trial, all failed.
* Changed the web reference to http://208.67.219.230/ (www.google.com ip address), 3 times trial, very short timed trial, all failed. I supposed it does not accept IP address as a reference?

I'm not an expert in this area, however, it does seem to me that it's related to session time-out thing.
Once the time-out reached, it drops the on-going connection trial. I concluded this because I checked my Data plan's balance, and nothing's to be deducted during the failed session.
So the work around I finally do is to change the registry at HKLM/Comm/ConnMgr/Providers/{myGPRSconn-hash-number}/title_of_conn/AlwaysOn value to decimal 1.
After that, it would get the connection established, even if it seems it doesn't receive any reply from the referred web, get passed all the session time-out variable, until the complete handshake (if this is the correct term).

Andi
 
Last edited:

NYLimited

Inactive Recognized Contributor
Jan 5, 2008
3,816
2,285
40.75659° N 73.98626° W
Many times a connecion is stablished minutes or hours ago. But it doesnt work correctly. I dont know if the problem is in phone operator system, or in the device or some roms. Simply the connection is corrupted. If you try to suf a web it doesnt work. Clicking "sync" in activesync keeps rolling for ever. So I ve to close the connection manually (hang button long press) and stablishing a connection again. And then all works again
Hello Dani,

It has been some time since you posted here. Are you still supporting or working on this app? If you are I would like to ask a question or two having tried the app on a TMOUS HD2 recently.

A lot of the time the app works exactly as you intended - perhaps 50% or better improvement. But sometimes it is not able to disconnect and re-establish the connection for some reason. I find that it will end up in a near permanent KO result loop.

At these times the data connection is established (H or 3G) but no app can successfully connect (no email, no browser). Your app will continue trying but is not successful.

At such a time if I manually drop the data connection (via Touch X action screen, for example) the connection can be re-established within 15-30 seconds of an app trying for data. It is not immediate - some app will have to ask for a data connection and it takes some 15+ seconds before it can successfully continue.

What I am wondering is how your app is trying to do this and how is the data disconnect of Touch X different. I hope I explain it clearly.
.
 

danielherrero

Senior Member
Oct 3, 2006
3,280
247
Madrid
www.softwaredhr.es
Hello Dani,

It has been some time since you posted here. Are you still supporting or working on this app? If you are I would like to ask a question or two having tried the app on a TMOUS HD2 recently.

A lot of the time the app works exactly as you intended - perhaps 50% or better improvement. But sometimes it is not able to disconnect and re-establish the connection for some reason. I find that it will end up in a near permanent KO result loop.

At these times the data connection is established (H or 3G) but no app can successfully connect (no email, no browser). Your app will continue trying but is not successful.

At such a time if I manually drop the data connection (via Touch X action screen, for example) the connection can be re-established within 15-30 seconds of an app trying for data. It is not immediate - some app will have to ask for a data connection and it takes some 15+ seconds before it can successfully continue.

What I am wondering is how your app is trying to do this and how is the data disconnect of Touch X different. I hope I explain it clearly.
.

Hi
Let me took a look at this :)