How to decide if GPRS service is down in a C++ application (UDP socket)
-
Hi there, I have an application that uses UDP socket to exchange packets with some mobile devices (we have modem and SIM cards in these devices and use UDP socket to connect to the C++ application). the application also has a TCS socket that connects to a server that connects to the same mobile device through radio system. Here we try to send some messages to the devices using GPRS and if it failed to go out (no ACK was sent from the device) we retransmit message through radio. my question is that I need to know if the GPRS system is down or not and if it is down I do not try GPRS first and wait for ACK to come back (delay in messaging). please note that we have heart beat from devices to the application every 45 minutes so I can't use heartbeat as an indicator of GPRS being down. also in slow time of the day (midnight to 5:00 am there is not much trafic between the devices and application. what is the best way here to decide if GPRS is down? Thanks for help, Nahitan
-
Hi there, I have an application that uses UDP socket to exchange packets with some mobile devices (we have modem and SIM cards in these devices and use UDP socket to connect to the C++ application). the application also has a TCS socket that connects to a server that connects to the same mobile device through radio system. Here we try to send some messages to the devices using GPRS and if it failed to go out (no ACK was sent from the device) we retransmit message through radio. my question is that I need to know if the GPRS system is down or not and if it is down I do not try GPRS first and wait for ACK to come back (delay in messaging). please note that we have heart beat from devices to the application every 45 minutes so I can't use heartbeat as an indicator of GPRS being down. also in slow time of the day (midnight to 5:00 am there is not much trafic between the devices and application. what is the best way here to decide if GPRS is down? Thanks for help, Nahitan
-
I do not understand what you just said (design/implementation/cost problem?). If you do not have a kind of connectivity status, then add one by implementing a reasonable fast heartbeat. Cheers
Webchat in Europe :java: (only 4K)
Thanks for your reply, I might not explained it properly but having all the devices send fast heartbeat means a lot of data traffic and pay for that and when you have like 1000 device and want to pay more than 5M per month or something like $15/month for GPRS usage is not acceptable by customers. so fast heartbeat is not a solution. I was/ am looking for a better way of examining the healthiness of the GPRS data trafic through UDP socket. Thanks for ideas in advanced. Nahitan
-
Thanks for your reply, I might not explained it properly but having all the devices send fast heartbeat means a lot of data traffic and pay for that and when you have like 1000 device and want to pay more than 5M per month or something like $15/month for GPRS usage is not acceptable by customers. so fast heartbeat is not a solution. I was/ am looking for a better way of examining the healthiness of the GPRS data trafic through UDP socket. Thanks for ideas in advanced. Nahitan
Ok, sounds like a design or cost problem. Unfortunately, I see no other technical solution than the one mentioned before. The concept of a heartbeat is more or less the same regardless of using UDP or TCP. If peer A wants to know about the status/availability of peer B, it either has to receive a "message" from B in regular intervals (and therfor knows that peer B is alive) -or- when there is no regular traffic to piggyback the heartbeat then one of the peers has to initiate (additional) heartbeats in reasonable intervals. For example an IRC server uses regular ping/pong messages every few minutes to find out about the connection status of its chat clients. Regarding the costs, at the end of the day a better service will cause more traffic. You could offer your customers maybe a cheap basic service and an advanced service with more features. Hope this helps /M
Webchat in Europe :java: (only 4K)