home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckiker.doc < prev    next >
Text File  |  1992-11-23  |  17KB  |  325 lines

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