home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / OSKBox.lzh / MAILBOX / FILES / WA8DED / dedver12.doc < prev    next >
Text File  |  1990-04-25  |  34KB  |  786 lines

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