Hi all,
I am using a RCM5400W to log data to a webserver using a TCP/IP connection, using the built-in 802.11 wireless link. I am trying to make the application robust to any kind of connection loss, whether the wireless link goes down or the socket is disrupted.
Basically, I am opening a socket on the webserver from the rabbit, and sending HTTP Get requests to instrument logging of the data.
Detecting the socket disconnection is easy - I just check for failed socket writes. I have successfully tested this independently of the wireless link. However, when I turn off my wireless router while the socket is open, the socket writes continue happily. I am checking the WIFI0 state periodically, and it remains in AUTH even though the router is down. I for the socket timeouts to occur, but nothing changed. Interestingly, when I turn the router back on, the WIFI0 state goes to SCANNING, and the socket finally fails.
I’m trying to understand why the state doesn’t change immediately after the wireless network drops out, and why the socket writes don’t fail. Preferably I would be able to detect the socket write failure immediately after the wireless network drops. Any ideas? Is there another way to reliably/quickly detect loss of the wireless network?
Thanks!
-Marc