PACKET
16
packet of information. This is the major difference between version 1 and version 2. The connect
attempts would then continue for the number of retries set in the TNC and if no response was re-
ceived from station B after all of the above, station A would disconnect and dump the packet UN-
PROTO. The parameter RELINK can be turned OFF to avoid the reconnect attempt.
In either version 1 or version 2 another interesting feature of packet is the ability to automatically
reestablish a connection. For instance, station A is connected to station B and has one frame out-
standing. Station B disconnects without station A knowing it (perhaps a power failure, double dis-
connect or even a timeout (retry count exceeded)). The first time station B receives the outstand-
ing packet from station a he will send a disconnect message to station A. When station A receives
this, station A automatically issues a connect request to station B and the connection is re-estab-
lished to pass the outstanding traffic.
Flow Control
The flow control commands insure that the TNC gets everything that is sent to it by the computer
and that the computer gets everything the TNC sends it. When the computer sends the TNC data,
the TNC stores this data in a buffer until it can packetize it, send it and get acknowledgment.
When the TNC sends the computer data, it also stores in a buffer until it can be processed, stored
to disk, sent to printer, or whatever. This buffer area is only so big, if more data is sent than will fit
in the buffer, it is lost. To avoid this, the two devices can tell each other to start and stop sending
data. This is called Flow Control and can be accomplished in two ways: software and hardware.
Which way you implement, this depends on the capabilities of your computer communications pro-
gram and personal preference. The cable between your computer and TNC must also be wired ap-
propriately.
Software Flow Control
Software flow control sends special characters on the TXD and RXD lines of the RS-232 cable.
These are the same lines used for sending regular data between the TNC and computer – Soft-
ware flow control normally send a Ctrl-S to stop data and a Ctrl-Q to restart data. When a buffer
gets close to full the device will send a Ctrl-S and expect the other device to stop. When the buffer
gets emptier, it will send a Ctrl-Q to tell the other device to send more data. How full or empty a
buffer is when the special characters are sent, is determined by the program. But, since the regu-
lar data lines are being used a Ctrl-S sent from the keyboard will also stop data. And likewise, if
there is a Ctrl-S in a file being sent, data flow will stop until a Ctrl-Q is received.
XFLOW needs to be turned ON for the TNC to use software flow control. XOFF determines the
character sent by the TNC to stop the flow of data from the computer, and the XON character re-
starts the flow. The TNC expects the computer to send the STOP character to stop data and the
START character to restart data. To use software flow control these commands would be set as fol-
lows: XFLOW ON, XOFF $13, START $11.
In the Transparent Mode two more commands are provided that make it possible to send or re-
ceive these special characters and still use software flow control. TXFLOW controls flow control
sent by the TNC to the computer and TRFLOW controls what the TNC expects from the computer.
In both these commands are ON (and the above commands are set as stated), then software flow
control will take place in both directions to and from the TNC and computer. But if you are in
Transparent Mode sending a file, the computer is not going to be telling the TNC to stop and start
since you are sending the file. But if there is a Ctrl-S in the file, the TNC will think the computer is
telling the TNC to stop and will not send any data to your computer until it receives a Ctrl-Q (even
if you have completed sending the file). To solve this problem, you can turn TRFLOW OFF and
send all characters and turn TXFLOW ON, so the TNC will still tell the computer when to stop and
restart. On the other hand, if receiving a file, set TRFLOW ON and TXFLOW OFF.