



Das Anschlussprotokoll entspricht im Groben KISS. 
Die Daten, die die WX liefert werden KISS-mssig eingepackt, und
an die V24 geschickt. Die Daten sollten lesbare Zeilen sein.
DW speichert die letzten  n Pakete , gibt sie bei Bedarf mit einem 
Befehl aus und bertrgt sie auch an die Box.




           The KISS TNC: A simple Host-to-TNC communications
                                protocol

                          Mike Chepponis, K3MC
                            Phil Karn, KA9Q
[mit Anmerkungen von DG9EP]

				ABSTRACT

              The KISS[1] TNC provides direct computer  to  TNC
         communication  using a simple protocol described here.




[...]

    2.  Asynchronous Frame Format

         The "asynchronous packet protocol" spoken between the  host
    and  TNC  is  very simple, since its only function is to delimit
    frames. Each frame is both preceded and followed  by  a  special
    FEND  (Frame  End) character, analogous to an HDLC flag.  No CRC
    or checksum is provided [sind aber mglich, siehe SMACK und FlexCRC,
    DW untersttzt beides].  In addition,  no  RS-232C  handshaking
    signals are employed.

         The special characters are:

    Abbreviation            Description                    Hex value
       FEND                 Frame  End                         C0
       FESC                 Frame  Escape                      DB
       TFEND                Transposed Frame End               DC
       TFESC                Transposed Frame Escape            DD


         The reason for both preceding and ending frames with  FENDs
    is  to  improve  performance  when  there is noise on the asynch
    line.  The FEND at the beginning of a  frame  serves  to  "flush
    out"  any  accumulated garbage into a separate frame (which will
    be discarded by the upper layer protocol) instead of sticking it
    on  the  front of an otherwise good frame.  As with back-to-back
    flags in HDLC, 
    *** two FEND characters in a row should not be ****
    *** interpreted as delimiting an empty frame.  ****

    3.  Transparency

         Frames are sent in 8-bit binary; the asynchronous  link  is
    set  to  8 data bits, 1 stop bit, and no parity.  If a FEND ever
    appears in the data, it is translated into the two byte sequence
    FESC  TFEND  (Frame Escape, Transposed Frame End).  Likewise, if
    the FESC character ever appears in the user data, it is replaced
    with  the two character sequence FESC TFESC (Frame Escape, Tran-
    sposed Frame Escape).

         As characters arrive at the receiver, they are appended  to
    a  buffer  containing the current frame.  Receiving a FEND marks
    the end of the current  frame [und/oder start eines neuen].   
    Receipt  of  a  FESC  puts  the
    receiver  into "escaped mode", causing the receiver to translate
    a following TFESC or TFEND back to FESC or  FEND,  respectively,
    before adding it to the receive buffer and leaving escaped mode.

    Receipt of any character other than  TFESC  or  TFEND  while  in
    escaped  mode is an error; no action is taken and frame assembly
    continues.  A TFEND or TESC received while not in  escaped  mode
    is treated as an ordinary data character.

         This procedure may seem somewhat  complicated,  but  it  is
    easy  to implement and recovers quickly from errors. In particu-
    lar, the FEND character is never sent over the channel except as
    an  actual end-of-frame indication [oder mglichen Stream-anfang]. 
    This ensures that any intact
    frame (properly delimited by FEND  characters)  will  always  be
    received  properly  regardless  of  the  starting  state  of the
    receiver or corruption of the preceding frame.

         This asynchronous framing protocol is identical  to  "SLIP"
    (Serial Line IP), a popular method for sending ARPA IP datagrams
    across asynchronous links.

    ....

    4.  Control of the KISS TNC

    ...

         To distinguish between  command  and  data  frames  on  the
    host/TNC link, the first byte of each asynchronous frame between
    host and TNC is a "type" indicator.  This type indicator byte is
    broken into two 4-bit nibbles so that the low-order nibble indi-
    cates the command number (given in  the  table  below)  and  the
    high-order  nibble indicates the port number for that particular
    command.  In systems with only one HDLC port, it is  by  defini-
    tion  Port  0.  In multi-port TNCs, the upper 4 bits of the type
    indicator byte can specify one of up to sixteen ports.  The fol-
    lowing commands are defined in frames to the TNC  (the "Command"
    field is in hexadecimal):

    Command        Function         Comments

       0           Data frame       The  rest  of the frame is data to
                                    be sent on the HDLC channel.

[*]    1           TXDELAY          The next  byte  is  the  transmitter
                                    keyup  delay  in  10 ms units.
                           	    The default start-up value is 50
                                    (i.e., 500 ms).

[*]    2           P                The next byte  is  the  persistence
                                    parameter,  p, scaled to the range
                                    0 - 255 with the following
                                    formula:

                                             P = p * 256 - 1

                                    The  default  value  is  P  =  63
                                    (i.e.,  p  =  0.25).

[*]    3           SlotTime         The next byte is the slot interval
                                    in 10 ms units.
                                    The default is 10 (i.e., 100ms).

[*]    4           TXtail           The next byte is the time to hold
                                    up the TX after the FCS has been
                                    sent, in 10 ms units.  This command
                                    is obsolete, and is included  here
                                    only for  compatibility  with  some
                                    existing  implementations.

[*]    5          FullDuplex        The next byte is 0 for half duplex,
                                    nonzero  for full  duplex.
                                    The  default  is  0
                                    (i.e.,  half  duplex).

[*]    6          SetHardware       Specific for each TNC.  In the
                                    TNC-1, this command  sets  the
                                    modem speed.  Other implementations
                                    may use this function  for   other
                                    hardware-specific   functions.

[*]    FF         Return            Exit KISS and return control to a
                                    higher-level program. This is useful
                                    only when KISS is  incorporated
                                    into  the TNC along with other
                                    applications.

         The following types are defined in frames to the host:

    Type			Function		Comments

      0                 Data frame       Rest of frame is data from
                                         the HDLC channel.

         No other types are defined; in particular, there is no pro-
    vision for acknowledging data or command frames sent to the TNC.
    KISS implementations must ignore any unsupported command  types.

[*]  [= irrelevant fr WX-Station]
 
    ...

    5.  Buffer and Packet Size Limits

         One of the things that makes the KISS  TNC  simple  is  the
    deliberate lack of TNC/host flow control.  

   ...

         Individual packets at  least  1024  bytes  long  should  be
    allowed. 
    [*** NIX maximal 255 Byte Nutzdate pse ***]


    ....


 