Hostmode information on Kantronic TNC
  ------------------------------------------------------------------
  : This file describes the HostMode on the  Kantronics TNC.  This :
  : file is issued by LA6GHA, Bob, but unfortunately the author is :
  : unknown. Many thanks to SM7OYP for his help.                   :
  :                                                73's de LA6GHA  :
  ------------------------------------------------------------------
                    KANTRONICS HOST MODE OPERATION
                   --------------------------------
In order to operate in the Host mode with Kantronics TNC, you must first
set the Intface command to Host.  After this accomplished,  it  will  be
necessary to perform a soft reset in order 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 Hostmode, be sure to give the command PERM.
(Unless you have battery-backup).
You will also need to set the abaud command 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 asterisk is  entered,  the  TNC  will  then  immediately  enter
Hostmode. While operating Hostmode,  your program must use hardware flow
control  (RTS/CTS).  Software flow control is not possible in Host mode.
In the KAM, Host mode only applies to the packet mode (v 3.05 and lower)
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 as valid data,  the
Host must replace this character with a special sequence,  consisting of
a FESC  ($DB)  by a  TFEND  ($DC).  One other special  sequence  may  be
required in the event a  FESC  ($DB)  characters 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 off command 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 mode byte is a "D", the TNC
will consider the data as data to be transmitted on the  specified  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 byte 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 as
either 1 or 2, but this is only used on those commands that are specific
to a port. This would include the connect and disconnect commands.  When
using 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 the 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 sent out unproto.  (See  the
section on the KAM HF modes for more information).  For commands that do
not not involve a specific port or stream, the port and stream bytes are
ignored, but must be specified.  In the 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 were entering the  command  from  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  carriage
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.
KAM HF MODES
When operating non-packet modes  (i.e., RTTY, ASCII, AMTOR, or CW)  with
the KAM, a few additional Host to TNC frames are required.  First select
the mode with the standard command structure as described  above  (e.g.,
FEND C2ARTTY 75 FEND).  Data that you  wish  to  transmit to  the  other
station should have command byte "D", port byte "2", and stream byte "0"
Special Host frames for these modes are:
        FEND T FEND          Enter transmit mode
        FEND E FEND          Enter receive mode when buffer empty
        FEND R FEND          Enter receive mode immediately
        FEND X FEND          Return HF port to packet mode
        FEND CTRL-X FEND     Clear the transmit buffer in KAM HF
TNC TO HOST COMPUTER
Communication from the  TNC  to the Host also occurs in blocks which are
delimited at beginning and end with FEND characters ($C0).
After the beginning  FEND,  the next character is  the  status  byte.  A
status byte  "C"  is a response to a command  from  the  Host  with  the
command byte "C".  A status byte of  "D"  indicates that  the  data  was
received on a connected stream  (see the section  below  on  the  KAM HF
operation).  "M" in the status byte means that the data in this block is
the result of the monitor commands.  A status byte of  "S"  is a message
caused by a  change  in  the  link  state.  Such  messages  include  the
***DISCONNECTED, and FRMR sent.  A special "S" block of data consists of
two FEND characters, the characters S00 and another FEND character. This
indicates that the TNC has performed a  soft  reset,  and  all  existing
connections (if any) are not longer valid. This is equivalent to the TNC
having just been turned on.
A data block with the  status  byte  ***connect request.  A  block  with
status byte  "T"  is the result of the trace command.  Port  and  stream
bytes  (defined below)  are valid for "D" and "S" blocks,  but only  the
port byte is valid for "T", "M",and "R" blocks.  The port  byte  follows
the  status  byte,  and  will  contain  the  port  number  the  specific
information is from.  This will be a  "1"  if the  TNC  is  single  port
operation,  or a "1" or "2" if in dual port operation.  When  using  the
KAM,  the VHF port is indicated by a port byte of "1".  The stream  byte
follows the port byte.  The stream byte will be "A"-"Z" for data on  the
connected streams.
Data being sent to the  Host  which is not connected data will have  the
stream byte set to "0".  If the TNC returns a "C" status block  with  no
data, this indicates that the command was accepted.  This will occur  on
connect and disconnect  commands.  A "T"  block  from  the  Host  (trace
information) is raw data, and not a hex dump of the received packet. The
kiss transparency  (FESC, FEND, and TFESC)  described  above  is  always
applied to all blocks.
HF MODE OPERATION
When using a non-packet mode on the HF port of the KAM, received HF data
will be sent to the Host with status "D", port byte "2", and stream byte
"0".  Each received character is sent from the  KAM  to the  Host  in  a
separate block.
When operating AMTOR mode A,  another KAM to  Host  block  is  possible,
indicating the current status of your station  (IRS or ISS).  The  block
has status byte of "I", port byte "2", and the stream byte indicates IRS
("0") or ISS ("1").  This block will be sent whenever there is a change.
When operating in the AMTOR mode A (ARQ) the KAM will send a  "S"  block
containing information pertinent to the link.  For  instance,  when  the
link is established, the KAM sends a "S" frame with the message <LINKED>
or <LINKED TO xxxxxx>.  "S" frames  are  also  sent  indicating  a  link
failure,  or anytime the KAM returns to amtor standby.  This  can  occur
when the other station breaks the link, or if the link fails due to poor
propagation.
When receiving NAVTEX, the KAM does not send any information to the Host
until it has received a proper  NAVTEX  header  for a  message  that  is
vaild to be printed  (see the NAVTEX section of the operations  manual).
The header will be sent to the Host in a single block. After the closing
NNNN of the message if the number of errors received exceeds the  NAVERR
setting,  an error message will  be  sent  from  the  KAM  to  the  Host
indicating ***too many errors*** and the message number.  This  will  be
sent in a  "D20"  frame and not as a  status  frame.  This  allows  this
message, to be stored in the file, if you are capturing the  HF  channel
to disk.  This message will also be sent if the link  fails  before  the
closing of the current message.
<EOT - End Of Text>

 

Ritorna a Software Radioamatoriale by IW3FQG