Status of network devices
Posted on 2007-08-08
I am looking for some advice on the best way to know if a TCPIP device is online? We are developing an Access control system which consists of a Server that contains the database and also runs a service which is how the access controllers valadate cards from the database. The controllers which have the card readers connected and also trigger the door to open. There are two situations why we need to know if the controller is connected as follows
1 at the server end there will be a utility that shows how many controllers are online - this is so an offline controller can be detected and fixed
2 The controller needs to know if it is online otherwise it will default into its offline mode where it stores transactions to unload later. - ideally it would be best if the controller was aware it was offline before a card was presented otherwise it may be slow while it attemts to valadate the card then fails.
We have considered some form of polling either from the controller to the server, every second or so, the server will know that it hasnt received a poll from the device for over 2 seconds so its indication can show offline, the controller knows it didnt get a response form the server so it can fall into offline and continue to poll.
I doubt if polling is the best way to do this as polling was really used by 485 serial devices and I dont think it is appropriate for this sort of situation.
We also need to be minfull of introducing network traffic, and not using a method that get blocked on some peoples network - e.g Ping is often turned off on lots of networks.
I am keen for peoples suggestions and comments on this subject