GPRS timeout?

Hy guys,

I have an application built on a Q2686 modem wich practically is a TCP server waiting for messages from GPRS and then sending those on serial port, wait for a response and send the response over the gprs again. It acts like a gateway between TCP/IP(with public IP) and serial.

Now my question is … is there a timeout on the GPRS part, if no traffic occurs for a period of time, or something like this? My application reads only 3 times a day, and i’ve seen that the modem is sometimes disconnected from GPRS. Also the traffic is under 50 bytes.

I also made a reconnection mechanism…if a WIP_BEV_IP_DISCONNECTED is received my application closes the bearer, starts a cyclic timer and tries to reconnect…but sometimes it just cannot succeed. If i cut the power supply and reconnect the modem it’s all ok again…

Any advices ?
Thanks in advance.

I think if i’m not wrong there is a timer called mobile reachable timer, that is started when the Wireless CPU attaches to the GPRSnetwork, and is configuration dependant and when you don’t transfer any data and keep on attached to the GPRS network, the Mobile reachable timer will expire, and the Wireless CPU will be detached from the GPRS network. you can find more information in the 3GPP 23.060 spec.

The Service Provider may also time-out your PDP Context (without losing GPRS registration) - speak to your service provider for details.

Consumer (especially pre-pay or “pay-as-you-go”) tariffs can have very short timeouts - ten minutes or so.

A proper M2M service provider would be able to negotiate this as part of your service level agreement…

Sadly SLAs can be very expensive to negotiate at times. It really depends on your project size.
What I ended up doing is running a udp based server on the internet. The device then sends a udp packet and receives a reply from the server roughly every 30 seconds. If this handshake does not take place more than say 6 times, I drop the bearer and reestablish it. This does not need to be udp, it can also be tcp or http over tcp, e.g. a normal web server. Its far cheaper to get web hosting than it is to negotiate a SLA with a nasty provider. The benefits of udp however extend to things like hole punching and nat traversal too, so there are advantages.