I start a gprs bearer, launch a TCP/IP server, then sit and wait for client connections. THis all works fine. Except that after a day or few days, if there is no activity, I can not connect a client. The FSU20 does not receive any tcp connection events.
I have learned that the GPRS provider may be dropping the connection (the PDP context). So I have tried shutting down the TCP/IP server and the GPRS bearer and restarting them. However I still seem to run into the same problem. Trouble is I have to leave it a few days to see if it works or fails!
In the failed mode I can still connect via serial, AT+COTS gives me the provider, everything looks OK. I just can’t connect!
Any hints as to what will show me that the GPRS link is no longer valid? The at+cops still gives me the correct details in this failed mode. I have a CGREG handler and no events have been seen by that.
This will let you be notified when a whole lot of things happen (such as the network has forced a detachment of the modem). Have a look at section 3.18 of the R7.4 ADL User Guide…
But it only relates to the GPRS radio link - it tells you nothing about the IP link from the GPRS network out to the internet.
Operators do drop the IP link from the GPRS network out to the internet for various reasons at various times - and there is no specific indication to the mobile.
If you’re using a specific M2M service provider, they should be able to give you details of their policies on this (which may depend on the level of service you’ve subscribed) - but, if you’re just using a standard public network, such technical details are notoriously difficult to obtain (and probably aren’t guaranteed anyhow).
See: viewtopic.php?f=34&t=1106
As an aside on using “a standard public network” see also: viewtopic.php?f=34&t=2147
The only way to confirm that the IP link from the GPRS network out to the internet is still working is, as Madouc suggests, to do some kind of “ping”.
Thanks for the confirmation. This seems to be the only way, pinging something. It has worked for a number of days, before loosing the connections previously. But its not reliable.