home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc095.zip / ckiker.doc < prev    next >
Text File  |  1989-12-05  |  16KB  |  309 lines

  1. PREFACE
  2.  
  3. Most of this short introduction to C-Kermit is by Jack Rouse, late of the
  4. Software Distillery and SAS Institute.  I say "late" because I, Stephen
  5. Walton, have not been able to contact him and have therefore volunteered
  6. to take over maintenance of the Amiga C-Kermit code.  The Software Distillery
  7. blurb at the end is left intact, with the exception of a note to the effect
  8. that Jack Rouse can no longer be reached at these addresses.
  9.  
  10. INTRODUCTION
  11.  
  12. This version of Amiga Kermit is a port of the Unix C-Kermit which attempts
  13. to reproduce as much of the functionality of Unix version as possible.  I
  14. had two main goals in porting C-Kermit:  I wanted a reliable remote file
  15. transfer utility, and I wanted to investigate the use of the AmigaDOS
  16. and Exec environments.
  17.  
  18. Amiga Kermit currently provides a line oriented user interface.  I currently
  19. have no specific plans to implement menuing, but there are several places in
  20. Kermit where a menu interface would be an asset.  In this version of Kermit,
  21. I have concentrated on the functional aspects.
  22.  
  23. As I have stated before, this is a port of the Unix C-Kermit.  The file
  24. ckuker.doc contains detailed documentation on the use of C-Kermit, and
  25. Kermit's internal help can be used as a reference too.  The main
  26. difference between this version and the Unix C-Kermit is that the DIAL
  27. and SCRIPT commands are as yet unimplemented.  Therefore, only Amiga
  28. specific features are noted below.
  29.  
  30. INVOKING C-KERMIT
  31.  
  32. Amiga Kermit is usually invoked from a CLI process.  It currently can
  33. not be invoked from the Workbench directly; i.e., you cannot attach a
  34. Tool icon to Kermit and double-click on it.  However, you can use the
  35. AmigaDOS 1.2 XIcon command in the following way:  Create an AmigaDOS
  36. script file containing the command needed to start Kermit;  for instance,
  37.  
  38. C:KERMIT
  39.  
  40. Put the script in S: or Sys:system or wherever.  Create a Project icon
  41. for this file, and set its default tool to C:Xicon.
  42.  
  43. From a CLI window, you generally enter:
  44.    KERMIT
  45. or
  46.    RUN KERMIT
  47. to execute Kermit and start up the Kermit command interpreter.  Kermit
  48. will create its own window and greet you with:
  49.  
  50.    C-Kermit, 4F(095) 31 Aug 89, Commodore Amiga
  51.    Type ? for help
  52.  
  53.    C-Kermit>
  54.  
  55. The cursor will appear following the C-Kermit> prompt.  Typing ? will
  56. produce a list of the items that can be entered at any point.  Typing ?
  57. here will produce a list of commands:
  58.  
  59.    C-Kermit>? Command, one of the following:
  60.  Command, one of the following:
  61.  !                  bye                cd                 close
  62.  connect            cwd                dial               directory
  63.  echo               exit               finish             get
  64.  hangup             help               log                quit
  65.  receive            remote             script             send
  66.  server             set                show               space
  67.  statistics         take               transmit           
  68.  
  69. Typing ? at various points during command entry will help you navigate
  70. through the command processor.  The 'help' command is also quite useful.
  71. Typing 'help' alone gets information about command entry:
  72.  
  73.    C-Kermit>help
  74.  
  75.    Type ? for a list of commands, type 'help x' for any command x.
  76.    While typing commands, use the following special characters:
  77.  
  78.     DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.
  79.     CTRL-W: Delete the most recent word typed.
  80.     CTRL-U: Delete the current line.
  81.     CTRL-R: Redisplay the current line.
  82.     ?       (question mark) display help on the current command or field.
  83.     ESC     (Escape or Altmode) Attempt to complete the current field.
  84.     \       (backslash) include the following character literally.
  85.  
  86.    From system level, type 'kermit -h' to get help about command line args.
  87.  
  88. but 'help' can be used with command lines to get command descriptions.  For
  89. example:
  90.  
  91.    C-Kermit>help bye
  92.    Shut down and log out a remote Kermit server
  93.  
  94. The Kermit command processor is normally exited with the 'QUIT' command.
  95. During Kermit protocol, you can type CTRL-C or CTRL-D to interrupt and
  96. exit Kermit.  Depending on the version of the C runtime libraries used
  97. to link Kermit, the interrupt may also be active during command input, but
  98. it is disabled during connect mode.  You will get a requestor when the
  99. interrupt is activated to allow you to choose to continue Kermit.  However,
  100. any serial read or write that was interrupted will still be aborted.
  101.  
  102. Kermit can also be used without the command processor by specifying an
  103. action on the command line.  You can enter 'kermit -h' at the CLI prompt
  104. to get a list of command line options.  However, unless input is redirected,
  105. or the -q (quiet) option is specified, Kermit will still create a window
  106. for protocol monitoring and interruption.  'KERMIT <*' can be used to
  107. run Kermit completely within the CLI window; however, this does not allow
  108. you to enter control characters, and no console input is seen until you
  109. enter return.  Input and output can be redirected to files to take advantage
  110. of C-Kermit command line file transfer options.  Unfortunately, AmigaDOS
  111. does not implement pipes (yet).
  112.  
  113. KERMIT SERIAL INITIALIZATION AND SETTINGS
  114.  
  115. Amiga Kermit uses the serial device.  Three sources are used to initialize
  116. the serial parameters.  First, the default serial configuration, as set by
  117. Preferences, is copied.  This includes baud rate, and under version 1.2 of
  118. the Workbench, parity, modem control (7-wire vs. 3-wire), and flow control.
  119. Second, command line parameters can be used to override these settings.
  120. For example:
  121.    kermit -b 1200 -p e
  122. can be used to select 1200 baud and even parity independently of the
  123. Preferences settings.  Finally, if the command processor is used, Kermit
  124. looks for a ".kermrc" initialization file, first in the "s:" directory, then
  125. in the current directory, providing that the disk containing each directory
  126. is present in the Amiga.  The ".kermrc" file contains C-Kermit commands
  127. which can be used to initialize the C-Kermit environment as desired.
  128.  
  129. The line used by Amiga Kermit is always 'serial.device', the name of the
  130. device driver being used, and Kermit will not allow you to 'SET LINE' to
  131. anything else.  The modem control mode is currently selected by 'SET MODEM
  132. type', which has two choices: 'DIRECT', for 3-wire control, and 'GENERIC',
  133. for 7-wire control.  Because of the way the serial device operates, this
  134. setting only has an effect when the serial device is opened after previously
  135. being closed, which occurs only when the serial line is used after Kermit
  136. starts or after '<escape>H' is used to hang up and exit connect mode.
  137.  
  138. Kermit allows you to set any baud rate between 110 and 292000 baud; however,
  139. it will complain if the baud rate is nonstandard (I added this feature after
  140. several attempts to use my modem at 12000 baud).  Rates of 110 and 111 baud
  141. are implemented as 112 baud.  Rates above 38400 baud can be used for
  142. connect mode, but they are not very useful for file transfer.  The file
  143. transfer rate is limited by packet retries due to transfer errors, and the
  144. overhead time spent constructing packets.
  145.  
  146. Amiga Kermit uses the serial device in shared mode.  This allows other
  147. programs, like dialers, to use the serial line at the same time, without
  148. exiting Kermit.  This could also allow in theory a terminal emulator to be
  149. used simultaneously with Kermit.  However, if two programs are reading from
  150. the serial line at the same time, the results are unpredictable.  Any such
  151. program, therefore, would have to be disabled from reading while Kermit is
  152. performing file transfer or is in connect mode.  Note that Kermit since does
  153. its own parity generation and stripping, so it always sets the serial device
  154. to use eight bit characters with no parity.
  155.  
  156. WILDCARDING
  157.  
  158. Both the SEND command invoked from the Amiga and a GET sent to an Amiga
  159. in server mode use allow wildcarding, in the Unix style.  Thus, '*'
  160. wildcard matches an arbitrary string while '?' matches an arbitrary
  161. character.  Therefore, to get all the C source files which begin with 'cki'
  162. from the Amiga server, you could use the command:
  163.  
  164.    C-Kermit>GET cki*.c
  165.  
  166. Multiple '*' wildcards can be used in a pattern; however, beware that
  167. most Unix C-Kermit's may not completely support this form.  Also, the
  168. wildcarding that is used in local and remote server commands that invoke
  169. AmigaDOS commands is the AmigaDOS form.
  170.  
  171. LOCAL AND REMOTE COMMANDS
  172.  
  173. Amiga Kermit provides several ways to invoke AmigaDOS commands from within
  174. Kermit.  Entering '!' at the Kermit prompt will create a CLI process running
  175. in its own window, and wait for it to terminate.  The form '! command' will
  176. invoke the given command command with its output going to Kermit's window.
  177. There is currently no way to pause the output of commands invoked his way,
  178. other than the stopgap use of the right mouse button.  The form 'REMOTE
  179. HOST command' can be sent to the Amiga server to execute the given command
  180. remotely on the Amiga.  Because of the way AmigaDOS Execute() function
  181. works, commands invoked in either the '! command' or 'REMOTE HOST command'
  182. forms have NIL: as their standard input.  Some AmigaDOS commands that
  183. require input, such as DiskCopy and Format, do not recognize the immediate
  184. end of file that they receive under this condition, causing them to hang.
  185.  
  186. In addition to the methods given above, various AmigaDOS commands are
  187. invoked by local Kermit commands, and generic remote commands.  These
  188. are listed below:
  189.  
  190.    AmigaDOS command    Local command      Remote generic command
  191.    DELETE files        --none--           REMOTE DELETE files
  192.    TYPE files          --none--           REMOTE TYPE files
  193.    INFO                SPACE              REMOTE SPACE
  194.    LIST obj            DIRECTORY obj      REMOTE DIRECTORY
  195.    STATUS              --none--           REMOTE WHO
  196.  
  197. Any parameters to these commands are expected to use AmigaDOS conventions,
  198. including AmigaDOS wildcarding.  Note that in order to pass a '?' through
  199. the C-Kermit command processor, it must be prefixed with a '\'.
  200.  
  201. You can change the current directory of the Kermit process locally with the
  202. CWD command and remotely with REMOTE CWD.  The local CWD command prints
  203. out the name of the current directory afterwards.  If no new directory
  204. is given, the current directory is not changed, so CWD alone can be used
  205. to determine where the current directory is.
  206.  
  207. SERVER MODE
  208.  
  209. Amiga Kermit completely implements server mode, including the ability
  210. to execute CLI commands remotely.  Currently CLI commands are executed
  211. with their standard output directed to RAM:PIPE-HOLDER, which is then
  212. written back to the commanding Kermit after the command completes.
  213.  
  214. There are a few limitations on the commands that can be executed remotely.
  215. First of all, if they produce voluminous output, the output should be
  216. redirected (redirection is supported on the REMOTE HOST command line)
  217. to avoid using all free memory for the output file.  However, the 
  218. commanding Kermit will probably timeout in the middle of the execution
  219. of any such command.  The best way to use these commands is to
  220.    REMOTE HOST RUN command >outfile parameters
  221. then use REMOTE WHO (which invokes STATUS) to monitor the command for
  222. completion.
  223.  
  224. The input stream for remote commands is NIL:, which is not handled
  225. intelligently by all Amiga commands.  For example, 'REMOTE HOST diskcopy
  226. df0: to df1:' hangs indefinitely while waiting for NIL: to press return.
  227. Finally, since each command is executed in a separate CLI, commands that
  228. set unshared process parameters, like 'cd',  will have null effect (but
  229. 'REMOTE CWD dir' can be used instead).
  230.  
  231. While server mode is active, AmigaDOS requestors are disabled.  This
  232. avoids requiring operator intervention to reset a requestore when the Amiga
  233. server is told to use a file on a disk that does not exist or is write
  234. protected.  However, disabled requestors are currently not inherited by the
  235. CLI processes that the server creates to execute remote commands.
  236. Therefore, a remote AmigaDOS command can still cause the server to become
  237. hung.
  238.  
  239. To shut down the Amiga server, enter BYE or FINISH at the commanding
  240. Kermit.  FINISH exits to whatever level the server was invoked from,
  241. while BYE exits Amiga Kermit altogether.
  242.  
  243. CONNECT MODE
  244.  
  245. Connect mode on Amiga Kermit currently provides you with a standard
  246. AmigaDOS console device window.  Using the default Preferences
  247. setting, this gives a 23 row by 77 column screen.  However, the
  248. MoreRows program allows you to increase the size of the Workbench
  249. window beyond the 640 by 200 default size; increasing the number of
  250. rows by 8 and the number of columns by 16 will allow a 24 row by 80
  251. column Kermit window.  The Amiga console device is used to provide
  252. ANSI terminal emulation.  While you are in connect mode, you can give
  253. single character commands which are prefixed by an escape character
  254. which can be set from within C-Kermit.  By default, the escape
  255. character is CTRL-\.  You can use '<escape>H' to close the serial
  256. device and exit connect mode, which makes the DTR line drop causing
  257. most modems to hang up the phone line.
  258.  
  259. You can currently get a 25 by 80 screen in Kermit by means of a kludge.
  260. Entering the Kermit command line (backslashes will be echoed only once):
  261.      ECHO \\033[25t\\033[80u\\033[0x\\033[0y\\014
  262. activates console device private escape sequences that cause the console
  263. to use a 25 by 80 region, overwriting the borders of the Kermit window.
  264. Using window gadgets will cause the borders to be redisplayed, but the
  265. display can be cleaned up by typing ctrl-L in command mode.  To reset
  266. the window to its normal condition, allowing resizing, use:
  267.     ECHO \\033[t\\033[u\\033[x\\033[y\\014
  268. and then activate a window gadget to refresh the borders.  These commands
  269. can be placed into Kermit TAKE files.
  270.  
  271. In addition to the standard connect mode commands, extra logging control
  272. has been added.  If a session log file is open, the '<escape>Q' sequence
  273. allows you to temporarily suspend logging.  The '<escape>R' sequence
  274. resumes logging if it has been suspended.
  275.  
  276. Features have also been added to prevent deadlocks while in connect mode
  277. due to spurious XOFF's or bad modem control line states.  When connect
  278. mode is unable to send serial output, keyboard characters are queued until
  279. they can be transmitted.  Queuing continues as long as space is available
  280. in the output buffer.  If the buffer, which is 64 characters long, fills up,
  281. the next keyboard input is discarded and the display 'beeps'.  To get out
  282. of a deadlock situation, you can either exit connect mode, or send a break.
  283. In either case, the output queue is flushed, and current serial output
  284. character is given one second to finish transmitting.  If it does not
  285. complete, the output is aborted, and XOFF mode reset as appropriate.  Then
  286. connect mode is exited or a break is sent, as specified.  When output
  287. characters are queued, connect status (accessed by '<escape>S') will
  288. indicate the number of queued output characters.
  289.  
  290. BLURB
  291.  
  292. Amiga Kermit is a product of the Software Distillery group, which develops
  293. quality public domain software for the Commodore Amiga, including Hack and
  294. BLink.  The Software Distillery BBS (in Durham, NC) can be reached at
  295. (919) 471-6436.  If you have problems or suggestions related to Amiga
  296. Kermit, please contact me at the address below.  New versions of Amiga
  297. Kermit will be available as enhancements are made, and can be from
  298. obtained from various sources, including the Software Distillery BBS, and
  299. the Columbia University Kermit distribution.
  300.  
  301. Jack J. Rouse
  302. 888H Buckingham Ct.
  303. Cary, NC 27511
  304.  
  305. (919) 467-8000 (work)
  306. (919) 481-1395 (home)
  307. USENET: mcnc!rti-sel!sas!jjr [this address doesn't work as of 1 Nov 1989]
  308. COMPUSERVE: 74176,1757
  309.