Author Topic: Monitor if Device is still "online"  (Read 827 times)

henry64

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Monitor if Device is still "online"
« on: September 23, 2013, 09:44:35 am »
Hi

I have an application running as a service 24/7 and I would like to know how I can monitor if the device is still alive, connected to the mobile network etc.

I have tried to run a timer to update and read signal strength but that doesn't seem identify that the device has been powered off or disconnected from the RS232.

Can you advice on how to monitor the device in a proper way?


Attached is the log file and a modified gsmdemo that polls for signal strength.

Thanks



Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Monitor if Device is still "online"
« Reply #1 on: September 23, 2013, 11:12:55 am »
Hello

Most easy way is periodically PING device with simple AT command:

nrGSM1.CmdSendAndWaitResult("AT<cr>");

If device replies "OK" it is connected.

If virtual port (for USB sticks ad adapters) is removed, TnrComm raises OnClose event.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

henry64

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Monitor if Device is still "online"
« Reply #2 on: September 23, 2013, 12:41:11 pm »
Okay, that could work, thanks.