I am using genuine Arduino Nanos with Ethernet shields to monitor several things at remote seismic monitoring sites (solar panel voltages, intrusion, water in the enclosure, etc.). We are using wireless Ethernet routers to send seismic data from the stations to central receive nodes with internet access. At each node we have a Linux box running an NTP server. Occasionally the wireless routers "go dumb" and lock up requiring a site visit just to power cycle the router, (several hours driving and usually an overnight motel bill). I would like to have the nano poll the NTP server once per hour, if it does not get a response start polling it more often, (once per minute). If after say 30 minutes there is no response, I would like it to reset a relay attached to the wireless router to power cycle it. If the time shows back up, return to normal operation -- else, sit and wait.
I have the code to monitor the NTP server and it works. The problem I am having is figuring out how to recognize when there is no response and set up the different time delays.
Pinging the Linux machine at the node is not an option because we have set it up not to respond to ping for security purposes. Yes, recently hackers have figured out how to hijack the wireless routers and get into a universities network through a seismic network. It hasn't happened to us and we want to keep it that way -- paranoia is at a high point right now.
I'm sure this is possible, I've looked to see if anyone else has done something similar but I haven't found it. Any ideas?