home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckcker.bwr < prev    next >
Text File  |  1995-06-07  |  62KB  |  1,243 lines

  1. CKCKER.BWR          "Beware File" for C-Kermit Version 5A        -*- text -*-
  2.  
  3. As of C-Kermit version:  5A(190)
  4. This file last updated:  Wed Jun  7 10:00:03 1995
  5.  
  6. Authors: Frank da Cruz and Christine M. Gianone, Columbia University.
  7.  
  8.   Copyright (C) 1985, 1994, Trustees of Columbia University in the City of New
  9.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  10.   sold for profit as a software product itself, nor may it be included in or
  11.   distributed with commercial products or otherwise distributed by commercial
  12.   concerns to their clients or customers without written permission of the
  13.   Office of Kermit Development and Distribution, Columbia University.  This
  14.   copyright notice must not be removed, altered, or obscured.
  15.  
  16. Report problems, suggestions, fixes, etc, to Frank da Cruz:
  17.  
  18.   Columbia University Academic Information Systems
  19.   612 West 115th Street, New York, NY  10025  USA
  20.   Email: fdc@columbia.edu
  21.  
  22. C-Kermit 5A is documented in the book "Using C-Kermit" by Frank da Cruz and
  23. Christine M. Gianone, 1993, Digital Press / Butterworth-Heinemann, Woburn, MA,
  24. USA, ISBN 1-55558-108-0.  Price: US $34.95.  Available in book and computer
  25. stores, or order by phone, call Columbia University at +1 212 854-3703, or
  26. Butterworth-Heinemann at +1 800 366-2665.  A German edition is available from
  27. Verlag Heinz Heise in Hannover, Germany.
  28.  
  29. NOTE: Some changes have been made to C-Kermit since the 5A(188) release.
  30. These are described in detail in the file CKCKER.UPD, which can be used as
  31. a supplement to "Using C-Kermit".
  32.  
  33.  
  34. WHAT IS IN THIS FILE
  35.  
  36. This is the "beware file" for C-Kermit.  It contains hints and tips,
  37. frequently asked questions (and answers), troubleshooting advice, limitations
  38. and restrictions, known bugs, etc, that apply to all C-Kermit variations.
  39. This file is supplemented by a system-specific "beware file" for each major
  40. system where C-Kermit runs:
  41.  
  42.   ckuker.bwr - All variations of UNIX: HP-UX, AIX, SCO, Solaris, etc.
  43.   ckoker.bwr - IBM OS/2
  44.   ckvker.bwr - Digital Equipment Corporation VMS and OpenVMS
  45.   cklker.bwr - Stratus VOS
  46.   ckdker.bwr - Data General AOS/VS
  47.   ckmker.bwr - Apple Macintosh
  48.   ckiker.bwr - Commodore Amiga
  49.   cksker.bwr - Atari ST
  50.   ck9ker.bwr - Microware OS-9
  51.  
  52. This file contains the following sections:
  53.  
  54.   THE C-KERMIT COMMAND PARSER
  55.   MULTIPLE SESSIONS
  56.   NETWORK COMMUNICATION
  57.   THE SERVICES DIRECTORY
  58.   MODEMS AND DIALING
  59.   DIALING HINTS AND TIPS
  60.   TERMINAL EMULATION
  61.   KEY MAPPING
  62.   THE TRANSMIT COMMAND
  63.   FILE TRANSFER
  64.   SCRIPT PROGRAMMING
  65.  
  66.  
  67. THE C-KERMIT COMMAND PARSER
  68.  
  69. When using the command-line processor ("kermit -l /dev/tty00 -b 19200", etc),
  70. note that in some cases the order of the command-line options makes a
  71. difference, contrary to the expectation that order of command-line options
  72. should not matter.  In this case, the -b option must be given after the -l
  73. option if it is to have any effect.
  74.  
  75. If you specify an alternate initialization file on the command line (using the
  76. -y option) and the file doesn't exist or can't be opened, no error is reported.
  77.  
  78. In the interactive command parser:
  79.  
  80.  . VMS-style command editing (arrow keys, etc) is not supported.
  81.  . EMACS- or VI-style command line editing is not supported.
  82.  . Editing keys are hardwired (Ctrl-U, Ctrl-W, etc).
  83.  
  84. If you interrupt C-Kermit before it has issued its first prompt, it will exit.
  85. This means that you cannot interrupt execution of the initialization file, or
  86. of an "application file" (file whose name is given as the first command-line
  87. argument), or of an alternative initialization file ("-y filename"), and get
  88. to the prompt.  There is, however, one exception to this rule: you *can*
  89. interrupt commands -- including TAKE commands -- given in the '-C "command
  90. list"' command-line argument and -- if there were no action commands among the
  91. command-line arguments -- you will be returned to the C-Kermit prompt.  So,
  92. for example, if you want to start C-Kermit in such a way that it executes a
  93. command file before issuing its first prompt, and you also want to be able to
  94. interrupt the command file and get to the prompt, include a TAKE command for
  95. the desired command in the -C argument, for example:
  96.  
  97.    kermit -C "take dial.scr"
  98.  
  99. Reportedly, if you attempt to interrupt Kermit while it is executing its
  100. initialization file, and you do this rapidly enough, e.g. by sending a
  101. constant stream of Ctrl-C's at a very high rate of speed, depending on the
  102. underlying operating system (reported only on a couple versions of UNIX),
  103. duplicate Kermit processes might be created -- cause unknown, cure unknown,
  104. workaround: don't do it.
  105.  
  106. If you use the backslash (\) prefix to enter a control character, space, or
  107. question mark into a command literally, the backslash disappears and is
  108. replaced by the quoted character.  If it was a control character, it is shown
  109. as a circumflex (^).  This allows editing (backspace, delete, Ctrl-W) to work
  110. correctly even for control characters.
  111.  
  112. The only way to include a comma literally in a macro definition -- as opposed
  113. to having it separate commands within the definition -- is to enter its ASCII
  114. value (44) in backslash notation, e.g.:
  115.  
  116.   DEFINE ROWS MODE CO80\{44}\%1
  117.  
  118. If you quote special characters in a filename (e.g. in the SEND command),
  119. filename completion may seem to work incorrectly.  For example, if you have a
  120. file whose name is a*b (the name really contains an asterisk), and you type
  121. "send a\\*<ESC>", the "b" will not appear, nor will Ctrl-R redisplay the
  122. completed name correctly.  But internally the file name is recognized anyway.
  123.  
  124. Question-mark help does not work during execution of an ASKQ command.  The
  125. question marks are simply accepted as text.
  126.  
  127. The maximum length for a variable name is 20 characters.  For array
  128. declarations and references, that includes the subscript.  So, for example:
  129.  
  130.   \%a[\m(max_services)]
  131.  
  132. is one character too long (this can be changed by redefining the symbol VNAML
  133. in ckuusr.h and recompiling C-Kermit).
  134.  
  135. Some other maximums to watch out for:      Symbol    Value Defined in
  136.                                      
  137.  Nesting level for command files:           MAXTAKE      30  ckuusr.h
  138.  Nesting level for macros:                  MACLEVEL     50  ckuusr.h
  139.  Nesting level for FOR / WHILE loops:       FORDEPTH     10  ckuusr.h
  140.  Number of macros:                          MAC_MAX     256  ckuusr.h
  141.  Size of INPUT buffer:                      INPBUFSIZ   256  ckuusr.h
  142.  Maximum files to match a wildcard:         MAXWLD   varies  ck?fio.c
  143.  Filespecs in MSEND command:                MSENDMAX    100  ckuusr.h
  144.  Length of MSEND or GET string:             FSPECL      300  ckuusr.h
  145.  Length for GOTO target label:              LBLSIZ       50  ckuusr.h
  146.  Number of characters in a command:         CMDBL      1024  ckucmd.h
  147.  Number of chars in a field of a command:   ATMBL       256  ckucmd.h
  148.  \fexecute() recursion depth limit:         CMDDEP       20  ckucmd.h
  149.  
  150. ASK and ASKQ strip leading and trailing spaces from what the user types.  This
  151. happens way down deep in the command parser -- it's nothing special about ASK
  152. and friends.  The only way around this that works in both C-Kermit and MS-DOS
  153. Kermit is for the user (the one who is responding to the ASK prompt) to type
  154. (the first) leading space as "\32" and the (final) trailing space as "\32".
  155. In this example, the password begins with 2 leading blanks and ends with two
  156. trailing blanks, and "Passwd:" is the ASK prompt:
  157.  
  158.  Passwd:\32 secret \32
  159.  
  160. Of course, the user could also type *all* blanks as \32.
  161.  
  162. In OUTPUT commands only, \B and \\B send a BREAK signal, and \L and \\L send a
  163. Long BREAK signal, and \N and \\N send a NUL (ASCII 0).  BREAK and Long BREAK
  164. are special signals, not characters, and NUL is a character that normally
  165. cannot be included in a C string, since it is the C string terminator.
  166.  
  167. If you really want to output a backslash followed by a B, an L, or an N (as is
  168. needed to configure certain modems, etc), use "output \fliteral(\B)" (can be
  169. abbreviated, e.g. "out \flit(\B)") -- same for L or N.  You can also use
  170. "output \\\\B" (yes, four backslashes); same for L or N.
  171.  
  172. MULTIPLE SESSIONS
  173.  
  174. C-Kermit does not support multiple sessions.  When you SET LINE (or SET PORT,
  175. same thing) to a new device, or SET HOST to a new host, the previous SET LINE
  176. device or network host connection is closed, resulting in hangup of the modem
  177. or termination of the network connection.  In windowing environments like
  178. HP-VUE, NeXTSTEP, OS/2, etc, you can run separate copies of Kermit in different
  179. windows to achieve multiple sessions.
  180.  
  181. To achieve multiple sessions through a single serial port (e.g. when dialing
  182. up), you can install SLIP or PPP on your computer and then use C-Kermit's
  183. TCP/IP support over the SLIP or PPP connection, assuming you also have
  184. TCP/IP networking installed on your computer.
  185.  
  186. On UNIX systems that support the "term" program, you can establish a
  187. connection to another UNIX system with C-Kermit and then achieve multiple
  188. sessions using "term" client programs like trsh (see ckuker.bwr and the term
  189. documentation for details).
  190.  
  191.  
  192. NETWORK COMMUNICATION
  193.  
  194. On a TCP/IP TELNET connection, you should normally have PARITY set to NONE and
  195. (except in VMS C-Kermit) FLOW-CONTROL also set to NONE.  If file transfer does
  196. not work with these settings (for example, because the remote TELNET server
  197. only gives a 7-bit data path), use SET PARITY SPACE.  Do not use SET PARITY
  198. MARK, EVEN, or ODD on a TELNET connection -- it interferes with TELNET
  199. protocol.
  200.  
  201. If echoing does not work right after connecting to a network host or after
  202. dialing through a TCP/IP modem server, it probably means that the TELNET
  203. server on the far end of the connection is executing the TELNET protocol
  204. incorrectly.  After initially connecting and discovering incorrect echoing
  205. (characters are echoed twice, or not at all), escape back, give the
  206. appropriate SET DUPLEX command (FULL or HALF), and then CONNECT again.
  207. For a consistently misbehaving connection, you can automate this process in
  208. a macro or TAKE file.
  209.  
  210. TELNET sessions are treated just like serial communications sessions as far as
  211. "terminal bytesize" and "command bytesize" are concerned.  If you need to view
  212. and/or enter 8-bit characters during a TELNET session, you must tell C-Kermit
  213. to SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, and SET PARITY NONE.
  214.  
  215. If you SET TERMINAL DEBUG ON or SET DEBUG SESSION (same thing), TELNET
  216. protocol negotiations will be displayed on your screen.  But most of the
  217. interesting negotiations happen at the time the SET HOST or TELNET command
  218. is given, before CONNECT mode is entered, so you won't see them on your
  219. screen.  However, you can still capture them in the debug log ("log debug").
  220.  
  221. For details about TCP/IP, NETBIOS, and Named Pipes communication for OS/2
  222. C-Kermit, see the CKOKER.BWR file.
  223.  
  224.  
  225. THE SERVICES DIRECTORY
  226.  
  227. Until edit 190, the login macros (such as UNIXLOGIN, VMSLOGIN, etc), which are
  228. used in the services directory, had their respective system prompts
  229. hard-coded, so if the prompt on the system you were logging in to differed
  230. from the one in the macro, the macro would time out and report failure (even
  231. though it actually did log you in).  These macros have been changed in edit
  232. 190 to allow you to override the default prompt.  As explained on pp.297-301
  233. of "Using C-Kermit", the format of a services directory entry is:
  234.  
  235.   entry-name  login-macro-name  user-id  connection-macro-name + arguments
  236.  
  237. For example:
  238.  
  239.   chemistry   vmslogin   ivan   call hayes com1 2400 7654321
  240.  
  241. If you want to specify the system prompt to look for after logging in, you
  242. can do it by grouping it after the login macro name in braces, like this:
  243.  
  244.   chemistry   {vmslogin CHEM:}  ivan   call hayes com1 2400 7654321
  245.  
  246. For reference, here are the standard login macros and the default prompts:
  247.  
  248.   UNIXLOGIN     \13\10$\32  (i.e. CR, LF, dollar sign, space)
  249.   VMSLOGIN      \13\10$\32  (ditto)
  250.   CISLOGIN      CompuServe Information Service
  251.   DOWLOGIN      ENTER QUERY
  252.   VMLINELOGIN   (Not applicable)
  253.   VMFULLOGIN    (Not applicable)
  254.  
  255. See the CKCKER.UPD file for a fuller explanation of the services directory.
  256.  
  257.  
  258. MODEMS AND DIALING
  259.  
  260. The list of modem types supported by C-Kermit is obtained by typing:
  261.  
  262.   set modem ?
  263.  
  264. at the C-Kermit> prompt.  If you have a high-speed, error-correcting,
  265. data-compressing modem, you should generally use the following settings:
  266.  
  267.   set speed 57600 ; Or 38400, the highest supported by both Kermit & the modem
  268.   set dial speed-matching off ; Use speed buffering.
  269.   set flow rts/cts            ; Use hardware flow control.
  270.   set dial mnp on             ; Enable error-correction and compression.
  271.  
  272. DIAL MNP (which is actually a misnomer, because it applies to error correction
  273. and compression in general, including V.42 and V.42bis) is OFF by default
  274. because if you use an MNP modem to call a non-MNP modem, your MNP modem will
  275. send MNP protocol messages to the other modem, but the other modem will treat
  276. them as ordinary data and pass them through to the host.  This usually results
  277. in your host session being locked up (e.g. autobaud to wrong speed, invalid
  278. login, etc).  Also note that, at present, the SET DIAL MNP command is
  279. effective only for US Robotics and Telebit modem types.
  280.  
  281. Always use hardware flow control if it is available (some operating systems
  282. do not support it).  If it is not, use Xon/Xoff ("software") flow control
  283. between your computer and the modem, which means you must tell C-Kermit to
  284. "set flow xon/xoff" and you must configure your modem for this too.
  285.  
  286. ADDING NEW MODEM TYPES TO C-KERMIT
  287.  
  288. If you have a modem that is not directly supported by C-Kermit, you can define
  289. a new modem type for it.  For example, suppose you have a Practical
  290. Peripherals PM14400FXMT V.32bis/V.42/V.42bis/MNP modem and you want to take
  291. full advantage of its features.  You can dial with this modem, taking
  292. advantage of the support for Hayes-like modems that is already built into
  293. C-Kermit, but substituting an initialization string particular to the PP14400:
  294.  
  295.   set modem hayes        ; Use Hayes-like dialog
  296.   set line <whatever>        ; Select the device your modem is on
  297.   set speed 57600        ; Use high speed
  298.   set dial speed-matching off    ; Lock the speed
  299.   set flow rts/cts        ; Use hardware flow control
  300.   set dial init ATQ0S2=43N1S37=11&K3&Q5S36=7S46=2S82=128\13
  301.  
  302. where:
  303.  
  304.   Q0         Result codes enabled
  305.   S2=43      Escape character is "+"
  306.   N1         Enable modulation negotiation
  307.   S37=11     Enable V.32.bis
  308.   &K3        Enable RTS/CTS (only if your C-Kermit version supports it)
  309.   &Q5        Enable error correction
  310.   S36=7       and compression with
  311.   S46=2       automatic speed buffering
  312.   S82=128    Pass BREAK signals through
  313.  
  314. This can be turned into a dialing macro, PPDIAL, which you can use in place of
  315. the DIAL command:
  316.  
  317. define PPDIAL -
  318.   set modem hayes, -
  319.   set line <whatever>, -          ; Change this appropriately
  320.   set speed 57600, -
  321.   set dial speed-matching off, -
  322.   set dial init ATQ0S2=43N1S37=11&K3&Q5S36=7S46=2S82=128\13, -
  323.   dial \%1, -
  324.   if success set flow rts/cts, -  ; (If your C-Kermit version supports it)
  325.   else end 1
  326.  
  327. If you put this definition into your CKERMOD.INI (or .mykermrc) file, then
  328. it will always be available for you to use, for example:
  329.  
  330.   C-Kermit> ppdial 7654321
  331.  
  332. And you can also use REDIAL in the normal way.
  333.  
  334. See your modem manual for details about initialization strings.  Most modern
  335. modems should be set up as in the example above but, naturally, the specific
  336. modem commands differ.  
  337.  
  338. Here are some sample modem initialization strings that should obtain settings
  339. equivalent to those made for the PP14400, for various other types of
  340. high-speed, error-correcting, data-compressing modems that are not
  341. specifically supported by Kermit's DIAL command.  The maximum speed is shown
  342. after the modem name.  These are offered in a form suitable for use in the SET
  343. DIAL INIT-STRING command (modem-command backslashes doubled, \13 at the end
  344. for carriage return), but with no guarantees -- see your modem manual for
  345. explanations of the commands and for further details.  Each of these
  346. initialization strings attempts to:
  347.  
  348.  . Start modulation negotation at the highest available, e.g. V.34 (28800 bps)
  349.    or V.32bis (14400bps), enabling fallback.
  350.  
  351.  . Fix the interface speed at C-Kermit's current speed, which should be
  352.    57600 or 38400 bps, whichever is the highest supported by both C-Kermit
  353.    and the modem.  Make sure you give the corresponding SET SPEED command
  354.    first, and also tell C-Kermit to SET DIAL SPEED-MATCHING OFF.
  355.  
  356.  . Enable error correction and compression, enabling fallback.
  357.  
  358.  . Enable RTS/CTS hardware flow control.  CAUTION: Not all C-Kermit
  359.    implementations support RTS/CTS, in most cases because the underlying
  360.    operating system does not support it.  Type "check rts/cts" to see if
  361.    your version of Kermit does support it.  If it says "rts/cts available",
  362.    you should be able to use the initialization string as is.  If not,
  363.    you might to remove or change the piece that is underlined like this.
  364.                                                    ^^^^^^^^^^^^^^^^^^^^
  365.  . Allow BREAK signals to be passed through transparently.
  366.  
  367. AT&T DataPort 14400, 57600 bps:
  368.   AT Q0 X6 &C1 &D2 &Q0 S84=0 \\Q3 %B14400 S41=1 S78=0 \\N7 %C1 \\K5\13
  369.                              ^^^^
  370. Boca 14.4 Faxmodem, 57600 bps:
  371.   AT Q0W1&D2X4 S95=47 F10 S37=11 N1 &K3 S82=128 &Q5 S36=7 S46=138 \\N3 S48=7\13
  372.                                     ^^^
  373. Hayes Ultra 144, 38400 bps:
  374.   AT Q0W1X4 S87=28 &D2 S95=46 S37=11 N1 &K1 &K3 &Q5 S36=7 S38=1 S46=2 S48=7\13
  375.                                         ^^^^^^^
  376. Multitech MT1432, 57600 bps:
  377.   AT Q0 &Q1 X4 $SB57600 $MB14400 &E4 %E1 &E1 &E15 $BA0\13
  378.                                  ^^^
  379. Practical Peripherals 14400FXMT, 57600 bps:
  380.   AT Q0 W1 S95=47 &D2 X4 S2=43 N1 S37=11 &K3 &Q5 S36=7 S46=2 S82=128\13
  381.                                          ^^^
  382. SupraFaxModem V.32bis and compatibles at 57600 bps:
  383.   AT &F2 W1\13
  384.      ^^^
  385. USR Sportster or Courier, 57600 bps:
  386.   AT Q0 &S0 X4 &A3 &D2 &B1 &H1 &R2 &N0 &K1 &M4 &Y3\13
  387.                            ^^^^^^^
  388. Zoom Telephonics 14400, 57600 bps:
  389.   AT Q0 W1 &D2 S95=47 X4 S37=11 &K3 S82=128 &Q5 S36=7 S46=138 S38=1\13
  390.                                 ^^^
  391. CAUTION: Reportedly, these strings might be too long for some modems.  If
  392. that is the case with yours, you can do one of the following:
  393.  
  394.  . Shorten the string by removing spaces and/or commands that are not
  395.    necessary because they correspond to your modem's normal settings.
  396.  
  397.  . Change your dialing macro to simply OUTPUT these commands in small
  398.    groups before issuing the DIAL command.
  399.  
  400. Note the Supra example.  It simply resets the appropriate factory profile for
  401. the modem, which automatically sets up the highest modulation, error
  402. correction, and compression, plus fallback and hardware flow control.  This
  403. type of trick can probably also be used with most other modern
  404. Hayes-compatible (AT command set) V.32/V.32bis/V.34//V.42/V.42bis modems,
  405. provided your version of C-Kermit supports hardware flow control, and the
  406. modem is not buggy (some modems go nuts when given an ATZ or AT&Fx command).
  407.  
  408.  
  409. DIALING HINTS AND TIPS
  410.  
  411. Remember: In many C-Kermit implementations (depending on the underlying
  412. operating system -- mostly OS/2 and System-V-based UNIX versions), you can't
  413. CONNECT to a modem and type the modem's dialing command (like "ATDT7654321")
  414. manually, unless you first tell C-Kermit to:
  415.  
  416.   SET CARRIER OFF
  417.  
  418. This is because (in these implementations), the CONNECT command requires the
  419. modem's Carrier Detect (CD) signal to be on, but the CD signal doesn't come on
  420. until after dialing is complete.  This requirement is what allows C-Kermit to
  421. pop back to its prompt automatically when the connection is hung up.  See the
  422. description of SET CARRIER in "Using C-Kermit".
  423.  
  424. Similarly, if your dialed connection drops when CARRIER is set to AUTO or ON,
  425. you can't CONNECT back to the (now disconnected) screen to see what might
  426. have happened unless you first SET CARRIER OFF.
  427.  
  428. Automatic redialing:  Here is a simple macro that dials and keeps redialing
  429. every thirty seconds until it gets an answer.  Obviously, it can be elaborated
  430. with messages, counters, etc:
  431.  
  432.   define keep_on_dialing dial \%1, while failure { sleep 30, redial }
  433.  
  434. Don't SET FLOW RTS/CTS if your modem is turned off, or if it is not presenting
  435. the CTS signal.  Otherwise, the serial device driver might get stuck waiting
  436. for this signal to appear.  When dialing, it is better to give the SET FLOW
  437. RTS/CTS command after the DIAL command than before it.
  438.  
  439. Here are a few points to clarify the purpose of SET DIAL SPEED-MATCHING:
  440.  
  441.  1. This command does not do anything at all to the modem.  Rather, it is used
  442.     to inform C-Kermit about the modem's configuration: whether the modem's
  443.     interface speed is "fixed", or it changes its interface speed when a
  444.     connection is made.  In the latter case, C-Kermit changes its own speed in
  445.     response to the speed given in the modem's CONNECT message.  By default,
  446.     SPEED-MATCHING is ON, so Kermit does indeed attempt to change its speed.
  447.     If your modem is set to have a fixed interface speed, you must SET DIAL
  448.     SPEED-MATCHING OFF.
  449.  
  450.  2. When DIAL SPEED-MATCHING is ON:
  451.  
  452.     (a) Your modem must be configured to report its *interface* speed in the
  453.         CONNECT message, rather than the connection (modulation) speed.
  454.  
  455.     (b) Your computer (and C-Kermit) must support all connection speeds that
  456.         might be reported by your modem.  SET SPEED ? will give you a list of
  457.         the speeds that your version of C-Kermit knows about.
  458.  
  459.  3. If conditions (a) and (b) cannot be satisfied, then you must:
  460.  
  461.     (a) Configure your modem to lock its interface speed
  462.  
  463.     (b) Tell C-Kermit to SET DIAL SPEED-MATCHING OFF
  464.  
  465. To illustrate, suppose you have a V.32bis modem.  When it connects to a
  466. remote V.32bis modem, it might issue a message like:
  467.  
  468.   CONNECT 14400
  469.  
  470. But 14400 bps is not a speed that is supported by certain operating systems
  471. and so C-Kermit might fail to adjust its speed according to this report.
  472. Therefore, you must lock the modem's interface speed at a higher speed (such
  473. as 19200, 38400, or 57600) that is supported by C-Kermit, set C-Kermit to the
  474. same speed, and tell C-Kermit to SET DIAL SPEED-MATCHING OFF.
  475.  
  476. If you have a high-speed, error-correcting, data-compressing, speed-buffering
  477. modem, you should always SET DIAL SPEED-MATCHING OFF, and you should fix the
  478. modem's interface speed as high as possible, preferably four times higher than
  479. its maximum connection (modulation) speed to allow compression to work at full
  480. advantage.  In this type of setup, you must also have an effective means of
  481. flow control enabled between C-Kermit and the modem, preferably hardware
  482. (RTS/CTS) flow control.
  483.  
  484. C-Kermit knows about a large number of modems, depending on how it was built
  485. (type "set modem ?" and "show features" for further info).  This knowledge is
  486. imbedded in the SET MODEM and DIAL commands.  If you are having trouble
  487. dialing your modem, SET DIAL DISPLAY ON to watch the dialing interactions
  488. between C-Kermit and your modem.  Consult pages 65-66 of "Using C-Kermit" for
  489. modem-dialing troubleshooting instructions.
  490.  
  491. If it takes your call longer to be completed than the timeout interval that
  492. C-Kermit calculates, you can use the SET DIAL TIMEOUT command to override
  493. C-Kermit's value.  But beware: the modem has its own timeout for completing
  494. the call.  If it is a Hayes-like modem, C-Kermit adjusts the modem's value
  495. too by setting register S7.  But the maximum value for S7 might be smaller
  496. than the time you need!  In that case, C-Kermit sets S7 to 0, 255, or other
  497. (modem-specific) value to signify "no timeout".
  498.  
  499. WARNING: Certain modems might have a maximum dial timeout shorter than what
  500. Kermit expects it to be.  If Kermit attempts to set register S7 to a value
  501. higher than your modem's maximum, the modem will say "ERROR" and you will get
  502. a "Failure to initialize modem" error.  In that case, use SET DIAL TIMEOUT to
  503. override C-Kermit's calculation of the timeout value with the highest value
  504. that is legal for your modem, e.g. 60.
  505.  
  506. How to DIAL from a TCP/IP reverse terminal server (modem server):
  507.  
  508.  1. (only if neccessary) SET TELNET ECHO REMOTE
  509.  2. SET HOST <terminal-server-ip-name-or-address> [ <port> ]
  510.  3. SET MODEM <modem-type>
  511.  4. (only if necessary) SET DIAL HANGUP OFF
  512.  5. DIAL <phone-number>
  513.  
  514. The order is important.
  515.  
  516. Although various modem-dialing strings are configurable, the DIAL MODEM-HANGUP
  517. string is not.  For Hayes and Hayes-like modems it is ATQ0H0; the Q0 is to
  518. ensure that a result code is produced.  In case the Q0 interferes with your
  519. normal setup (for example, if you keep your modems set to Q2), and dropping
  520. the connection does not restore the normal connection, you can define Kermit's
  521. ON_EXIT macro to send the appropriate modem configuration commands when Kermit
  522. exits, for example:
  523.  
  524.   define on_exit if > \v(local) 0 output ATQ2\13
  525.  
  526. The SET DIAL KERMIT-SPOOF command works only for Telebit and US Robotics modem
  527. types; it is OFF by default.  You may wish to experiment with large packets
  528. (1K or greater) and various window sizes with spoofing disabled in the modem.
  529. In most situations the transfer rates achieved by Kermit with sliding windows
  530. and long packets are better than with protocol spoofing turned on.  Also,
  531. attribute (A) packets are not passed by current Telebit modems with spoofing
  532. enabled so if they are desired spoofing must be turned off.
  533.  
  534. DEC modems...  Reportedly, these don't work right when connected to a DEC
  535. terminal server -- result codes are never reported (on the other hand, this
  536. might be a modem configuration problem).  Dialing "by hand", "blind" still
  537. works.  Also, reportedly "For people who do have DEC modems directly connected
  538. to DEC computers the DF03, DF100-series, and DF200-series modem dialers should
  539. work.  The only thing that is not straightforward is that the DF124-CA,
  540. DF124-CM modems must use the the DF200-series since they speak Digital Modem
  541. Command Language (DMCL) and AT commands.  The Digital Scholar Plus is a DF242
  542. so it uses the DF200-series."
  543.  
  544. If C-Kermit's dialing methods are insufficient for your purposes, you can
  545. write a C-Kermit script program to do the dialing.  Or you can use (or write)
  546. another program to accomplish the dialing, and then run C-Kermit "underneath"
  547. your dialing program by giving it the open file descriptor:
  548.  
  549.   kermit -l <n> -m unknown
  550.  
  551. where <n> is the numeric file desciptor.  (This feature is available in the
  552. UNIX and OS/2 versions of C-Kermit.)  Or you can modify the ckudia.c module.
  553.  
  554. NOTE: When you give a SET DIAL DIRECTORY command, C-Kermit keeps your dial
  555. directory file open until you give another SET DIAL DIRECTORY command, or
  556. until you EXIT.  So, for example, you can't edit the dialing directory while
  557. you have it open.  If you want to edit the dialing directory from within
  558. Kermit, you can close it by giving a SET DIAL DIRECTORY command with no file
  559. name.  Then you can open it again with SET DIAL DIRECTORY <filename>.
  560.  
  561. HAYES AND COMPATIBLE MODEMS
  562.  
  563. C-Kermit should work correctly with Hayes and other modems that use the AT
  564. command set.  These include Hayes 1200, Hayes 2400, and Hayes 9600 bps modems,
  565. compatibles, as well as Telebit and HST modems.  See the next section for
  566. Telebit information.  C-Kermit sends AT commands to the modem and then reads
  567. the modem's response.  The software is designed to work whether the modem is
  568. configured to echo its commands (E1) or not (E0), and whether it replies with
  569. numeric (V0) or word (V1) result codes.  C-Kermit does not change the echoing
  570. state or result code mode of the modem.  However, C-Kermit issues the Q0
  571. command to the modem to ensure that it *does* produce result codes.  C-Kermit
  572. assumes the modem's Command Line Terminator (S3) is 13 (carriage return).  If
  573. it isn't, C-Kermit's dialog with the modem probably won't work correctly.
  574.  
  575.  
  576. TELEBIT MODEM DIALING SUPPORT
  577.  
  578. There are numerous Telebit modem models, with differing capabilities and
  579. features.  C-Kermit tries to support them all in a model-independent way.  
  580. To use a Telebit modem, any model, SET MODEM as follows:
  581.  
  582. TELEBIT
  583.   Dial and attempt to connect using the highest protocol appropriate to
  584.   the interface speed between the computer and the modem, and fall back
  585.   automatically to the highest protocol and speed supported by the answering
  586.   modem.  For example, if your interface speed is 19200 bps and you have a
  587.   PEP-capable Telebit, it will start in PEP mode, fall back to one of the
  588.   2400-bps standards, then one of the 1200 bps standards, etc, depending on
  589.   its configuration (see your Telebit manual).
  590.  
  591. PEP-TELEBIT
  592.   Dial in PEP mode, and connect only if the remote modem answers in PEP mode.
  593.   Does not work with Telebit models that do not support PEP.  See Table III.
  594.  
  595. V32-TELEBIT
  596.   Dial in V.32 mode (9600 bps), fall back from there.  Works only with Telebit
  597.   models that support V.32; see Table III.  NOTE: V.32 calls are supposed to
  598.   work no matter what your interface speed is, but it has been observed that
  599.   when calling certain non-Telebit V.32 modems, the connection is not made
  600.   successfully unless C-Kermit's interface speed to the Telebit is 9600.
  601.  
  602. V42-TELEBIT
  603.   Enable V.42 error correction, allowing fallback to MNP, and from there to
  604.   direct (no error correction).  NOTE: Fallback to MNP from V.42 is allowed
  605.   even if DIAL MNP-ENABLE is OFF.  Works only with Telebit models supporting
  606.   V.42 error control.  See Table III.
  607.  
  608. SLOW-TELEBIT
  609.   Dial at 2400 bps (V.22bis), fall back from there.
  610.  
  611. Before attempting to use Telebits at high speeds, there is one problem you
  612. should be aware of: Most Telebit models do not "autobaud" at speeds higher
  613. than 19200 or 38400.  If you want to make a high-speed call on such a modem,
  614. you must access it first at a lower speed, then give it a command to change to
  615. a higher speed, and then change Kermit's speed to match.  For example, on the
  616. Telebit T3000:
  617.  
  618.   C-Kermit> set speed 19200
  619.   C-Kermit> connect
  620.   AT                           (make sure it can read you)
  621.   OK                           (it can)
  622.   ATS51=7                      (change it to 57600 bps)
  623.   OK                           (it says OK, then changes its speed)
  624.   ^\c                          (escape back to Kermit)
  625.   C-Kermit> set speed 57600    (set Kermit to agree) 
  626.  
  627. Of course, you can automate this process using a script program.  Or if you
  628. always want to dial out at 57600, you can save this setting in the modem,
  629. and then it will always use this speed (and won't autobaud any more).
  630.  
  631. Telebit modems come in many models that differ not only as to features but
  632. also which commands control which features.  The features, commands, and
  633. acceptable S-register values (and their meanings) can vary not only among
  634. models, but even among different ROM versions on the same model.  Rather than
  635. have dozens of separate SET MODEM TELEBIT-xxx commands, C-Kermit queries the
  636. modem for its model number with an ATI command, and then adjusts its modem
  637. commands accordingly.  Responses to the ATI command are shown in Table I.
  638.  
  639.  
  640. ---------------------------------------------------------------------------
  641. Table I: Telebit Modem ATI Command Responses
  642. ---------------------------------------------------------------------------
  643.   ATI  Model Numbers           Examples
  644.   ---  -------------           --------
  645.   123                          Telebit in "total Hayes-1200" emulation mode
  646.   960                          Telebit in Conventional Command (Hayes) mode
  647.   961  RA12C                   IBM PC internal original Trailblazer
  648.   962  RA12E                   External original Trailblazer, DCA Fastlink,
  649.                                  or Racal-Milgo RM1822
  650.   963  RM12C                   Rackmount original Trailblazer
  651.   964  T18PC                   IBM PC internal Trailblazer-Plus (TB+)
  652.   965  T18SA, T2SAA, T2SAS     External TB+, T1600, T2000, T3000, WB, and later
  653.                                  or Ven-Tel Pathfinder EC18K (see below)
  654.   966  T18RMM                  Rackmount TB+
  655.   967  T2MC                    IBM PS/2 internal TB+
  656.   968  T1000                   External T1000
  657.   969  ?                       QBlazer
  658.   971  T25SA                   External T2500 or T1500 (see below)
  659.   972  T25RM                   Rackmount T2500
  660. ---------------------------------------------------------------------------
  661.  
  662. Certain incompatible models show the same response to ATI.  The ATI3
  663. command is used to differentiate among them, as shown in Table II.
  664.  
  665. ---------------------------------------------------------------------------
  666. Table II: Telebit Modem ATI3 Command Responses
  667. ---------------------------------------------------------------------------
  668. ATI        If ATI3 Response 
  669. Response   Contains            Telebit Model Is
  670. --------   -----------------   ----------------
  671.  965       "T1600"             T1600
  672.  965       "T3000"             T3000
  673.  965       "World"             WorldBlazer
  674.  965       "Version B"         TrailBlazer-Plus or T2000 external version 1
  675.  965       "TBSA"              TrailBlazer-Plus or T2000 external version 2
  676.  965       "TBRM"              TrailBlazer-Plus or T2000 rackmount version 2
  677.  965       "DC"                Ven-Tel Pathfinder EC18K (= TB+ version 1)
  678.  971       "T1500"             T1500
  679.  971       (anything else)     T2500
  680. ----------------------------------------------------------------------------
  681.  
  682.  
  683. The features of the various models and the commands used by Kermit to control
  684. them are shown in Table III.  The commands in the PEP column are used to force
  685. PEP and allow compression (SET MODEM PEP-TELEBIT).  The commands in the V.32
  686. column are used with SET MODEM V32-TELEBIT.  The commands in the V.42 column
  687. are used with SET MODEM V42-TELEBIT.  The commands in the MNP column are used
  688. if SET DIAL MNP-ENABLE is ON and the modem type is TELEBIT, PEP-TELEBIT, or
  689. V32-TELEBIT, SLOW-TELEBIT, but not V42-TELEBIT; if SET MNP-ENABLE is OFF, the
  690. S-registers in the MNP column are set to 0.  The Pass BREAK column shows the
  691. commands used to ensure that the modem passes the BREAK signal through (rather
  692. than treating it as an "escape-to-command-mode" signal).
  693.  
  694. -------------------------------------------------------------------------------
  695. Table III.  Telebit Modem Features and Commands
  696. ------+---------------------+-------+--------+--------+-------------+----------
  697.       |                     |       |        |        |             | Kermit
  698. Model |      PEP            | V.32  |  V.42  | MNP    | Pass BREAK  | Spoof
  699. ------+---------------------+-------+--------+--------+-------------+----------
  700. TB    | S50=255 S110=1      |  No   |  No    | S95=2  |    S54=3    | PEP only
  701. TB+   | S50=255 S110=1      |  No   |  **    | S95=2  |    S54=3    | PEP only
  702. T2000 | S50=255 S110=1      |  No   |  **    | S95=2  |    S54=3    | PEP only
  703. T1000 | S50=255 S110=1      |  No   |  No    | S95=2  |    S54=3    | PEP only
  704. T2500 | S50=255 S110=1      | S50=6 |  No    | S95=2  |    S54=3    | PEP only
  705. T1500 |      No             | S50=6 |  **    | S95=2  |    S54=3    | PEP,V.32
  706. ------+---------------------+-------+--------+--------+-------------+----------
  707. T1600 |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  708. T3000 |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  709. QB    |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | No
  710. WB    | S50=255S190=1S191=7 | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  711. ------+---------------------+-------+--------+--------+-------------+----------
  712. **  For V.42 error control: "S50=0 S95=2 S97=1 S98=3 S106=1".
  713.  
  714. All models but the QBlazer support Kermit spoof (but see below).
  715.  
  716. Group I (old command set):
  717.  
  718.           TB = Original TrailBlazer (PEP, MNP, V.22bis, V.22, Bell 212A & 103)
  719.          TB+ = TrailBlazer-Plus = TrailBlazer + V.42 (but only in new ROMs)
  720.        T1000 = TrailBlazer-Plus, speed <= 9600, no PEP compression
  721.        T2000 = TrailBlazer-Plus + SDLC (not used by Kermit, so same as TB+)
  722.        T2500 = TrailBlazer-Plus + V.32 (9600 bps)
  723.        T1500 = T2500 minus PEP
  724.  
  725. Group II (new command set):
  726.  
  727.        T1600 = V.32, MNP, V.22bis, V.22, V.23, Bell 212A & 103
  728. QB = QBlazer = T1600 without Kermit spoof and minus some other options
  729.        T3000 = T1600 + V.32bis (14400 bps)
  730.  WorldBlazer = T3000 + PEP + LZ and V.42bis compression + 76800 & 115200 bps.
  731.  
  732. C-Kermit does not attempt to control whether the modem changes its interface
  733. speed to match the connection speed -- that is up to you; you can configure
  734. the modem any way you prefer (using S51 or, to some extent on new-style modems
  735. S180 and S181), but make sure that the modem's configuration agrees with
  736. C-Kermit's DIAL SPEED-MATCHING setting.  When DIAL SPEED-MATCHING is ON (the
  737. default), C-Kermit changes its interface speed automatically according to the
  738. speed reported in the modem's CONNECT message; when it is OFF, C-Kermit does
  739. not change speed.
  740.  
  741. Most Telebit modems do not autobaud at speeds above 9600 or 19200 bps unless
  742. specially configured to do so, and even then most (maybe all) models will not
  743. autobaud at all at 57600 bps.  Thus, to make a high-speed modem call with
  744. a Telebit, follow these steps:
  745.  
  746.   set modem telebit
  747.   set line <whatever>
  748.   set speed 19200
  749.   connect
  750.  
  751. Now type AT and carriage return to make sure you get an OK result.  Then type:
  752.  
  753.   ats51=7
  754.  
  755. and then carriage return.  This changes the Telebit's interface speed to
  756. 57600 (use ats51=6 if your modem's or computer's top speed is 38400).
  757. Now escape back to Kermit and give these commands:
  758.  
  759.   set speed 57600 ; or 38400
  760.   set dial speed-matching off
  761.   set dial mnp on
  762.     
  763. and now you can place a high-speed, error-correcting, data-compressing call.
  764.  
  765. The DIAL KERMIT-SPOOF command is only effective for the Telebit models that
  766. supply a Kermit spoof, that is, all but the QBlazer.  If the Telebit model is
  767. TrailBlazer, TrailBlazer-Plus, T1000, T2000, or T2500, PEP mode is forced even
  768. if your SET MODEM command specified a Telebit modem type other than
  769. PEP-TELEBIT, because the Kermit spoof only works in PEP mode on those models.
  770. On the other models supporting the Kermit spoof, it works on both PEP
  771. connections and V.32 MNP (but not V.42) connections.  Thus, you might also
  772. have to SET MODEM MNP-ENABLE ON in order to get the Kermit Spoof to work on
  773. these newer models when making a V.32 connection.
  774.  
  775. SHOW DIAL does not show the complete initialization string for Telebit modems.
  776. Telebit modems are initialized in several steps, and the initialization
  777. command depends upon your current communication parameters, which model of
  778. Telebit modem you have (which C-Kermit learns during the modem initialization
  779. process), and other factors.  If you use the SET DIAL INIT-STRING command to
  780. change the initialization string, this disables the multistep process and uses
  781. only the string that you have specified.
  782.  
  783. If you want to use the built-in multi-step process, but you also want to
  784. override one or more of the settings that are done in this process, or add
  785. additional settings, you can use SET DIAL DIAL-COMMAND to add commands to the
  786. dial string (which is normally ATD%s\13), for example "SET DIAL DIAL-COMMAND
  787. AT&C1&D2S181=1DT%s\13".
  788.  
  789. DIALING AND FLOW CONTROL
  790.  
  791. If you have SET FLOW to any of the hardware options supported by your version
  792. of C-Kermit, such as RTS/CTS, and if C-Kermit knows how to set the flow
  793. control on your modem, it will do this as part of the DIAL command.  Caution:
  794.  
  795.  . If C-Kermit's FLOW-CONTROL setting is Xon/Xoff or other type of software
  796.    flow control, C-Kermit will not attempt to change your modem's flow control
  797.    setting, since software flow control is most commonly used end-to-end.  One
  798.    way to engage Xon/Xoff flow control directly between C-Kermit and the
  799.    local modem is to change your modem's DIAL INIT-STRING to do it.
  800.  
  801.  . If your version of C-Kermit does not support SET FLOW RTS/CTS (or other
  802.    hardware options), then C-Kermit will not attempt to change your modem's
  803.    flow control setting.  Change your modem's DIAL INIT-STRING to do it.
  804.  
  805. Hardware flow control options are presently handled only for Telebit modems.
  806. On other modem types, you can set the flow control outside of Kermit, or
  807. change Kermit's DIAL INIT-STRING.
  808.  
  809. Most modern modems support RTS/CTS (if they support any hardware flow control
  810. at all), but some computers use different RS-232 circuits for the same
  811. purposes, e.g. DTR and CD, or DTR and CTS.  In such cases, you might be able
  812. to make your computer work with your modem by appropriately cross-wiring the
  813. circuits in the cable connector, for example the computer's DTR to the modem's
  814. RTS, and modem's CD to the computer's CTS.  HOWEVER, C-Kermit does not know
  815. you have done this.  So if you have (say) SET FLOW DTR/CD, C-Kermit will make
  816. no attempt to tell the modem to use RTS/CTS.  You probably did this yourself
  817. when you configured the modem; if not, you can put the appropriate command in
  818. the DIAL INIT-STRING or DIAL-COMMAND.
  819.  
  820. A "TIES" (Time-Independent Escape Sequence) modem does not require any guard
  821. time around its escape sequence.  The following text:
  822.  
  823. +++ATH0
  824.  
  825. if sent through a TIES modem, for example because you were uploading this
  826. file through it, could pop the modem back into command mode and make it hang
  827. up the connection.  Newer versions of the Telebit T1600 and T3000 (version
  828. LA3.01E firmware and later), and all WorldBlazers, use TIES.
  829.  
  830. Although the probability of "+++" appearing in a Kermit packet is markedly
  831. lower than with most other protocols (see the File Transfer section below), it
  832. can still happen under certain circumstances.  It can also happen when using
  833. C-Kermit's TRANSMIT command.  If you are using a Telebit TIES modem, you can
  834. change the modem's escape sequence to an otherwise little-used control
  835. character such as Ctrl-_ (Control-Underscore):
  836.  
  837.   AT S2=31
  838.  
  839. A sequence of three consecutive Ctrl-_ characters will not appear in a
  840. Kermit packet unless you go to extraordinary lengths to defeat more than a few
  841. of Kermit's built-in safety mechanisms.  And if you do this, then you should
  842. also turn off the modem's escape-sequence recognition altogether:
  843.  
  844.   AT S48=0 S2=255
  845.  
  846. But when escape sequence recognition is turned off, "modem hangup"
  847. (<pause>+++<pause>ATH0<CR>) will not work, so you should also be sure to SET
  848. DIAL MODEM-HANGUP OFF.
  849.  
  850.  
  851. TERMINAL EMULATION
  852.  
  853. Except for the OS/2 and Macintosh versions, C-Kermit does not emulate any kind
  854. of terminal.  Rather, it acts more or less as a "transparent pipe", passing
  855. the characters you type during a CONNECT session to the remote host, and
  856. sending the characters received from the remote host to your screen.  Whatever
  857. is controlling your keyboard and screen provides the specific terminal
  858. emulation: a real terminal, a PC running a terminal emulator, etc, or (in the
  859. case of a self-contained workstation) your console driver, a terminal window,
  860. xterm, etc.
  861.  
  862. There are several exceptions to the "transparent pipe" rule:
  863.  
  864.  - During a TELNET ("set host") session, C-Kermit itself executes the
  865.    TELNET protocol and performs TELNET negotiations.  (But it does not
  866.    perform TN3270 protocol or any other type of 3270 terminal emulation.)
  867.  
  868.  - If you have changed your keyboard mapping using SET KEY, C-Kermit replaces
  869.    the characters you type with the characters or strings they are mapped to.
  870.  
  871.  - If you SET your TERMINAL CHARACTER-SET to anything but TRANSPARENT,
  872.    C-Kermit translates your keystrokes (after applying any SET KEY
  873.    definitions) before transmitting them, and translates received characters
  874.    before showing them on your screen.
  875.  
  876.  - If your remote and/or local TERMINAL CHARACTER-SET is an ISO 646 7-bit
  877.    national character set, such as German, French, Italian, Swedish, etc, or
  878.    Short KOI used for Cyrillic, C-Kermit's CONNECT command automatically skips
  879.    over ANSI escape sequences to avoid translating their characters.  Only
  880.    ANSI/ISO standard (VT100/200/300-like) 7-bit escape sequence formats are
  881.    supported for this purpose, no proprietary schemes like H-P, Televideo,
  882.    Tektronix, etc.
  883.  
  884.  - If your version of C-Kermit includes SET TERMINAL APC command, then
  885.    C-Kermit's CONNECT command will handle APC escape sequences if TERMINAL
  886.    APC is not set to OFF (which is the default).
  887.  
  888. If you are running C-Kermit under a console driver, or in a terminal window,
  889. that emulates the VT100, and use C-Kermit to log in to a VMS system, the
  890. console driver or terminal window (not Kermit) is supposed to reply to the
  891. "what are you?" query (ESC Z) from the VAX.  If it doesn't, and you can't make
  892. it do so, then you can (a) live with the "unknown terminal" problem; (b) tell
  893. VMS to SET TERMINAL/DEVICE=VT100; (c) program a key using SET KEY to send the
  894. appropriate sequence and then punch the key at the right time; or (d) use the
  895. VMSLOGIN macro that is defined in CKERMIT.INI to do this for you
  896. automatically.
  897.  
  898. SET SESSION-LOG { TEXT, BINARY }, which is effective in UNIX and AOS/VS but
  899. not other C-Kermit versions, removes CR, DEL, NUL, XON, and XOFF characters
  900. ("Using C-Kermit" neglects to mention that XON and XOFF are removed).  The
  901. TEXT-mode setting is ineffective during SCRIPT command execution, as well as
  902. on X.25 connections.
  903.  
  904.  
  905. KEY MAPPING
  906.  
  907. Except in the OS/2 and Macintosh versions, C-Kermit's key mapping facilities
  908. are limited to normal "ASCII" keys, and cannot be used with function keys,
  909. arrow keys, arcane key combinations, etc.  Since C-Kermit runs on such a wide
  910. variety of hardware platforms (including, for example, more than 300 different
  911. UNIX platforms), it is not possible for C-Kermit to support every conceivable
  912. keyboard under every release of every UNIX (or VMS, or ...) product on every
  913. different kind of computer possibly under all manner of different console
  914. drivers.
  915.  
  916. In technical terms, C-Kermit uses the read() function to read keystrokes, and
  917. read() returns a single byte (value 0 through 255).  C-Kermit's SET KEY
  918. function applies to these single-byte codes.  "Extended function" keys, such
  919. as F-keys, arrow keys, etc, usually return either a 2-byte "scan code" or else
  920. a character string (such as an escape sequence like "ESC O p").  In both
  921. cases, C-Kermit has no way to tell the difference between such multibyte key
  922. values, and the corresponding series of single-byte key values.  This could
  923. only be done by accessing the keyboard at a much lower level in a highly
  924. system-dependent manner, probably requiring tens of thousands of lines of code
  925. to support even a sampling of the most popular workstation / OS combinations.
  926.  
  927. However, most workstation console drivers (terminal emulation windows, etc)
  928. include their own key-mapping facility.  For example, on an IBM RS/6000, the
  929. AIXterm program (in whose window you would run C-Kermit) allows rebinding of
  930. the F1-F12 keys to arbitrary strings.  The same might or might not be true of
  931. DECterm windows, Sun "vttool" or "crttool" windows, etc.  Consult the
  932. technical documentation for your workstation or emulator.
  933.  
  934. The SET KEY command (except in OS/2) does not allow a key definition to be
  935. (or contain) the NUL (\0) character.
  936.  
  937.  
  938. THE TRANSMIT COMMAND
  939.  
  940. Session logging is inactive during the TRANSMIT command, even if you have
  941. given a LOG SESSION command.
  942.  
  943.  
  944. FILE TRANSFER
  945.  
  946. The recovery feature (RESEND command) that was added in edit 190, as noted in
  947. the CKCKER.UPD file, works only for binary-mode transfers.  In order for this
  948. feature to be useful at all, the default for SET FILE INCOMPLETE was changed
  949. from DISCARD to KEEP.  Otherwise an interrupted transfer would leave no
  950. partial file behind unless you had remembered to change the default.  But now
  951. you have to pay closer attention to Kermit's messages to know whether a
  952. transfer succeeded or failed -- previously, if it failed, the file would not
  953. show up on the receiving end at all; in edit 190 and later, you'll get a
  954. partial file which could easily be mistaken for the complete file unless you
  955. change the default back to DISCARD or read the screen messages, or keep a
  956. transaction log.
  957.  
  958. Watch out for SET FILE COLLISION RENAME, especially when used in conjunction
  959. with recovery.  Recall that this option (which is NOT the default) renames
  960. the incoming file if a file already exists with the same name (the default is
  961. to rename the previously existing file, and store the incoming file with its
  962. own name).  It is strongly recommended that you do not use SET FILE COLLISION
  963. RENAME if you ever intend to use the recovery feature:
  964.  
  965.  . When the file is first received by C-Kermit, its name will be changed if
  966.    another file already has the same name.  When you RESEND the same file
  967.    after a failure, C-Kermit will probably try to append the re-sent portion
  968.    to the wrong file.
  969.  
  970.  . Assuming that you get RESEND to work with FILE COLLISION RENAME, C-Kermit,
  971.    when receiving the remainder of the file during a RESEND operation, will
  972.    report back the wrong name.  Nothing can be done about this because the
  973.    name is reported back before the receiving Kermit program finds out that
  974.    it is a recovery operation.   
  975.  
  976. When referring to MS-DOS, Atari ST, OS/2, or other file specifications that
  977. contain backslash characters in a C-Kermit command, you must double each
  978. backslash, for example:
  979.  
  980.   C-Kermit>get c:\\directory\\foo.txt
  981.  
  982. This is because backslash is used in C-Kermit commands for introducing special
  983. character codes, variables, functions, etc.  If you are sending this GET
  984. command to another copy of C-Kermit running as a server, for example on OS/2
  985. or the Atari ST, it too treats backslashes as prefix characters, so you will
  986. need 4 (yes, 4) copies of each backslash:
  987.  
  988.   C-Kermit>get c:\\\\directory\\\\foo.txt
  989.  
  990. NOTE: But read about the new command, SET COMMAND QUOTING OFF, in CKCKER.UPD
  991. for a way around this.
  992.  
  993. ANOTHER NOTE: In OS/2 C-Kermit 5A(190), this restriction is lifted as far as
  994. referring to files on the local OS/2 machine.  You can now refer to these
  995. files using natural OS/2 notation, e.g.
  996.  
  997.   C-Kermit>send c:\letters\oofa.txt
  998.  
  999.  
  1000. Attempting to cancel local-mode file reception at a very early stage (i.e.
  1001. before data packets are exchanged) with X or Z does not work.  Workarounds:
  1002. Use E or Ctrl-C instead, or wait until the first data packets are sent.
  1003.  
  1004. If C-Kermit is sending a file, remote-mode packet-mode breakout (Ctrl-C Ctrl-C
  1005. by default) is not effective until after C-Kermit sends its first packet.  If
  1006. C-Kermit is receiving a file or is in server mode, it will be effective right
  1007. away.  In the former case, the SET DELAY value determines the earliest time at
  1008. which you can break out of packet mode.
  1009.  
  1010. Some communication programs have errors in their implementation of Kermit
  1011. attribute packets.  If you get an error message from your communication
  1012. program like "Attribute error", tell C-Kermit to SET ATTRIBUTES OFF.  Better
  1013. yet, switch to a real Kermit program, such as MS-DOS Kermit.
  1014.  
  1015. When using C-Kermit to transfer files with the HP48SX calculator, you must
  1016. SET FLOW NONE.  The HP48SX does not support flow control, and evidently also
  1017. becomes confused if you attempt to use it.
  1018.  
  1019. Occasionally, when receiving files in remote mode using a large window
  1020. size, attempts to cancel a file (X) can take a long time.
  1021.  
  1022. The fullscreen file transfer display will not work right if your terminal type
  1023. is set incorrectly, or is not known to the host operating system.  Even when
  1024. it does work, it might slow down your file transfers a bit, especially on
  1025. high-speed network connections.  On certain small computers, it has been
  1026. reported to cause increased disk activity due to swapping or paging.  The
  1027. fullscreen display is not particularly useful with speaking or Braille devices.
  1028. In these cases, use SET FILE DISPLAY CRT or SET FILE DISPLAY SERIAL.
  1029.  
  1030. If you have trouble transferring files over a TCP/IP connection, give the
  1031. command:
  1032.  
  1033.   SET PARITY SPACE
  1034.  
  1035. and try again.  If that doesn't work, also try a shorter packet length.
  1036.  
  1037. On the other hand, if file transfers through a TCP/IP connection work, but are
  1038. very slow, use a longer packet length, 2000 or more, and also try increasing
  1039. the window size.  Also, make sure FLOW is NONE since TCP/IP handles flow
  1040. control itself, and XON/XOFF processing only slows things down.
  1041.  
  1042. Some communication software claims to implement sliding windows, but does so
  1043. incorrectly.  If sliding window transfers fail, set C-Kermit's window size to
  1044. the smallest one that works, for example:
  1045.  
  1046.   SET WINDOW 1
  1047.  
  1048. The UNIX version of C-Kermit discards carriage returns when receiving files
  1049. in text mode.  Thus, "bare" carriage returns (sometimes used to achieve
  1050. overstriking) are lost.
  1051.  
  1052. SET FILE COLLISION BACKUP is the default.  This means:
  1053.  
  1054.  - If you send the same file lots of times, there will be many backup files.
  1055.    There is no automatic mechanism within Kermit to delete them, no notion of
  1056.    a "version retention count", etc.
  1057.  
  1058.  - If a file arrives that has the same name as a directory, the file transfer
  1059.    fails.  Send the file with another name, or use SET FILE COLLISION RENAME.
  1060.  
  1061. SET FILE COLLISION UPDATE depends on the date/time stamp in the attribute
  1062. packet.  However, this is recorded in local time, not GMT, and there is no
  1063. indication of time zone.  The time is expressed to the precision of 1 second,
  1064. but some file systems do not record with this precision -- for example, MS-DOS
  1065. records the file date/time only to the nearest 2 seconds.  This might cause
  1066. update operations to send more files than necessary.
  1067.  
  1068. SET FILE COLLISION OVERWRITE is risky, use it with caution.  Under certain
  1069. conditions, the existing file can be deleted even if the incoming file is
  1070. refused.
  1071.  
  1072. When C-Kermit is receiving files from another Kermit program that has been
  1073. given the MAIL or REMOTE PRINT command, C-Kermit follows the current filename
  1074. collision action.  This can be disconcerting if the action was (for example)
  1075. BACKUP, because the existing file will be renamed, and the new file will be
  1076. mailed (or printed) and then deleted.  Kermit cannot temporarily change to
  1077. RENAME because the file collision action occurs when the filename packet is
  1078. received, and the PRINT or MAIL disposition only comes later, in the Attribute
  1079. packet.
  1080.  
  1081. The STATISTICS command will produce an incorrect efficiency report if (a) it
  1082. does not know the true communication speed (e.g. on a network connection), or
  1083. (b) it knows the true serial interface speed to a modem, but the modem is
  1084. using a different communication speed with the other modem.  Similarly, in
  1085. these circumstances, C-Kermit's automatic calculation of the packet timeout
  1086. interval might also be incorrect, which can cause file transfers to fail.  One
  1087. solution to the latter problem is to SET SEND and RECEIVE TIMEOUT to
  1088. appropriate values for your true communication speed and packet length.
  1089.  
  1090. TELNET option negotiations are not handled during file transfer.  So far, no
  1091. ill effects have been noted.
  1092.  
  1093. Why is Kermit file transfer over a TCP/IP connection slower than FTP?  Because
  1094. the Kermit program on the remote end of the connection is not running directly
  1095. on a TCP socket, but rather running underneath a TELNET server, usually on a
  1096. pseudoterminal and under a login shell, with the vast amounts of per-character
  1097. overhead all of that implies.  Future Kermit releases will be able to act
  1098. directly as TCP servers, eliminating all this overhead.
  1099.  
  1100. Execution of multiple file transfers by C-Kermit from a command file when
  1101. in remote mode might exhibit long delays between each transfer.  To avoid
  1102. this, just include the command "SET DELAY 0" in your command file before any
  1103. of the file-transfer commands.
  1104.  
  1105.  
  1106. SCRIPT PROGRAMMING
  1107.  
  1108. The CKERMIT.INI file that was originally distributed with C-Kermit 5A(188)
  1109. and (189) contained a nonfunctional CISLOGIN (CompuServe Login) macro.
  1110. Fixed in CKERMIT.INI dated September 2, 1993, or later.
  1111.  
  1112. Remember that ";" and "#" introduce comments when (a) they are the first
  1113. character on the line, or (b) they are preceded by at least one blank or
  1114. tab.  Thus constructions like:
  1115.  
  1116.   INPUT 5 ;
  1117.   SCRIPT ~0 #--#--# 
  1118.  
  1119. must be coded using backslash notation to keep the data from being ignored:
  1120.  
  1121.   INPUT 5 \59            ; 59 is the decimal ASCII code for ";"
  1122.   SCRIPT ~0 \43--#--#        ; 43 is the decimal ASCII code for "#"
  1123.  
  1124. or, more simply:
  1125.  
  1126.   INPUT 5 \;                    ; Just quote the semicolon
  1127.   SCRIPT ~0 \#--#--#            ; Just quote the "#"
  1128.  
  1129. INPUT and REINPUT caseless string comparisons do not work for non-ASCII
  1130. (international) characters.  Workaround: SET INPUT CASE OBSERVE.  Even then,
  1131. the "lexically less than" and "lexically greater than" operations (IF LLT, IF
  1132. LGT) probably won't work as expected.  The same is true for the
  1133. case-conversion functions \Flower() and \Fupper().  C-Kermit does not know the
  1134. collating sequence for different character sets and languages.  (On the other
  1135. hand, it might work depending on such items as how Kermit was linked, whether
  1136. your operating supports "locales", etc)
  1137.  
  1138. You can't include a NUL character (\0) in C-Kermit command text without
  1139. terminating the character string in which it appears.  For example:
  1140.  
  1141.   echo In these brackets [\0] is a NUL
  1142.  
  1143. will echo "In these brackets [".  This applies to ECHO, INPUT, OUTPUT, and all
  1144. other commands (but you can represent NUL by "\N" in an OUTPUT string).  This
  1145. is because C-language strings are terminated internally by the NUL character,
  1146. and it allows all of C-Kermit's string comparison and manipulation functions
  1147. to work in the normal "C" way.
  1148.  
  1149. To illustrate:
  1150.   INPUT 5 \0
  1151. is equivalent to:
  1152.   INPUT 5
  1153. and:
  1154.   INPUT 5 ABC\0DEF
  1155. is equivalent to:
  1156.   INPUT 5 ABC
  1157.  
  1158. INPUT operations discard and ignore NUL characters that arrive from the
  1159. communication device, meaning that they do not figure into matching operations
  1160. (e.g. A<NUL>B matches AB); they are not deposited in the INPUT buffer
  1161. (\v(input)); and they are not counted in \v(incount), with two exceptions:
  1162.  
  1163.   1. An arriving NUL character restarts the INPUT SILENCE timer.
  1164.  
  1165.   2. An arriving NUL character terminates the INPUT command with the
  1166.      SUCCESS condition if the INPUT command was given an empty search
  1167.      string.  In this case \v(incount) is set to 1.
  1168.  
  1169. Also, the \v(inchar) variable is null (completely empty) if the last INPUT
  1170. character was NUL.  That is, there is no way to tell only by looking at
  1171. \v(inchar) the difference between a NUL that was INPUT and no INPUT at all.
  1172. If the INPUT command succeeded but \v(inchar) is empty, then a NUL character
  1173. was input.  Also, \v(incount) will be set to 1.
  1174.  
  1175. \v(incount) and \v(inchar) are NOT affected by the CLEAR command.
  1176.  
  1177. GOTO can be used sort of like switch/case.  For example, if you know that the
  1178. value of \%a is 1, 2, or 3, you can "goto \%a" provided you have labels :1,
  1179. :2, and :3.  What it missing, however, is an automatic way to trap failing
  1180. GOTOs, similar to the "default:" clause of a C switch() statement.
  1181.  
  1182. The following script program:
  1183.  
  1184.   set count \ffiles(oofa.*)
  1185.   :loop
  1186.   send \fnextfile()
  1187.   if count goto loop
  1188.  
  1189. does not work as expected.  The SEND command (and any other command that
  1190. parses a filename, including TAKE) implicitly calls the same internal function
  1191. that \ffiles() calls, and thus destroys the file list set up in the first
  1192. line.  To accomplish this type of operation: (1) give the wild filespec to
  1193. \ffiles(); (2) loop through the file list and assign each filename to an array
  1194. element; (3) use the array of filenames in subsequent file-related commands.
  1195. Example:
  1196.  
  1197.   asg \%n \ffiles(\%1)
  1198.   declare \&f[\%n]
  1199.   for \%i 1 \%n 1 { asg \&f[\%i] \fnextfile() }
  1200.   for \%i 1 \%n 1 { -
  1201.     send \&f[\%i] -
  1202.   }
  1203.  
  1204. Certain settings are local to each command level, meaning that subordinate
  1205. command levels (macros or command files) can change them without affecting
  1206. their values at higher command levels.  When a new command level is invoked,
  1207. the value is inherited from the previous level.  These settings are:
  1208.  
  1209.   CASE
  1210.   COUNT and \v(count)
  1211.   INPUT CASE
  1212.   INPUT TIMEOUT
  1213.   MACRO ERROR
  1214.   TAKE ERROR
  1215.  
  1216. This arrangement allows CASE, TIMEOUT, and ERROR settings, which are used to
  1217. control automatic exit from a command file or macro upon error, to be
  1218. automatically restored when the command file or macro exits.
  1219.  
  1220. The COUNT variable follows this rule too, which permits nested SET COUNT /
  1221. IF COUNT loops, as in this example in which the inner loop counts down from
  1222. the current COUNT value of the outer loop (try it):
  1223.  
  1224.   DEFINE INNER WHILE COUNT { WRITE SCREEN {   Inner:}, SHOW COUNT }
  1225.   SET COUNT 5
  1226.   WHILE COUNT { WRITE SCREEN Outer:, SHOW COUNT, DO INNER }
  1227.  
  1228. Keep in mind that an inferior command level cannot manipulate the COUNT
  1229. value held by a higher level.  For example:
  1230.  
  1231.   DEFINE OOFA SHOW COUNT, IF COUNT GOTO LOOP
  1232.   SET COUNT 5
  1233.   :LOOP
  1234.   OOFA
  1235.   ECHO Done
  1236.  
  1237. results in an infinite loop; the COUNT value remains at 5 because it is never
  1238. decremented at the same level at which it was set.
  1239.  
  1240. NOTE: "WHILE COUNT" did not work prior to edit 095 of ckuusr.c, 19 Jan 93.
  1241.  
  1242. (End of CKCKER.BWR)
  1243.