HOST
28
Kantronics Host Mode Operation
To operate in the Host Mode with a Kantronics TNC you must first set the INTFACE command to
HOST. After this is set, it will necessary to perform a soft reset to enter the Host Mode. This may
be accomplished by typing
RESET
at the
cmd:
prompt. If you want the TNC to always operate in
the Host Mode, be sure to give the command PERM. You will also need the set the ABAUD com-
mand to the appropriate baud rate for your terminal. If the ABAUD command is not set, the TNC
will run its normal autobaud routine, looking for an asterisk (
*
) from the keyboard. When the as-
terisk is entered, the TNC will then immediately enter Host Mode. While operating Host Mode, you
program must use hardware flow control (RTS/CTS). Software flow control is not possible in Host
Mode.
Communication Format
Host computer to TNC
Communication from the host to the TNC must occur in blocks. The block of data is delimited with
a FEND character ($C0) at the beginning and end. If the FEND character appears within the block
of valid data, the host must replace this character with a special sequence, consisting of a FESC
($DB) followed by a TFEND ($DC). One other special sequence may be required in the event a
FESC ($DB) character is required in the data field. This is accomplished by the special sequence of
a FESC ($DB) followed by a TFESC ($DD). These special sequences are the same used in the KISS
code, as implemented by Phil Karn, KA9Q.
After the opening FEND, the next character is the command byte and will indicate the type of com-
mand being given to the TNC. The permissible characters in the command byte are C, D or Q. For
the
KAM
only, there are some other combinations used for non-packet HF Mode operation. These
will be covered later.
A 'C' command byte indicates a command that the TNC will interpret as if it were in the Command
Mode. If the command byte is a 'D', the TNC will consider the data as data to be transmitted on
the specific port and stream. The letter 'Q' in the command byte will cause the TNC to exit the
Host Mode and return to Terminal Mode.
The next byte is the port byte. This must be used with every block of type 'D' to signify which port
(1 or 2) is to be used for transmission of the data. Type 'C' blocks must always specify this byte as
either a 1 or 2, but this is only used on those commands that are specific to a port. This would in-
clude the CONNECT and DISCONNECT commands. When using the
KAM
, the VHF port is selected
by a port byte of '1' and the HF port is '2'. Single port units use port byte '1'.
The fourth byte is a stream byte. This byte determines which stream (A – Z) the TNC will use for
the data. If the stream byte is 0 for a data packet (command byte D), the data will be send out
UNPROTO. (See the section on the
KAM
HF modes for more information.) For commands that do
not involve a specified port or stream, the port and stream bytes are ignored, but must be speci-
fied. In these cases, you should address port 1 stream A.
After these four header bytes, the structure of the block for a command is exactly the same as if
you where entering the command from the Terminal Mode of the TNC. If entering data to be
transmitted, simply place the data in the following bytes. Note that commands do not need a car-
riage return included in the data portion of the packet.
After the data or command, terminate the information from the host with a FEND ($C0) character.