I have had a problem since I switched to NetOS 7 (from 6). On some networks (particularily government ones), there appears to be some sort of connection timeout. The situation is this:
Establish a connection from the DigiME to a remote client.
- NetOS 5 and 6 - no problems.
- NetOS 7 - if there is no data passed within a time period (~5 minutes), it will disconnect.
I have both versions working at the same sites. I have also switched the image on a NetOS6 to NetOS7 and NetOS7 to NetOS6. The problem follows the OS version.
What is interesting is that there appears to not be an issue with half the networks (including the one here at the dev lab). Sending a device that works to a problem site immediately shows the problem. Bringing that device from a problem site to a non-problem site stops the problem.
The sites that have issues are in Pennsylvania and Kentucky. Since I am in Minnesota, it is difficult and expensive to work on this. Another note, most of the problem sites have standard Linksys gateways and are plugged directly into them. Same here and I don’t have the problem.
I have been pulling out what is left of my hair for two months on this. HELP!
not sure if it’s relevant, but the
call may be helpful.
Unfortuately, no. That is for the keep alive interval. I cannot use Keep Alives because a lot of these use satillites.
Are all the Linksys gateways the same software version and configuration?
Is it possible that the gateways have a configurable connection timeout, which is set on some sites but not others? (I actually implement this on our products, to avoid lockup on network failures)
We have been working to determine that - hence my other question about keep-alives.
if you still having problem with TCP connection timeout, you can use select function.
struct timeval wait;
wait.tv_sec = 60; //-- wait for 1 second --
wait.tv_usec = 0;
FD_SET(rcvdata.fd, &read_set); // recvdata .fs is socket number
ccode = select (FD_SETSIZE, &read_set, (fd_set *) 0, (fd_set *) 0, &wait); // wait for error/timeout/recieved data
if (ccode <= 0) // error or timeout
ccode = recv(rcvdata.fd, rcvdata.data, DATA_BUF, 0); // read data
if (ccode <= 0)
rcvdata.data_len = ccode;
ccode = tcipRecv(&rcvdata); // handle data
if (ccode < 0)