home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / packet / dedtnc1.ark / TNC.DOC < prev   
Encoding:
Text File  |  1987-08-27  |  40.6 KB  |  1,189 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                    AX.25 Version 2
  10.                                     Multi-channel
  11.                                     TNC  FIRMWARE
  12.  
  13.                                     (version 1.2)
  14.  
  15.                       Copyright 1986, Ronald E. Raikes (WA8DED)
  16.  
  17.  
  18.  
  19.                This firmware supports the full AX.25  link-layer  protocol,
  20.           version 2.0 as described in the ARRL specification dated  October
  21.           1984,  as  well  as   the   pre-existing   version   1.x.    This
  22.           implementation supports multiple  simultaneous  link  connections
  23.           with either version protocol.  This release  has  been  assembled
  24.           for a maximum of four connections, although any reasonable number
  25.           of connections is possible by changing one MAXLNK symbol  in  the
  26.           source equate file.
  27.  
  28.                The firmware  is  contained  in  two  2764  EPROMs,  and  is
  29.           intended to be installed in a TAPR TNC-1 (or equivalent, such  as
  30.           the AEA PKT-1 or Heath HD-4040) in sockets  U11  (C000)  and  U12
  31.           (E000).  This assumes that a 6264 RAM  is  already  installed  in
  32.           socket U7, with additional  6264  RAMs  optionally  installed  in
  33.           sockets U8, U9, and U10 in any combination (verify that pin 26 is
  34.           connected to +5v).  Additional RAM is highly desirable if  multi-
  35.           channel or unattended operation is anticipated.  When  installing
  36.           the EPROMs (including newer versions), it will  be  necessary  to
  37.           start the tnc with the PARAMETER SOURCE switch set  to  the  PROM
  38.           position.  This will cause default parameters to be written  into
  39.           NOVRAM  memory  but  not  PERMed.   The  RS-232  port   will   be
  40.           initialized to 300  baud  with  xon/xoff  handshaking.   The  tnc
  41.           source call sign will be all blanks, and should be set  with  the
  42.           'I' command, as well as any other default parameters  that  might
  43.           need changing, before issuing a 'PERM' command.  At  this  point,
  44.           the PARAMETER SOURCE switch may be set to NOVRAM  for  subsequent
  45.           operation.  If the terminal baud rate has been changed,  the  new
  46.           value will take effect following a reset.  If the tnc source call
  47.           sign is left blank, the tnc will not activate the transmitter PTT
  48.           line.
  49.  
  50.                Commands and information are sent to the tnc in the form  of
  51.           lines.  Lines may be up to 256  characters  long,  including  the
  52.           terminating CARRIAGE RETURN.  If the 256th character  entered  is
  53.           not a CARRIAGE RETURN, it will be discarded and a BELL  character
  54.           will be output to the terminal.  BACKSPACE and DELETE may be used
  55.           to remove single characters from the line.  The entire  line  may
  56.           be permanently backspaced out by entering a CONTROL-U or CONTROL-
  57.           X.  A CONTROL-R will temporarily backspace out any  partial  line
  58.           to allow incoming frames to be  displayed.   A  second  CONTROL-R
  59.           will then restore  the  line  to  allow  continuation  of  entry.
  60.           During the time a partial line is saved, only  another  CONTROL-R
  61.           will be  accepted  from  the  keyboard  (with  the  exception  of
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.           xon/xoff, of course).  BELL characters are echoed to the terminal
  75.           when entered or  removed.   Lines  which  begin  with  an  ESCAPE
  76.           character (echoed as '* ') are interpreted  as  commands.   If  a
  77.           command is issued with no parameter, the current  value  of  that
  78.           commands parameter is displayed.  An embedded NULL character in a
  79.           command will cause the remainder  of  the  line  to  be  ignored.
  80.           Lines without a leading ESCAPE character are sent as information.
  81.  
  82.                The firmware provides the operator  with  five  virtual  tnc
  83.           channels, numbered 0 to 4.  The terminal is logically attached to
  84.           only one of these  channels  at  a  time,  selected  by  the  'S'
  85.           command.  Information sent on channel 0 is always  unproto.   The
  86.           unproto path may be set by issuing a 'C' command when  channel  0
  87.           is selected.  Channels 1 - 4 are also unproto  if  they  are  not
  88.           currently connected.  Outgoing connect requests may be issued  on
  89.           any unconnected channel, while incoming connect requests will use
  90.           the first available  channel  (provided  the  maximum  number  of
  91.           connections set  by  the  'Y'  command  will  not  be  exceeded).
  92.           Information received on a connected channel that is not currently
  93.           selected will remain queued there until that channel is  selected
  94.           (the 'L' command is useful in determining if there is information
  95.           waiting on other channels).  Information for transmission is sent
  96.           only to the currently selected channel.   When  a  connection  is
  97.           ended,  any  information  that  has  not  been   transmitted   or
  98.           acknowledged will be discarded.  Received information will remain
  99.           queued,  however,  until  it  has  been  displayed.   If  a   new
  100.           digipeater  path  is  desired  while  a   connection   is   being
  101.           established or is in progress, it is not necessary to  disconnect
  102.           first.  Simply re-issuing the 'C' command will  re-establish  the
  103.           connection via the new path  without  any  loss  of  information.
  104.           Attempting to connect to  the  same  station  on  more  than  one
  105.           channel is not permitted.
  106.  
  107.                Which protocol version is used to initiate a  connection  is
  108.           controlled by the 'V' command, but the version  will  be  changed
  109.           automatically, if necessary, to conform to the version of the tnc
  110.           responding.  Version 2 protocol is more  effecient  in  terms  of
  111.           network  throughput  and   loading,   especially   under   severe
  112.           conditions.  Version 2 protocol is the default and should be used
  113.           whenever possible.  (NOTE:  The  existing  firmware  supplied  by
  114.           TAPR for the TNC-1 (v3.x) will NOT digipeat version  2  protocol.
  115.           This is expected to  remedied  in  v4.0.   All  other  tnc's  and
  116.           digipeaters encountered to date  digipeat  version  2  properly.)
  117.           When version 2 protocol is used, a  watch-dog  timer  is  started
  118.           whenever information  is  not  being  transmitted.   If  the  tnc
  119.           remains idle for three minutes, it will poll  the  other  tnc  to
  120.           determine if the link is still established.  If  no  response  is
  121.           received after the number of tries set by the  'N'  command,  the
  122.           tnc will attempt to re-establish the connection.  This  procedure
  123.           will also detect the case where someone connects and then  leaves
  124.           without disconnecting.  Changing the protocol  version  during  a
  125.           connection is not permitted.
  126.  
  127.                The 'F', 'N', 'O',  and  'V'  commands  maintain  individual
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.           parameters for each channel.  The value stored in  channel  0  is
  141.           the value that is  saved  in  NOVRAM.   This  value  is  used  to
  142.           initialize channels 1 - 4 after a  reset,  and  to  re-initialize
  143.           channels 1 - 4 after a disconnect.  This allows the values to  be
  144.           changed independently on each channel,  prior  to  and  during  a
  145.           connection, and then automatically revert back  to  the  standard
  146.           values when the connection is ended.  A 'D' command issued  on  a
  147.           disconnected channel 1 - 4 will also re-initialize that channel.
  148.  
  149.                Frame monitoring is controlled  by  the  'M'  command.   The
  150.           command parameter determines the types of frames  monitored,  and
  151.           is a list of desired  frames  chosen  from  the  letters  in  the
  152.           following table:
  153.  
  154.                LTR       FRAME
  155.                ---       -----
  156.                 N        None
  157.                 I        I frames
  158.                 U        UI frames
  159.                 S        Supervisory frames
  160.                 C        Monitor while connected
  161.                 R        Monitor received frames (addressed to)
  162.                 T        Monitor transmitted frames (addressed from)
  163.                 +        Call signs to be included (maximum of 8)
  164.                 -        Call signs to be excluded (maximum of 8)
  165.  
  166.           The '+' and '-' parameters may not be used together.   If  either
  167.           is used, it must be the last parameter (followed by one to  eight
  168.           call signs,  if  applicable).   If  no  list  of  call  signs  is
  169.           specified to be included or excluded,  all  call  signs  will  be
  170.           candidates for monitoring.  Entering a '+' or '-'  with  no  call
  171.           signs will empty the list.
  172.  
  173.           An asterisk displayed after a call sign in  the  digipeater  list
  174.           indicates the frame was transmitted by that station.  The control
  175.           field displayed will be one of the following:
  176.  
  177.                NAME   DESCRIPTION
  178.                ----   -----------
  179.                RRa  - Receive Ready
  180.                RNRa - Receive Not Ready
  181.                REJa - Reject
  182.                UI   - Unnumbered Information
  183.                DM   - Disconnected Mode
  184.                SABM - Connect Request
  185.                DISC - Disconnect Request
  186.                UA   - Unnumbered Acknowledge
  187.                FRMR - Frame Reject
  188.                Iab  - Information
  189.                ?ccH - Unknown
  190.  
  191.                a  = Next expected frame number (0 - 7)
  192.                b  = Frame number of this frame (0 - 7)
  193.                cc = Hexadecimal value
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.           In addition, one of the following characters will  be  displayed,
  208.           reflecting the protocol version, command/response bits,  and  the
  209.           poll/final bit:
  210.  
  211.            (blank) = version 1 frame without poll/final bit
  212.                  ! = version 1 frame with poll/final bit
  213.                  ^ = version 2 command frame without poll bit
  214.                  + = version 2 command frame with poll bit
  215.                  - = version 2 response frame with final bit
  216.                  v = version 2 response frame without final bit
  217.  
  218.           The protocol identifier field is displayed in hexadecimal,  which
  219.           is currently  always  an  F0,  signifying  that  no  layer  3  is
  220.           implemented.
  221.  
  222.                An unattended mode, controlled by the 'U' command,  provides
  223.           for sending user supplied text to a connecting station, and  then
  224.           allows that station to leave a  brief  message.   This  mode  can
  225.           operate on all channels simultaneously, but in no way limits  the
  226.           operators ability to interact with one of the connected  channels
  227.           or  the  ability  to  make  outgoing  connect   requests.    When
  228.           unattended mode is enabled, link status messages  are  queued  to
  229.           the associated channel and not output to the terminal unless that
  230.           channel  is  currently  selected.   Link  status  messages   will
  231.           therefore  be  displayed  in   chronological   order   with   the
  232.           information from that channel.  In addition, text supplied by the
  233.           user with the 'U' command  will  be  sent  to  any  station  that
  234.           connects.  If channel 0  is  left  selected,  stations  may  then
  235.           connect and leave messages on channels 1 - 4 (limited by the  'Y'
  236.           parameter, of course).  The 'L' command may be used to  determine
  237.           if messages have been left on any channel.  Selecting  a  channel
  238.           containing messages will cause all link  status  and  information
  239.           from that channel to be displayed.  If  xon/xoff  handshaking  is
  240.           enabled, CONTROL-S and CONTROL-Q may  be  used  to  regulate  the
  241.           output to  the  terminal  to  allow  comfortable  reading.   Also
  242.           provided,  but  intended  to  be  used  very  sparingly,  is   an
  243.           unattended QST facility.  In this mode, user supplied text may be
  244.           automatically transmitted unproto to the path set on  channel  0,
  245.           at periodic intervals spaced  1  -  65,535  minutes  apart.   The
  246.           interval and text must be entered each time QST mode is  enabled.
  247.           Use of unattended QST messages is generally degrading to  network
  248.           performance and is considered by many to  be  an  annoyance,  and
  249.           should only be used when absolutely necessary.
  250.  
  251.                The tnc parallel port supplies link status  information  for
  252.           channel 1 on lines PA0, PA1, and PA2 for  use  with  an  external
  253.           status indicator.  The following link states are possible:
  254.  
  255.                               1 = Disconnected
  256.                               2 = Link Setup
  257.                               3 = Frame Reject
  258.                               4 = Disconnect Request
  259.                               5 = Information Transfer
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.                The firmware source is written in  6809  assembly  language.
  274.           Emphasis was  placed  on  using  a  state  table  driven  design,
  275.           utilizing the state tables provided in  the  ARRL  specification.
  276.           The source was assembled using a 6809 cross assembler  from  2500
  277.           AD Software running on a Z-80/8086  TurboDOS  development  system
  278.           (CP/M & MS-DOS compatable).
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.           NOTE:   A  very  small  number  of  Western  Digital  1933   HDLC
  311.           Controller ICs manufactured in 1981 and 1982 have been  found  to
  312.           be defective.  The symptoms are erratic and unreliable  operation
  313.           of the tnc, due to the hdlc controller  occasionally  failing  to
  314.           interrupt  upon  successful  completion  of  frame  transmission.
  315.           These defective parts can be identified by  inspecting  the  mask
  316.           number on the underneath side of  the  IC.   The  defective  mask
  317.           number begins with the letters 'BA', and should be replaced.  The
  318.           current replacement part is called 1935 and requires no changes.
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.                                    COMMAND SUMMARY
  339.                                    ===============
  340.  
  341.  
  342.  
  343.           COMMAND        PARAMETER               DESCRIPTION
  344.           -------        ---------               -----------
  345.  
  346.             A (1)            0             Auto linefeed disabled
  347.                              1             Auto linefeed enabled
  348.  
  349.             B (6)           1-15           Terminal baud rate
  350.  
  351.             C        Cs1 [Cs2 ... Cs9]     Connect path (0=unproto path)
  352.  
  353.             D                              Disconnect
  354.  
  355.             E (1)            0             Echo input disabled
  356.                              1             Echo input enabled
  357.  
  358.           * F (3)           1-15           Frame acknowledge (seconds)
  359.  
  360.             G               [0]            Get information (host mode)
  361.                             [1]            Get link status (host mode)
  362.  
  363.             H (1200)       50-9600         HDLC baud rate
  364.  
  365.             I                Cs            Tnc source call sign
  366.  
  367.             JHOST (0)        0             Terminal mode enabled
  368.                              1             Host mode enabled
  369.  
  370.             K               1-2            Calibrate
  371.  
  372.             L              [0-4]           Display channel status
  373.  
  374.             M (IU)       NIUSCRT+-         Monitor mode
  375.  
  376.           * N (10)          0-255          Number of tries (0=forever)
  377.  
  378.           * O (4)           1-7            Number of outstanding I frames
  379.  
  380.             PERM                           Save parameters to NOVRAM
  381.  
  382.             QRES                           Re-start firmware
  383.  
  384.             R (1)            0             Repeater disabled
  385.                              1             Repeater enabled
  386.  
  387.             S (1)           0-4            Select channel (0=unproto)
  388.  
  389.             T (30)          0-127          Transmitter delay (10ms)
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.             U (0)   0      [text]          Unattended mode disabled
  405.                     1      [text]          Unattended mode enabled
  406.                     2    interval  text    QST mode enabled
  407.  
  408.           * V (2)            1             Version 1 protocol initiated
  409.                              2             Version 2 protocol initiated
  410.  
  411.             W (16)          0-127          Repeater wait (10ms)
  412.  
  413.             X (1)            0             Transmitter PTT disabled
  414.                              1             Transmitter PTT enabled
  415.  
  416.             Y (1)           0-4            Maximum connections
  417.  
  418.             Z (3)            0             Flow disabled, xon/off disabled
  419.                              1             Flow enabled, xon/off disabled
  420.                              2             Flow disabled, xon/off enabled
  421.                              3             Flow enabled, xon/off enabled
  422.  
  423.             @   B                          Display number of free buffers
  424.                 C  (0)       0             Fast clock disabled
  425.                              1             Fast clock enabled
  426.                 P  (F0)     0-FF           Protocol id (hex)
  427.                 S                          Display current link state
  428.                 T2 (100)    0-255          Timer T2 interval (10ms)
  429.                 T3 (18000)  0-32767        Timer T3 interval (10ms)
  430.  
  431.  
  432.              Default values are shown in parenthesis
  433.           *  These commands are applicable to each connection channel
  434.                (Values set on channel 0 are used after a reset and
  435.                 disconnect to initialize each connection channel)
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.                                  COMMAND DESCRIPTION
  471.                                  ===================
  472.  
  473.  
  474.  
  475.                The 'A' command is used to enable or disable  the  automatic
  476.           insertion of LINEFEED characters after CARRIAGE RETURN characters
  477.           to the terminal.  This parameter is stored in NOVRAM.
  478.  
  479.                The 'B' command is used to set the terminal baud rate, using
  480.           one of the following parameters:
  481.  
  482.                Parameter     Baud rate
  483.                ---------     ---------
  484.                    1            50
  485.                    2            75
  486.                    3            110
  487.                    4            135
  488.                    5            150
  489.                    6            300
  490.                    7            600
  491.                    8            1200
  492.                    9            1800
  493.                   10            2400
  494.                   11            3600
  495.                   12            4800
  496.                   13            7200
  497.                   14            9600
  498.                   15            19200
  499.  
  500.           After setting the baud rate with the 'B' command, the value  must
  501.           be PERMed, and will then take effect  following  a  reset.   Baud
  502.           rates above  4800  may  not  be  reliable  with  sustained  input
  503.           (commands or information) from a host computer due  to  the  slow
  504.           cpu clock rate and non-vectored interrupt architecture.
  505.  
  506.                The 'C' command is used to initiate a link connection.  Note
  507.           that NO 'v' or 'via' is used between the  destination  call  sign
  508.           and the digipeater call signs.  A 'C' command may be issued on  a
  509.           channel already in use to change the digipeater call  signs,  but
  510.           not the destination call sign.  A 'C' command issued when channel
  511.           0 is selected sets the unproto path.  Attempting  to  connect  to
  512.           the same station on more than one channel is not permitted.
  513.  
  514.                The 'D' command is used to initiate a link disconnection.  A
  515.           'D' command issued during the establishment or  dis-establishment
  516.           of a link will cause an  immediate  return  to  the  disconnected
  517.           state.  A 'D' command issued on a disconnected channel  will  re-
  518.           initialize the connection  dependent  parameters  to  the  values
  519.           stored in channel 0.
  520.  
  521.                The 'E' command is used to enable or disable the echoing  of
  522.           input (commands and information) to the terminal.  This parameter
  523.           is stored in NOVRAM.
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.                The 'F' command is used to  set  the  frame  acknowledgement
  538.           interval.  This interval is used to compute the timeout  interval
  539.           before a packet is retransmitted, using the formula:
  540.  
  541.                time (seconds) = frame ack * (2 * number of digipeaters + 1)
  542.  
  543.           A separate frame acknowlegement interval value is maintained  for
  544.           each connection channel.  The value stored in channel 0  is  used
  545.           to  initialize  each  connection  channel  after   a   reset   or
  546.           disconnection, and is the value that is stored in NOVRAM.
  547.  
  548.                The 'G' command is used to interrogate virtual tnc  channels
  549.           when host mode is enabled.  If no  parameter  is  specified,  the
  550.           next chronological item (information  or  link  status)  will  be
  551.           returned, provided there is one.   This  command  is  invalid  in
  552.           terminal  mode.   A  later  section  is  devoted  to  host   mode
  553.           operation.
  554.  
  555.                The 'H' command is used to set the  HDLC  baud  rate.   Non-
  556.           standard values are rounded down to the next possible baud  rate.
  557.           In this case, use an 'H' command with no paramter to display  the
  558.           value actually set.  This parameter is stored  in  NOVRAM.   HDLC
  559.           rates up to 9600 baud are supported if the  fast  clock  mode  is
  560.           enabled.
  561.  
  562.                The 'I' command is used to set the  tnc  source  call  sign.
  563.           The initial value is all blanks.  After the source call sign  has
  564.           been entered, the 'PERM' command should be used to  save  it  for
  565.           use during subsequent operation.  Changing the  tnc  source  call
  566.           sign while connected is not permitted.  If the  tnc  source  call
  567.           sign is left blank, the tnc will not activate the transmitter PTT
  568.           line.
  569.  
  570.                The 'JHOST' command is used to select between  terminal  and
  571.           host modes.  A later section is devoted to host mode operation.
  572.  
  573.                The 'K' command is used to calibrate  the  tnc  modem.   The
  574.           following parameters set the calibration modes listed:
  575.  
  576.                Parameter         Calibration
  577.                ---------         -----------
  578.                    1          FREQUENCY COUNTER
  579.                    2          TONE LEVEL & NULL
  580.  
  581.           The frequency counter mode will display the measured  frequencies
  582.           on the terminal.  When each mode is  selected,  jumpers  settings
  583.           are displayed as well as the appropriate ajustment  points.   The
  584.           values shown in parenthesis are the normal targets for 1200  baud
  585.           operation.
  586.  
  587.                The 'L' command is used to display the link status of one or
  588.           all channels.   Information  displayed  includes  the  connection
  589.           path, number of receive frames not yet displayed, number of  send
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.           frames not yet transmitted, number of transmitted frames not  yet
  603.           acknowledged, and the  current  retry  count.   A  '+'  character
  604.           preceeding the channel number indicates  the  currently  selected
  605.           channel.  Operation of this command when host mode is enabled  is
  606.           somewhat different, and is described in a later section.
  607.  
  608.                The 'M' command is used to set the  frame  monitoring  mode.
  609.           The command parameter determines the types of  frames  monitored,
  610.           and is a list of desired frames chosen from the  letters  in  the
  611.           following table:
  612.  
  613.                LTR       FRAME
  614.                ---       -----
  615.                 N        None
  616.                 I        I frames
  617.                 U        UI frames
  618.                 S        Supervisory frames
  619.                 C        Monitor while connected
  620.                 R        Monitor received frames (addressed to)
  621.                 T        Monitor transmitted frames (addressed from)
  622.                 +        Call signs to be included (maximum of 8)
  623.                 -        Call signs to be excluded (maximum of 8)
  624.  
  625.           The '+' and '-' parameters may not be used together.   If  either
  626.           is used, it must be the last parameter (followed by one to  eight
  627.           call signs,  if  applicable).   If  no  list  of  call  signs  is
  628.           specified to be included or excluded,  all  call  signs  will  be
  629.           candidates for monitoring.  Entering a '+' or '-'  with  no  call
  630.           signs will empty the list.  This parameter is stored in NOVRAM.
  631.  
  632.                The 'N' command is used to set the maximum number of times a
  633.           frame  will  be  transmitted  without  receiving  an  appropriate
  634.           acknowledgement, before a link failure is  assumed.   A  separate
  635.           maximum number of tries value is maintained for  each  connection
  636.           channel.  The value stored in channel 0  is  used  to  initialize
  637.           each connection channel after a reset or  disconnection,  and  is
  638.           the value that is stored in NOVRAM.
  639.  
  640.                The 'O' command  is  used  to  set  the  maximum  number  of
  641.           unacknowledged I frames that may be outstanding at any one  time.
  642.           A separate maximum number of unacknowledged  I  frames  value  is
  643.           maintained for each connection  channel.   The  value  stored  in
  644.           channel 0 is used to initialize each connection channel  after  a
  645.           reset or disconnection, and  is  the  value  that  is  stored  in
  646.           NOVRAM.
  647.  
  648.                The 'PERM' command is used to change  the  parameter  values
  649.           stored in NOVRAM to those that are currently set.
  650.  
  651.                The 'QRES' command is used to restart the firmware as  if  a
  652.           hardware reset had been issued.
  653.  
  654.                The 'R' command is used to enable or disable the digipeating
  655.           of frames.  This parameter is stored in NOVRAM.
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.                The 'S' command  is  used  to  select  the  current  channel
  670.           number.  This parameter is stored in NOVRAM.
  671.  
  672.                The 'T' command is used to set the transmitter  keyup  delay
  673.           interval.  The parameter is specified in 10ms  increments.   This
  674.           parameter is stored in NOVRAM.
  675.  
  676.                The 'U' command is used  to  enable  or  disable  unattended
  677.           modes.  If QST mode is not used, previously entered text will  be
  678.           retained if new text is not provided.  If QST mode  is  selected,
  679.           the interval and text must be  supplied.   The  QST  interval  is
  680.           specified in minutes from 1 - 65,535.
  681.  
  682.                The 'V' command is used to select whether  version  1  or  2
  683.           protocol will be used to initiate a link connection.  A  separate
  684.           protocol version value is maintained for each connection channel.
  685.           The value  stored  in  channel  0  is  used  to  initialize  each
  686.           connection channel after a reset or  disconnection,  and  is  the
  687.           value that is stored in  NOVRAM.   Interrogating  this  parameter
  688.           during a connection will reflect the protocol  version  currently
  689.           being used on that channel.  Changing the protocol version during
  690.           a connection is not permitted.
  691.  
  692.                The 'W' command is used to set the digipeater wait interval.
  693.           The parameter is specified in 10ms increments.  This parameter is
  694.           stored in NOVRAM.
  695.  
  696.                The 'X' command is used to enable or disable the transmitter
  697.           PTT line.  This parameter is stored in NOVRAM.
  698.  
  699.                The 'Y' command  is  used  to  set  the  maximum  number  of
  700.           connections that may  established  by  incoming  requests.   This
  701.           command has no  effect  on  the  operators  ability  to  initiate
  702.           outgoing  connection  requests.   This  parameter  is  stored  in
  703.           NOVRAM.
  704.  
  705.                The 'Z' command is used to enable or  disable  flow  control
  706.           and xon/xoff handshaking to the terminal.   If  flow  control  is
  707.           enabled, output to the terminal will be inhibited while  entering
  708.           commands or information.  If flow control is disabled, output  to
  709.           the terminal will not be restricted.  Flow control  and  xon/xoff
  710.           handshaking should be disabled during periods in which the tnc is
  711.           operated without a terminal, to  avoid  suspending  output  which
  712.           will consume buffers.  If xon/xoff handshaking  is  enabled,  crt
  713.           scrolling may be stopped and started using CONTROL-S and CONTROL-
  714.           Q characters.  Flow control  and  xon/xoff  handshaking  are  not
  715.           performed when host mode is enabled.  This parameter is stored in
  716.           NOVRAM.
  717.  
  718.                The '@'  command  is  a  software  maintenance  command.   A
  719.           parameter of 'B' will display the  number  of  free  buffers.   A
  720.           parameter of 'C0' will select timing parameters  for  the  slower
  721.           cpu  clock  rate.   A  parameter  of  'C1'  will  select   timing
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.           parameters for the faster cpu clock rate.  The 'C'  parameter  is
  735.           stored in NOVRAM and must be PERMed if the change is to  stay  in
  736.           effect following a reset.  The 'P' parameter is used to  set  the
  737.           protocol id byte for each channel and is supplied  and  displayed
  738.           in hexadecimal.  A parameter of 'S' will display the current link
  739.           state.  The 'T2' parameter is used to set the timer T2  interval,
  740.           just as the 'T3' parameter is used to set the timer T3  interval.
  741.           The timer intervals are specified in 10ms  increments,  and  both
  742.           are stored in NOVRAM.  Timer T2  controls  the  amount  of  delay
  743.           between the time an information frame is received  and  the  time
  744.           the resulting response frame is sent.  This delay allows multiple
  745.           frames to be acknowledged with a single response.   Timer  T3  is
  746.           used maintain link integrity.  If there is no activity during the
  747.           T3 interval, the tnc will poll to verify the distant  station  is
  748.           still connected.
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.                                  HOST MODE OPERATION
  801.                                  ===================
  802.  
  803.  
  804.  
  805.                Host mode is intended to provide a user  interface  suitable
  806.           for operation under control of a host  processor.   Commands  and
  807.           information to the tnc, as well as status  and  information  from
  808.           the tnc, are clearly identified to allow orderly and  unambiguous
  809.           communication.  To alleviate any need for  hardware  or  software
  810.           handshaking,  the  tnc  will  not  send  to  the  host  processor
  811.           unsolicited,  and  all  exchanges  are  limited  to  256   bytes.
  812.           Information transfers are fully transparent.
  813.  
  814.                When host mode is enabled, the first byte sent  to  the  tnc
  815.           must be a channel number.  If  information  is  being  sent,  the
  816.           second byte must be a binary 0.  If a command is being sent,  the
  817.           second byte must be a binary 1.   The  third  byte  must  be  the
  818.           binary length of the actual information or  command,  decremented
  819.           by 1 (vacuous information or commands are  not  permitted).   The
  820.           actual  information  or   command   bytes   must   follow   last.
  821.           Information sent to channel 0 will be sent unproto.   Information
  822.           sent to an unconnected channel 1 - 4 will be discarded.  The  tnc
  823.           will respond to both information  and  commands  with  a  channel
  824.           number first, followed by a binary code of 0, 1, or 2, signalling
  825.           success or failure.  Codes of 1 or 2 will be followed by  a  null
  826.           terminated message.  Channels may be  interrogated  for  incoming
  827.           information or link status by using  the  'G'  command.   Monitor
  828.           headers and monitor information will always be sent to channel 0,
  829.           along with connect request link status messages.  All other  link
  830.           status messages will be sent to the  appropriate  channel,  along
  831.           with that channels connected information.  In response to  a  'G'
  832.           command, the tnc  will  respond  with  a  channel  number  first,
  833.           followed by a binary code of 0 if  nothing  is  available,  or  a
  834.           binary code of 3 - 7, identifying the bytes that follow.  A  code
  835.           of  4  indicates  the  monitored  frame  does  not   contain   an
  836.           information field.  A code of 5  indicates  the  monitored  frame
  837.           does contain an information field, and the next  'G'  command  on
  838.           channel 0 will return that information field, preceeded by a code
  839.           of 6.
  840.  
  841.                    Host to Tnc
  842.                    -----------
  843.  
  844.           CHANNEL   CODE           DESCRIPTION
  845.           -------   ----           -----------
  846.              n       0        Information (preceeded by length-1)
  847.              n       1        Command     (preceeded by length-1)
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.                    Tnc to Host
  867.                    -----------
  868.  
  869.           CHANNEL   CODE           DESCRIPTION
  870.           -------   ----           -----------
  871.              n       0        Success (nothing follows)
  872.              n       1        Success (message follows, null terminated)
  873.              n       2        Failure (message follows, null terminated)
  874.              n       3        Link Status (null terminated)
  875.              n       4        Monitor Header (null terminated)
  876.              n       5        Monitor Header (null terminated)
  877.              n       6        Monitor Information (preceeded by length-1)
  878.              n       7        Connect Information (preceeded by length-1)
  879.  
  880.           Success messages
  881.           ----------------
  882.  
  883.           {channel status}
  884.           {parameter value}
  885.           CHANNEL NOT CONNECTED
  886.  
  887.           Failure messages
  888.           ----------------
  889.  
  890.           INVALID COMMAND
  891.           TNC BUSY - LINE IGNORED
  892.           CHANNEL ALREADY CONNECTED
  893.           STATION ALREADY CONNECTED
  894.  
  895.           Link Status messages
  896.           --------------------
  897.  
  898.           BUSY fm {call} via {digipeaters}
  899.           CONNECTED to {call} via {digipeaters}
  900.           LINK RESET fm {call} via {digipeaters}
  901.           LINK RESET to {call} via {digipeaters}
  902.           DISCONNECTED fm {call} via {digipeaters}
  903.           LINK FAILURE with {call} via {digipeaters}
  904.           CONNECT REQUEST fm {call} via {digipeaters}
  905.           FRAME REJECT (x y z) fm {call} via {digipeaters}
  906.           FRAME REJECT (x y z) to {call} via {digipeaters}
  907.  
  908.           x y z = FRMR information bytes
  909.  
  910.           Monitor Header format
  911.           ---------------------
  912.  
  913.           fm {call} to {call} via {digipeaters} ctl {name} pid {hex}
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.           Channel Status format
  933.           ---------------------
  934.  
  935.           a b c d e f
  936.  
  937.           a = Number of link status messages not yet displayed
  938.           b = Number of receive frames not yet displayed
  939.           c = Number of send frames not yet transmitted
  940.           d = Number of transmitted frames not yet acknowledged
  941.           e = Number of tries on current operation
  942.           f = Link state
  943.  
  944.               Possible link states are:
  945.  
  946.                0 = Disconnected
  947.                1 = Link Setup
  948.                2 = Frame Reject
  949.                3 = Disconnect Request
  950.                4 = Information Transfer
  951.                5 = Reject Frame Sent
  952.                6 = Waiting Acknowledgement
  953.                7 = Device Busy
  954.                8 = Remote Device Busy
  955.                9 = Both Devices Busy
  956.               10 = Waiting Acknowledgement and Device Busy
  957.               11 = Waiting Acknowledgement and Remote Busy
  958.               12 = Waiting Acknowledgement and Both Devices Busy
  959.               13 = Reject Frame Sent and Device Busy
  960.               14 = Reject Frame Sent and Remote Busy
  961.               15 = Reject Frame Sent and Both Devices Busy
  962.  
  963.  
  964.  
  965.           NOTE 1:  Only items a and b are displayed for channel 0.
  966.  
  967.           NOTE 2:  Only states 0 - 4 are possible if version 1 is in use.
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.                                  DEFAULT PARAMETERS
  999.                                  ==================
  1000.  
  1001.  
  1002.  
  1003.                In some instances, it  may  be  desirable  to  have  default
  1004.           parameters which differ from the standard values.  To allow  easy
  1005.           access, all default parameters have been placed at the  beginning
  1006.           of the EPROM.  The following listing defines the layout  of  this
  1007.           area:
  1008.  
  1009.                TYPE     VALUE          DESCRIPTION
  1010.                ----     -----          -----------
  1011.                BYTE      1BH           COMMAND CHARACTER
  1012.                BYTE    '      ',60H    SOURCE CALL SIGN (SEE NOTE 1)
  1013.                WORD     000AH          HDLC BAUD RATE DIVISOR (SEE NOTE 2)
  1014.                BYTE      06H           TERMINAL BAUD RATE
  1015.                BYTE      01H           MAXIMUM CONNECTIONS
  1016.                BYTE      03H           MONITOR MODE (SEE NOTE 3)
  1017.                BYTE      01H           REPEATER DISABLE/ENABLE
  1018.                BYTE      10H           REPEATER WAIT (10ms)
  1019.                BYTE      1EH           TRANSMITTER DELAY (10ms)
  1020.                BYTE      03H           FLOW CONTROL MODE
  1021.                BYTE      01H           TRANSMITTER PTT DISABLE/ENABLE
  1022.                BYTE      01H           CHANNEL NUMBER
  1023.                BYTE      01H           AUTO LINEFEED DISABLE/ENABLE
  1024.                BYTE      01H           ECHO COMMAND LINE DISABLE/ENABLE
  1025.                BYTE      01H           VERSION 2 INITIATED DISABLE/ENABLE
  1026.                BYTE      04H           MAXIMUM UNACKNOWLEDGED FRAMES
  1027.                BYTE      0AH           MAXIMUM TRY COUNT
  1028.                BYTE      03H           FRAME ACKNOWLEDGE INTERVAL
  1029.                BYTE      00H           FAST CLOCK DISABLE/ENABLE
  1030.                BYTE      64H           TIMER T2 INTERVAL (10ms)
  1031.                WORD     4650H          TIMER T3 INTERVAL (10ms)
  1032.                BYTE      F0H           PROTOCOL ID
  1033.                BYTE    'CQ    ',60H    UNPROTO CALL SIGN (SEE NOTE 1)
  1034.                BYTE      01H           VALIDATE CALL SIGN ENABLE/DISABLE
  1035.                BYTE      00H           STOP BIT/WORD LENGTH (SEE NOTE 4)
  1036.                BYTE      00H           PARITY (SEE NOTE 5)
  1037.  
  1038.  
  1039.             DISABLE = 00H / ENABLE = 01H
  1040.  
  1041.  
  1042.           NOTE 1:  The secondary station id must be shifted  left  one  bit
  1043.           and or'ed with 60H.
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.           NOTE 2:  The  HDLC  baud  rate  divisor  is  computed  using  the
  1065.           formula:
  1066.  
  1067.           SLOW CLOCK:     divisor = (14400 / buad rate) - 2
  1068.  
  1069.           FAST CLOCK:     divisor = (28800 / buad rate) - 2
  1070.  
  1071.           The HDLC baud rate divisor is stored most significant byte first.
  1072.  
  1073.  
  1074.           NOTE 3:  The monitor mode is composed from the following bits:
  1075.  
  1076.                BIT       FRAME
  1077.                ---       -----
  1078.                 0        I frames
  1079.                 1        UI frames
  1080.                 2        Supervisory frames
  1081.                 3        Monitor while connected
  1082.                 4        Monitor received frames (addressed to)
  1083.                 5        Monitor transmitted frames (addressed from)
  1084.  
  1085.  
  1086.           NOTE 4:  Stop bit and word length is controlled by the  following
  1087.           bit assignments:
  1088.  
  1089.                BIT 7     STOP BIT
  1090.                -----     --------
  1091.                  0       1 stop bit
  1092.                  1       2 stop bits
  1093.                  1       1.5 stop bits (word length=5/parity disabled)
  1094.                  1       1 stop bit (word length=8/parity enabled)
  1095.  
  1096.                BIT 6-5   WORD LENGTH
  1097.                -------   -----------
  1098.                  0 0     8 bits
  1099.                  0 1     7 bits
  1100.                  1 0     6 bits
  1101.                  1 1     5 bits
  1102.  
  1103.           Bits 4-0 MUST be set to 0.
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.           NOTE 5:  Parity is controlled by the following bit assignments:
  1131.  
  1132.                BIT 7-6   PARITY CONTROL
  1133.                -------   --------------
  1134.                  0 0     Odd parity transmitted/received
  1135.                  0 1     Even parity transmitted/received
  1136.                  1 0     Mark parity transmitted/parity check disabled
  1137.                  1 1     Space parity transmitted/parity check disabled
  1138.  
  1139.                BIT 5     PARITY ENABLE
  1140.                -----     -------------
  1141.                  0       Parity disabled
  1142.                  1       Parity enabled
  1143.  
  1144.           Bits 4-0 MUST be set to 0.
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.