Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Keeping TCP connection open with CR850


PPeters Sep 16, 2009 09:05 PM

I am having difficulty with our Vodafone network here in New Zealand cutting off our GPRS data connections.
We have experienced this with a number of hardware and modem combinations and the only solution seems to be to reset the modem to re-establish the connection.

I am now starting to deploy the CR850's with Motorola G200 modems on a dedicated APN. I have been reading the CS-GPRS notes for some tricks to see if the TCP connection can be restarted by the logger when it is lost. It would appear that this is so but I am not sure on the procedure. The notes under "7.3 Keeping the connection open" suggests CSI can help further.

can you provide any additional solutions?
In the past we have switched the modem off every 3 hrs via relays to avoid the modem lock ups.

Thanks


aps Sep 17, 2009 10:34 PM

That section of the CS-GPRS manual describes the fact that the logger will automatically restart the PPP connection if there is a no TCP traffic detected and a number of connectivity tests fail. This process can take up to 30 minutes to detect a dead connection though.

If you want to speed up this process you can implement code in the logger to independently check connectivity. In the last couple of generations of operating system there is now a ping function (pingIP) which you could use to ping any reliable remote server at regular intervals. Alternatively if IP connected Pakbus devices are involved you could send out a Hello message (using Broadcast) and then check the route exists to the the remote PB device (using route).

If these tests fail you can close the PPP connection using PPPClose and then PPPOpen to remake the connection.

Now it may actually be that your connection is being broken at a lower level than the TCP/IP level. On some networks your GSM registration can be terminated for instance and most modems will not remake that automatically.

In section 6 of the CS-GPRS manual it mentions a method of tagging a GSM reset command (AT+CFUN=1) onto the front of the dial string. This "should" restablish the GSM link first before the PPP connection is made so it would be worth adding this too, so that if you detect a broken connection you reset everything before making the PPP connection again. Otherwise if the underlying GSM connection has been lost, the logger can get stuck in a loop trying to open the PPP connection but just getting error responses from the modem.


PPeters Sep 17, 2009 11:00 PM

Thanks for the suggestions
sounds like I have some options to try

much appreciated

Log in or register to post/reply in the forum.