home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / cieregulus / cie680hlp.txt < prev   
Text File  |  2020-01-01  |  10KB  |  189 lines

  1.             USING OLD-KERMIT ON CIE 680/20 MICROCOMPUTER:
  2.                    (with Regulus operating system)
  3.  
  4.                            David S. Lawyer
  5.                             406 Verano Pl
  6.                           Irvine, CA  92715
  7.  
  8.                              January 1988
  9.  
  10.  
  11. This is a description of an old and obsolete Kermit program for
  12. communication between computers.  The new C-Kermit has made this
  13. obsolete for most CIE systems.  However, it may still be of use if you
  14. have a CIE computer with only 256K of RAM memory since the C-Kermit's
  15. connect function executes extremely slowly unless you have more than
  16. 256K of RAM.  Even if you have 512K of RAM, the connect mode using this
  17. old program is faster than that for the C-Kermit and you might want to
  18. use this only for connecting.  If you want to revise the C-Kermit
  19. source code you may want to modify its connect function based on the
  20. connect part of this old source code.
  21.  
  22. Kermit is a protocall used to communicate between computers.  The
  23. program named kerm (source code kerm.c in the C language) is a "Unix
  24. Kermit" program modified at UCI for use on the CIE computer.  The
  25. connect mode of Kermit will make the CIE behave as if it were only a
  26. terminal, permitting you to connect to a remote computer through one of
  27. the connectors on the rear of the CIE (provided that you have connected
  28. an appropriate cable leading to another computer).  Once you are
  29. connected you may use the remote computer to do your work.  While you
  30. are connected you may also utilize both the CIE Kermit and the Kermit
  31. on the remote computer to transmit files between the remote and the
  32. CIE.  Of course, you may also use Kermit to connect to a modem or some
  33. kind of a switch which will give you a choice of computers with which
  34. to connect to.
  35.  
  36. Provided that you have set up the proper aliases the the Regulus shell
  37. you may:
  38.  I.     To connect to the remote unit type: "con" (without the
  39.     quotes).  Then do whatever is required to log in to the remote
  40.     unit (or dial in case of a modem).  When finished, type "^\c"
  41.     to exit back to your shell.  Unless you desire to
  42.     stay logged on to a remote computer, log off it first before
  43.     hitting "^\c".  If you are planning to make a file transfer
  44.     with the remote computer, you should of course remain logged
  45.     on.
  46.  
  47.  Ia.    If you try to connect again, you may get no response from the
  48.     remote unit because you may have previously logged out or the
  49.     remote unit has otherwise given up on you.  The usual way to
  50.     try to resolve this problem is to turn off your terminal and
  51.     start over.  However, the CIE takes time to boot so you may
  52.     simulate turning off this terminal by typing "drop" to the CIE
  53.     "%" prompt to drop the line. (The voltage on the DTR pin 20 of
  54.     the RS232 connector on the back of the CIE goes negative.)
  55.  
  56.  II.    To send files to the CIE first log on as per I. above.  Then
  57.     start the remote Kermit by typing "KERMIT".  Then type "SEND"
  58.     followed by the name (or list of names if allowed) of a file(s)
  59.     to send.  Be sure they are spelled correctly and in the right
  60.     case (no understandable error message will be received if
  61.     they're not correct).  Then hit <Ret> to give the send command
  62.     to the remote computer.  Then hit "^\c" to get back to CIE and
  63.     type "rec" to command your CIE to received what is being sent.
  64.     The remote computer will only wait about a minute for you to
  65.     type "rec", so don't hesitate too long.
  66.  
  67.  III.    To send files to the remote computer do about the same as for
  68.     send in II. above but give a "REC" command to the remote
  69.     computer and finally a "send" command to the CIE followed by a
  70.     list of files to send.  The use of wildcards (globbing) such as
  71.     "*" in file names is allowed.
  72.  
  73.     Note that after sending or receiving your'e still logged in to
  74.     the remote computer so you might want to connect again using
  75.     "con" and then logout from the remote computer.  You may have
  76.     to hit the <ret> key a few times to get the remote computer to
  77.     respond.  If you want to make the remote computer (or remote
  78.     unit) think that you've turned off the power to your computer,
  79.     type "drop" to drop the voltage on the wire which connects to
  80.     pin 20 of the RS-232 plug on the back of the CIE.  This should
  81.     drop your connection to the remote unit and allow you to login
  82.     anew (possibly to another computer).
  83.  
  84. How Kermit does it:  Data is transmitted in packets of 94 characters
  85. each.  Both the CIE and the remote computer run their own Kermit
  86. programs.  At first a handshake message is passed.  Next the file names
  87. are sent and finally the packets of data.  The program which you run on
  88. the CIE is one which was written in C for Unix systems.  It had to be
  89. modified to get it to work on the CIE (and it has not been thoroughly
  90. tested for bugs).  The C source code is in file kerm.c and the compiled
  91. binary is named "kerm".  To compile the source code, you may simply
  92. type cc -v -o kerm.c.  The source code tersely explains a little on how
  93. to use it.  For a full explanation of Kermit see the book "Kermit ..."
  94. by Frank da Cruz.  When debugging, use option flags d (or dd for the
  95. highest level of debugging).  The commands described above are nothing
  96. more than aliases for calls to kerm.  To see them type "alias" at the
  97. prompt %.
  98.  
  99. In order to use these commands you must put aliases into your .login or
  100. .nshrc file.  Here are some examples:
  101.  
  102.     alias con kerm clb /dev/tty1 4800 
  103.     alias rec kerm rflb /dev/tty1 4800
  104.     alias send kerm sflb /dev/tty1 4800 
  105.     alias drop stty 0 < /dev/tty1
  106.  
  107. The above assumes that you have connected your CIE to the remote
  108. computer via serial port 1 (tty1) using a RS232-C plug.  In order to
  109. use port 1 it must be disabled in the etc/ttys file so that no login
  110. process is running on it (in a futile attempt to get the remote
  111. computer to login to your CIE).  Do this by either editing etc/ttys to
  112. change the line starting with "11" to "01", or give the command
  113. "setport 1 -d".  These settings will be in effect permanently (until
  114. you change them again).
  115.  
  116. Since the Kermit program has disabled the break key, there is no way to
  117. interrupt Kermit when its running.  If you don't want to have Kermit
  118. disable the break key, edit the kerm.c source code in the function
  119. "setraw()" per the tty(dev) help file (use the c_iflag).  If you
  120. suspect that you have abnormally lost the connection with the remote
  121. computer, type "^\h" to see if Kermits is still running.  If it's not
  122. and characters do not seem to be echoing correctly (if at all) to your
  123. CRT then type:  <lf> stty sane <lf> to try and restore your terminal
  124. interface to its non-Kermit configuration.
  125.  
  126. Tabs can be a problem.  The Kermit program faithfully transmits tabs
  127. but the meaning of a tab character may depend on the computer you are
  128. using and how you have told it to interpret tab characters.  The
  129. default tabset on the CIE is 4 which means that tabs are translated to
  130. spaces based on tabstops every fourth character.  Many other computer
  131. use tabstops every eight characters.  Thus a document created on the
  132. CIE may look quite different when displayed on another computer unless
  133. its tabstops are reset to a spacing of every-four.
  134.  
  135. The remote computer needs to know the terminal type you are using.  The
  136. CIE 680/20 seems to have a console similar to a CIT-80 terminal.  Your
  137. host computer may have a satisfactory /etc/termcap entry for the CIT80.
  138. Here is on which I wrote as the existing one was unsatisfactory:
  139.  
  140. # Cit80 is Nonstandard ANSI.  Some differences are shown in Appendix C
  141. # of the CIT-80 manual.  Clearing screen doesn't home cursor but cs needs to
  142. # home cursor for vi. 
  143. # Initialization: set ANSI, exit Keypad Application mode, set cursor key
  144. # application mode, set auto wraparound, reset reverse video, set ASCII chars,
  145. # set normal video attributes, reset new line mode, scrolling region is lines
  146. # 1 thru 24, goto start of last line (otherwise cursor may not be on a blank
  147. # line).
  148. CT|cit80|cit 80|Citoh 80:\
  149.     :bl=^G:co#80:li#24:am:mi:ms:bs:pt:cr=^M:nl=^J:ta=^I:\
  150.     :up=\E[A:do=^J:nd=\E[C:le=^H:ho=\E[H:sc=\E7:rc=\E8:\
  151.     :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:\
  152.     :cl=\E[;H\E[2J:ce=\E[K:cd=\E[J:\
  153.     :so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[m:\
  154.     :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\
  155.     :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
  156.     :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:l1=PF1:l2=PF2:l3=PF3:l4=PF4:\
  157.     :sr=\EM:sf=\ED:\
  158.     :im=\E[>4h:ei=\E[>4l:al=\E[1L:dl=\E[1M:dc=\E[1P:\
  159.     :ve\E[2v\E[0v:vi=\E[1v:vs=\E[3v:\
  160.     :is=\E<\E>\E[?1h\E[?7h\E[?5l^O\E(B\E[0m\E[20l\E[1;24r\E[24;1H\
  161.     :rs=\E>\E[?5l\E[?7l:
  162.  
  163.  
  164. Sometimes vt100 will work OK but it may be inefficient.  Another logical
  165. choice would seem to be that of putting the CIE in vt52 mode and then
  166. declaring it to be a vt52, but this has resulted in incorrect
  167. performance of the vi editor on the host computer, and vt52 does not
  168. always seem to work correctly on the CIE even when Kermit is not being
  169. used.
  170.  
  171. BUGS:  In connect, a character is often lost for every few lines
  172. received by the CIE from the remote computer.  On the remote computer,
  173. you may make a test file with 80 characters per line.  Displaying this
  174. using cat will illustrate this problem.  One fix is to set tty0 (your
  175. CRT) to 4800 baud.  You may do this by typing "stty 4800" and then
  176. change the terminal to 4800 baud using the <setup> key.
  177.  
  178. When using vi on a remote computer (in Kermit connect mode), sending ^L
  179. and other scrolling commands to vi will result in vi sending out the
  180. requested data immediately even if the output queue at the remote
  181. terminal buffer was waiting on a ^S (Xoff).  If the CIE'e terminal
  182. buffers are nearly full at this time, overflow will occur and data will
  183. be lost.  The above may be the cause of missing lines which are
  184. sometimes observed when using vi at 9600 baud.  The situation is quite
  185. complicated as data from a remote computer to the CIE flows thru 3
  186. terminal buffers (the remote's, tty1, and tty0).  The data may be
  187. processed at each buffer and the CIE's processing will eat any ^S or ^Q
  188. byte if Xon/Xoff protocall is in effect.
  189.