TCP/IP connection timeout?

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.

  1. NetOS 5 and 6 - no problems.
  2. 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!

-Erik

not sure if it’s relevant, but the

NAIpSetKaInterval()

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.

Thanks,
-Erik

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.

Thanks,
-Erik

After much much testing:

  1. When connected through a router, it times out in 5-25 minutes, depending on the router.
  2. A LAN connection never times out.
  3. I tested NetOS 6.3 and NetOS 7.4 and the difference is that NetOS 7.4 uses multicast memberships at 204.0.5.128 (which I assume is ADDP).
  4. Keep-Alives don’t make any difference.

Questions:

  1. Can the multicast cause disconnects?
  2. Is this a known bug in NetOS?

-Erik

Hi,
if you still having problem with TCP connection timeout, you can use select function.

for example:



fd_set read_set;
struct timeval wait;
wait.tv_sec = 60; //-- wait for 1 second --
wait.tv_usec = 0;

FD_ZERO(&read_set);
 FD_SET(rcvdata.fd, &read_set);   // recvdata .fs is socket number

while(1)
	{
		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
        {
			goto QUIT;
        }

		ccode = recv(rcvdata.fd, rcvdata.data, DATA_BUF, 0);	// read data
		if (ccode <= 0)
		{
			goto QUIT;
		}
		rcvdata.data_len = ccode;

		ccode = tcipRecv(&rcvdata);				// handle data
		if (ccode < 0)
		{
			goto QUIT;
		}
	}