<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
Hi<br>
<br>
We've made the following change to the TCP retransmit timer calculation
to account for the widely variable latency in GPRS/CDMA.  <br>
<br>
For those holding open longish sessions and sending data in drips and
drabs, you will find that the cellular networks will "virtually"
suspend the link after short periods of inactivity.  After this
suspension, there is often several seconds (as much as 8 seconds when
the network is under load)  before new packets will get through, let
alone carry a TCP ack back home.  The resulting retransmission storms
can cost a pretty penny.  Once the first packet gets through after the
wakeup, and the vitual data channel is awake, the latency drop away
remarkably and it doesnt take long for the automatic latency
calculation (NutTcpCalcRtt() to bring the Retransmission time back down
to very small.<br>
<br>
The change is shown below, which should only be used for slow and
variable networks.  Pre NutOS 3.9.5, the retransmission timer was fixed
and could be specified when creating the socket.  This method now only
provides the starting value.<br>
<br>
This is the sledgehammer option but works nicely where steady and cost
effective is more important than speed.  A more elegant and automated
solution would be welcomed.<br>
<br>
Regards<br>
Brett<br>
<br>
// Changes to library: tcputil.c, void NutTcpCalcRtt(TCPSOCKET * sock)<br>
<br>
// added RTTO_MIN such that the soonest a retrans may begin is longer
than 200ms after the previous packet<br>
// RTTO_MIN is new #define, value was 200<br>
// #define RTTO_MIN now set to 5000 or 10000<br>
// OLD VERSION:     sock->so_rtto = min (20000, max(200, (delta * 4
+ sock->so_rtto * 8) / 10));<br>
     sock->so_rtto = min (20000, max(RTTO_MIN, (delta * 4 +
sock->so_rtto * 8) / 10));<br>
<br>
<pre class="moz-signature" cols="72">-- 
-----------------------------------------------------------------
Brett Abbott, Managing Director, Digital Telemetry Limited
Email: <a
 class="moz-txt-link-abbreviated"
 href="mailto:Brett.Abbott@digital-telemetry.com">Brett.Abbott@digital-telemetry.com</a>
PO Box 24 036 Manners Street, Wellington, New Zealand
Phone +64 (4) 5666-860  Mobile +64 (21) 656-144
------------------- Commercial in confidence --------------------
</pre>
</body>
</html>