Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to decide if GPRS service is down in a C++ application (UDP socket)

How to decide if GPRS service is down in a C++ application (UDP socket)

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++sysadminhelptutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nahitan
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • N 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

      M Offline
      M Offline
      Moak
      wrote on last edited by
      #2

      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)

      N 1 Reply Last reply
      0
      • M Moak

        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)

        N Offline
        N Offline
        nahitan
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • N 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

          M Offline
          M Offline
          Moak
          wrote on last edited by
          #4

          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)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups