home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / misc / ck5a189 / ckcker.bwr < prev    next >
Text File  |  2020-01-01  |  41KB  |  823 lines

  1. CKCKER.BWR          "Beware File" for C-Kermit Version 5A        -*- text -*-
  2.  
  3. Applies to 5A(189)
  4. Last update: Sat Nov 20 15:49:04 1993
  5.  
  6. Authors: Frank da Cruz, Christine M. Gianone, Columbia University.
  7.  
  8.   Copyright (C) 1985, 1993, 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.  
  21.   Internet: fdc@columbia.edu
  22.   BITNET/EARN: FDCCU@CUVMA
  23.  
  24. C-Kermit 5A is documented in the book "Using C-Kermit" by Frank da Cruz and
  25. Christine M. Gianone, Digital Press, Burlington, MA, USA, 1993.  Digital Press
  26. ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3.  Price: US $34.95.  In
  27. USA, call DECdirect at 1-800-344-4825, refer to order number EY-J896E-DP.
  28.  
  29. NOTE: Several changes have been made to C-Kermit since the 5A(188) release.
  30. These are listed in CKCKER.UPD.
  31.  
  32.  
  33. THE C-KERMIT COMMAND PARSER
  34.  
  35.  . There is no command recall or retry.
  36.  . VAX/VMS-style command parsing (arrow keys, etc) is not supported.
  37.  . EMACS- or VI-style command line editing is not supported.
  38.  . Typeahead is presently not allowed.
  39.  . Editing keys are hardwired (Ctrl-U, Ctrl-W, etc).
  40.  
  41. If you specify an alternate initialization file on the command line (using the
  42. -y option) and the file doesn't exist or can't be opened, no error is reported.
  43.  
  44. If you use the backslash (\) prefix to enter a control character, space, or
  45. question mark into a command literally, the backslash disappears and is
  46. replaced by the quoted character.  If it was a control character, it is shown
  47. as a circumflex (^).  This allows editing (backspace, delete, Ctrl-W) to work
  48. correctly.
  49.  
  50. If you quote special characters in a filename (e.g. in the SEND command),
  51. filename completion may seem to work incorrectly.  For example, if you have a
  52. file whose name is a*b (the name really contains an asterisk), and you type
  53. "send a\\*<ESC>", the "b" will not appear, nor will Ctrl-R redisplay the
  54. completed name correctly.  But internally the file name is recognized anyway.
  55.  
  56. Question-mark help does not work during execution of an ASKQ command.  The
  57. question marks are simply accepted as text.
  58.  
  59. The maximum length for a variable name is 20 characters.  For array
  60. declarations and references, that includes the subscript.  So, for example:
  61.  
  62.   \%a[\m(max_services)]
  63.  
  64. is one character too long (this can be changed by redefining the symbol VNAML
  65. in ckuusr.h and recompiling C-Kermit).
  66.  
  67. Some other maximums to watch out for:      Symbol    Value Defined in
  68.                                      
  69.  Nesting level for command files:           MAXTAKE      30  ckuusr.h
  70.  Nesting level for macros:                  MACLEVEL     50  ckuusr.h
  71.  Nesting level for FOR / WHILE loops:       FORDEPTH     10  ckuusr.h
  72.  Number of macros:                          MAC_MAX     256  ckuusr.h
  73.  Size of INPUT buffer:                      INPBUFSIZ   256  ckuusr.h
  74.  Filespecs in MSEND command:                MSENDMAX    100  ckuusr.h
  75.  Length of MSEND or GET string:             FSPECL      300  ckuusr.h
  76.  Length for GOTO target label:              LBLSIZ       50  ckuusr.h
  77.  Number of characters in a command:         CMDBL      1024  ckucmd.h
  78.  Number of chars in a field of a command:   ATMBL       256  ckucmd.h
  79.  \fexecute() recursion depth limit          CMDDEP       20  ckucmd.h
  80.  
  81. ASK and ASKQ treat semicolon preceded by whitespace as a comment introducer.
  82. If the user's response includes a semicolon preceded by whitespace, these and
  83. all subsequent characters are discarded.  To include a semicolon preceded by
  84. whitespace, the user can prefix the semicolon with a backslash.
  85.  
  86. ASK and ASKQ strip leading and trailing spaces from what the user types.  This
  87. happens way down deep in the command parser -- it's nothing special about ASK
  88. and friends.  The only way around this that works in both C-Kermit and MS-DOS
  89. Kermit is for the user (the one who is responding to the ASK prompt) to type
  90. (the first) leading space as "\32" and the (final) trailing space as "\32".
  91. In this example, the password begins with 2 leading blanks and ends with two
  92. trailing blanks, and "Passwd:" is the ASK prompt:
  93.  
  94.   Passwd:\32 secret \32
  95.  
  96. Of course, the user could also type *all* blanks as \32.
  97.  
  98. In OUTPUT commands only, \B and \\B send a BREAK signal, and \L and \\L send a
  99. Long BREAK signal.  If you really want to output a backslash followed by a B
  100. or an L, use "output \\\\B" or "output \\\\L" (yes, four backslashes).
  101.  
  102. On certain SCO UNIX systems, the RETURN command doesn't work right.  Example:
  103.  
  104.   C-Kermit>define first return 1
  105.   C-Kermit>first
  106.   C-Kermit>echo \v(return)
  107.   return                    <--- This should say "1"
  108.   C-Kermit>
  109.  
  110. Cause and cure are unknown.
  111.  
  112. The "more?" prompting used during SHOW VARIABLES won't work right if the
  113. INPUT buffer (\v(input)) contains linefeeds, in which case one or more lines
  114. can scroll off the screen before you have a chance to read them.
  115.  
  116.  
  117. MULTIPLE SESSIONS
  118.  
  119. C-Kermit does not support multiple sessions.  When you SET LINE (or SET PORT,
  120. same thing) to a new device, or SET HOST to a new host, the previous SET LINE
  121. device or network host connection is closed, resulting in hangup of the modem
  122. or termination of the network connection.  In windowing environments like
  123. NeXTSTEP, OS/2, etc, you can run separate copies of Kermit in different
  124. windows to achieve multiple sessions.
  125.  
  126.  
  127. NETWORK COMMUNICATION
  128.  
  129. On a TCP/IP TELNET connection, you should normally have PARITY set to NONE
  130. and FLOW-CONTROL also set to NONE.  If file transfer does not work with these
  131. settings (for example, because the remote TELNET server only gives a 7-bit
  132. data path), use SET PARITY SPACE.  Do not use SET PARITY MARK, EVEN, or ODD
  133. on a TELNET connection.
  134.  
  135. If echoing does not work right after connecting to a network host or after
  136. dialing through a TCP/IP modem server, it probably means that the TELNET
  137. server on the far end of the connection is executing the TELNET protocol
  138. incorrectly.  After initially connecting and discovering incorrect echoing
  139. (characters are echoed twice, or not at all), escape back, give the
  140. appropriate SET DUPLEX command (FULL or HALF), and then CONNECT again.
  141. For a consistently misbehaving connection, you can automate this process in
  142. a macro or TAKE file.
  143.  
  144. TELNET sessions are treated just like serial communications sessions as far
  145. as "terminal bytesize" and "command bytesize" are concerned.  If you need to
  146. view 8-bit characters during a TELNET session, you must tell C-Kermit to
  147. SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, and SET PARITY NONE.
  148.  
  149.  
  150. MODEM DIALING
  151.  
  152. Here are a few points to clarify the purpose of SET DIAL SPEED-MATCHING:
  153.  
  154.  1. This command does not do anything at all to the modem.  Rather, it
  155.     tells C-Kermit whether or not to change its interface speed in response
  156.     to the speed given in the modem's CONNECT message.  By default,
  157.     SPEED-MATCHING is ON, so Kermit does indeed attempt to change its speed.
  158.  
  159.  2. This implies that when DIAL SPEED-MATCHING is ON:
  160.  
  161.     (a) Your modem must be configured to report its *interface* speed in the
  162.         CONNECT message, rather than the connection (modulation) speed.
  163.  
  164.     (b) Your computer (and C-Kermit) must support all connection speeds that
  165.         might be reported by your modem.  SET SPEED ? will give you a list of
  166.         the speeds that your version of C-Kermit knows about.
  167.  
  168.  3. If conditions (a) and (b) cannot be satisfied, then you must:
  169.  
  170.     (a) Configure your modem to lock its interface speed
  171.  
  172.     (b) Tell C-Kermit to SET DIAL SPEED-MATCHING OFF
  173.  
  174. To illustrate, suppose you have a V.32bis modem.  When it connects to a
  175. remote V.32bis modem, it might issue a message like:
  176.  
  177.   CONNECT 14400
  178.  
  179. But 14400 bps is not a speed that is supported by most operating systems
  180. and so C-Kermit might fail to adjust its speed according to this report.
  181. Therefore, you must lock the modem's interface speed at a higher speed (such
  182. as 19200, 38400, or 57600) that is supported by C-Kermit, set C-Kermit to the
  183. same speed, and tell C-Kermit to SET DIAL SPEED-MATCHING OFF.
  184.  
  185. C-Kermit knows about a large number of modems, depending on how it was built
  186. (type "set modem ?" and "show features" for further info).  This knowledge is
  187. imbedded in the SET MODEM and DIAL commands.  If you are having trouble
  188. dialing your modem, SET DIAL DISPLAY ON to watch the dialing interactions
  189. between C-Kermit and your modem.  Consult pages 65-66 of "Using C-Kermit" for
  190. modem-dialing troubleshooting instructions.
  191.  
  192. If it takes your call longer to be completed than the timeout interval that
  193. C-Kermit calculates, you can use the SET DIAL TIMEOUT command to override
  194. C-Kermit's value.  But beware: the modem has its own timeout for completing
  195. the call.  If it is a Hayes-like modem, C-Kermit adjusts the modem's value
  196. too by setting register S7.  But the maximum value for S7 might be smaller
  197. than the time you need!  In that case, C-Kermit sets S7 to 0, 255, or other
  198. (modem-specific) value to signify "no timeout".
  199.  
  200. WARNING: Certain modems might have a maximum dial timeout shorter than what
  201. Kermit expects it to be.  If Kermit attempts to set register S7 to a value
  202. higher than your modem's maximum, the modem will say "ERROR" and you will get
  203. a "Failure to initialize modem" error.  In that case, use SET DIAL TIMEOUT to
  204. override C-Kermit's calculation of the timeout value with the highest value
  205. that is legal for your modem, e.g. 60.
  206.  
  207. How to DIAL from a TCP/IP reverse terminal server (modem server):
  208.  
  209.  1. (only if neccessary) SET TELNET ECHO REMOTE
  210.  2. SET HOST <terminal-server-ip-name-or-address> [ <port> ]
  211.  3. SET MODEM <modem-type>
  212.  4. (only if necessary) SET DIAL HANGUP OFF
  213.  5. DIAL <phone-number>
  214.  
  215. The order is important.
  216.  
  217. The SET DIAL KERMIT-SPOOF command works only for Telebit and US Robotics modem
  218. types; it is OFF by default.  You may wish to experiment with large packets
  219. (1K or greater) and various window sizes with spoofing disabled in the modem.
  220. In most situations the transfer rates achieved under these conditions are
  221. better than with protocol spoofing turned on.  Also, attribute (A) packets are
  222. not passed by current Telebit modems with spoofing enabled so if they are
  223. desired spoofing must be turned off.
  224.  
  225. DEC modems...  Reportedly, these don't work right when connected to a DEC
  226. terminal server -- result codes are never reported (on the other hand, this
  227. might be a modem configuration problem).  Dialing "by hand", "blind" still
  228. works.  Also, reportedly "For people who do have DEC modems directly connected
  229. to DEC computers the DF03, DF100-series, and DF200-series modem dialers should
  230. work.  The only thing that is not straightforward is that the DF124-CA,
  231. DF124-CM modems must use the the DF200-series since they speak Digital Modem
  232. Command Language (DMCL) and AT commands.  The Digital Scholar Plus is a DF242
  233. so it uses the DF200-series."
  234.  
  235. If C-Kermit's dialing methods are insufficient for your purposes, you can
  236. write a C-Kermit script program to do the dialing.  Or you can use (or write)
  237. another program to accomplish the dialing, and then run C-Kermit "underneath"
  238. your dialing program by giving it the open file descriptor:
  239.  
  240.   kermit -l <n> -m unknown
  241.  
  242. where <n> is the numeric file desciptor.  (This feature is available in the
  243. UNIX and OS/2 versions of C-Kermit.)  Or you can modify the ckudia.c module.
  244.  
  245.  
  246. HAYES AND COMPATIBLE MODEMS
  247.  
  248. C-Kermit should work correctly with Hayes and other modems that use the AT
  249. command set.  These include Hayes 1200, Hayes 2400, and Hayes 9600 bps modems,
  250. compatibles, as well as Telebit and HST modems.  See the next section for
  251. Telebit information.  C-Kermit sends AT commands to the modem and then reads
  252. the modem's response.  The code is designed to work whether the modem is
  253. configured to echo its commands (E1) or not (E0), and whether it replies with
  254. numeric (V0) or word (V1) result codes.  C-Kermit does not change the echoing
  255. state or result code mode of the modem.  However, C-Kermit issues the Q0
  256. command to the modem to ensure that it *does* produce result codes.  C-Kermit
  257. assumes the modem's Command Line Terminator (S3) is 13 (carriage return).  If
  258. it isn't, C-Kermit's dialog with the modem probably won't work correctly.
  259.  
  260.  
  261. TELEBIT MODEM DIALING SUPPORT
  262.  
  263. There are numerous Telebit modem models, with differing capabilities and
  264. features.  C-Kermit tries to support them all in a model-independent way.  
  265. To use a Telebit modem, any model, SET MODEM as follows:
  266.  
  267. TELEBIT
  268.   Dial and attempt to connect using the highest protocol appropriate to
  269.   the interface speed between the computer and the modem, and fall back
  270.   automatically to the highest protocol and speed supported by the answering
  271.   modem.  For example, if your interface speed is 19200 bps and you have a
  272.   PEP-capable Telebit, it will start in PEP mode, fall back to one of the
  273.   2400-bps standards, then one of the 1200 bps standards, etc, depending on
  274.   its configuration (see your Telebit manual).
  275.  
  276. PEP-TELEBIT
  277.   Dial in PEP mode, and connect only if the remote modem answers in PEP mode.
  278.   Does not work with Telebit models that do not support PEP.  See Table III.
  279.  
  280. V32-TELEBIT
  281.   Dial in V.32 mode (9600 bps), fall back from there.  Works only with Telebit
  282.   models that support V.32; see Table III.  NOTE: V.32 calls are supposed to
  283.   work no matter what your interface speed is, but it has been observed that
  284.   when calling certain non-Telebit V.32 modems, the connection is not made
  285.   successfully unless C-Kermit's interface speed to the Telebit is 9600.
  286.  
  287. V42-TELEBIT
  288.   Enable V.42 error correction, allowing fallback to MNP, and from there to
  289.   direct (no error correction).  NOTE: Fallback to MNP from V.42 is allowed
  290.   even if DIAL MNP-ENABLE is OFF.  Works only with Telebit models supporting
  291.   V.42 error control.  See Table III.
  292.  
  293. SLOW-TELEBIT
  294.   Dial at 2400 bps (V.22bis), fall back from there.
  295.  
  296. Telebit modems come in many models that differ not only as to features but
  297. also which commands control which features.  The features, commands, and
  298. acceptable S-register values (and their meanings) can vary not only among
  299. models, but even among different ROM versions on the same model.  Rather than
  300. have dozens of separate SET MODEM TELEBIT-xxx commands, C-Kermit queries the
  301. modem for its model number with an ATI command, and then adjusts its modem
  302. commands accordingly.  Responses to the ATI command are shown in Table I.
  303.  
  304.  
  305. ---------------------------------------------------------------------------
  306. Table I: Telebit Modem ATI Command Responses
  307. ---------------------------------------------------------------------------
  308.   ATI  Model Numbers           Examples
  309.   ---  -------------           --------
  310.   123                          Telebit in "total Hayes-1200" emulation mode
  311.   960                          Telebit in Conventional Command (Hayes) mode
  312.   961  RA12C                   IBM PC internal original Trailblazer
  313.   962  RA12E                   External original Trailblazer, DCA Fastlink,
  314.                                  or Racal-Milgo RM1822
  315.   963  RM12C                   Rackmount original Trailblazer
  316.   964  T18PC                   IBM PC internal Trailblazer-Plus (TB+)
  317.   965  T18SA, T2SAA, T2SAS     External TB+, T1600, T2000, T3000, WB, and later
  318.                                  or Ven-Tel Pathfinder EC18K (see below)
  319.   966  T18RMM                  Rackmount TB+
  320.   967  T2MC                    IBM PS/2 internal TB+
  321.   968  T1000                   External T1000
  322.   969  ?                       QBlazer
  323.   971  T25SA                   External T2500 or T1500 (see below)
  324.   972  T25RM                   Rackmount T2500
  325. ---------------------------------------------------------------------------
  326.  
  327. Certain incompatible models show the same response to ATI.  The ATI3
  328. command is used to differentiate among them, as shown in Table II.
  329.  
  330. ---------------------------------------------------------------------------
  331. Table II: Telebit Modem ATI3 Command Responses
  332. ---------------------------------------------------------------------------
  333. ATI        If ATI3 Response 
  334. Response   Contains            Telebit Model Is
  335. --------   -----------------   ----------------
  336.  965       "T1600"             T1600
  337.  965       "T3000"             T3000
  338.  965       "World"             WorldBlazer
  339.  965       "Version B"         TrailBlazer-Plus or T2000 external version 1
  340.  965       "TBSA"              TrailBlazer-Plus or T2000 external version 2
  341.  965       "TBRM"              TrailBlazer-Plus or T2000 rackmount version 2
  342.  965       "DC"                Ven-Tel Pathfinder EC18K (= TB+ version 1)
  343.  971       "T1500"             T1500
  344.  971       (anything else)     T2500
  345. ----------------------------------------------------------------------------
  346.  
  347.  
  348. The features of the various models and the commands used by Kermit to control
  349. them are shown in Table III.  The commands in the PEP column are used to force
  350. PEP and allow compression (SET MODEM PEP-TELEBIT).  The commands in the V.32
  351. column are used with SET MODEM V32-TELEBIT.  The commands in the V.42 column
  352. are used with SET MODEM V42-TELEBIT.  The commands in the MNP column are used
  353. if SET DIAL MNP-ENABLE is ON and the modem type is TELEBIT, PEP-TELEBIT, or
  354. V32-TELEBIT, SLOW-TELEBIT, but not V42-TELEBIT; if SET MNP-ENABLE is OFF, the
  355. S-registers in the MNP column are set to 0.  The Pass BREAK column shows the
  356. commands used to ensure that the modem passes the BREAK signal through (rather
  357. than treating it as an "escape-to-command-mode" signal).
  358.  
  359. -------------------------------------------------------------------------------
  360. Table III.  Telebit Modem Features and Commands
  361. ------+---------------------+-------+--------+--------+-------------+----------
  362.       |                     |       |        |        |             | Kermit
  363. Model |      PEP            | V.32  |  V.42  | MNP    | Pass BREAK  | Spoof
  364. ------+---------------------+-------+--------+--------+-------------+----------
  365. TB    | S50=255 S110=1      |  No   |  No    | S95=2  |    S54=3    | PEP only
  366. TB+   | S50=255 S110=1      |  No   |  **    | S95=2  |    S54=3    | PEP only
  367. T2000 | S50=255 S110=1      |  No   |  **    | S95=2  |    S54=3    | PEP only
  368. T1000 | S50=255 S110=1      |  No   |  No    | S95=2  |    S54=3    | PEP only
  369. T2500 | S50=255 S110=1      | S50=6 |  No    | S95=2  |    S54=3    | PEP only
  370. T1500 |      No             | S50=6 |  **    | S95=2  |    S54=3    | PEP,V.32
  371. ------+---------------------+-------+--------+--------+-------------+----------
  372. T1600 |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  373. T3000 |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  374. QB    |      No             | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | No
  375. WB    | S50=255S190=1S191=7 | S50=6 | S180=2 | S180=3 | S61=0 S63=0 | PEP,V.32
  376. ------+---------------------+-------+--------+--------+-------------+----------
  377. **  For V.42 error control: "S50=0 S95=2 S97=1 S98=3 S106=1".
  378.  
  379. All models but the QBlazer support Kermit spoof (but see below).
  380.  
  381. Group I (old command set):
  382.  
  383.           TB = Original TrailBlazer (PEP, MNP, V.22bis, V.22, Bell 212A & 103)
  384.          TB+ = TrailBlazer-Plus = TrailBlazer + V.42 (but only in new ROMs)
  385.        T1000 = TrailBlazer-Plus, speed <= 9600, no PEP compression
  386.        T2000 = TrailBlazer-Plus + SDLC (not used by Kermit, so same as TB+)
  387.        T2500 = TrailBlazer-Plus + V.32 (9600 bps)
  388.        T1500 = T2500 minus PEP
  389.  
  390. Group II (new command set):
  391.  
  392.        T1600 = V.32, MNP, V.22bis, V.22, V.23, Bell 212A & 103
  393. QB = QBlazer = T1600 without Kermit spoof and minus some other options
  394.        T3000 = T1600 + V.32bis (14400 bps)
  395.  WorldBlazer = T3000 + PEP + LZ and V.42bis compression + 76800 & 115200 bps.
  396.  
  397. C-Kermit does not attempt to control whether the modem changes its interface
  398. speed to match the connection speed -- that is up to you; you can configure
  399. the modem any way you prefer (using S51 or, to some extent on new-style modems
  400. S180 and S181), but make sure that the modem's configuration agrees with
  401. C-Kermit's DIAL SPEED-MATCHING setting.  When DIAL SPEED-MATCHING is ON (the
  402. default), C-Kermit changes its interface speed automatically according to the
  403. speed reported in the modem's CONNECT message; when it is OFF, C-Kermit does
  404. not change speed.
  405.  
  406. The DIAL KERMIT-SPOOF command is only effective for the Telebit models that
  407. supply a Kermit spoof, that is, all but the QBlazer.  If the Telebit model is
  408. TrailBlazer, TrailBlazer-Plus, T1000, T2000, or T2500, PEP mode is forced even
  409. if your SET MODEM command specified a Telebit modem type other than
  410. PEP-TELEBIT, because the Kermit spoof only works in PEP mode on those models.
  411. On the other models supporting the Kermit spoof, it works on both PEP
  412. connections and V.32 MNP (but not V.42) connections.  Thus, you might also
  413. have to SET MODEM MNP-ENABLE ON in order to get the Kermit Spoof to work on
  414. these newer models when making a V.32 connection.
  415.  
  416. SHOW DIAL does not show the complete initialization string for Telebit modems.
  417. Telebit modems are initialized in several steps, and the initialization
  418. command depends upon your current communication parameters, which model of
  419. Telebit modem you have (which C-Kermit learns during the modem initialization
  420. process), and other factors.  If you use the SET DIAL INIT-STRING command to
  421. change the initialization string, this disables the multistep process and uses
  422. only the string that you have specified.
  423.  
  424. If you want to use the built-in multi-step process, but you also want to
  425. override one or more of the settings that are done in this process, or add
  426. additional settings, you can use SET DIAL DIAL-COMMAND to add commands to the
  427. dial string (which is normally ATD%s\13), for example "SET DIAL DIAL-COMMAND
  428. AT&C1&D2S181=1DT%s\13".
  429.  
  430. DIALING AND FLOW CONTROL
  431.  
  432. If you have SET FLOW to any of the hardware options supported by your version
  433. of C-Kermit, such as RTS/CTS, and if C-Kermit knows how to set the flow
  434. control on your modem, it will do this as part of the DIAL command.  Caution:
  435.  
  436.  . If C-Kermit's FLOW-CONTROL setting is Xon/Xoff or other type of software
  437.    flow control, C-Kermit will not attempt to change your modem's flow control
  438.    setting, since software flow control is most commonly used end-to-end.  One
  439.    way to engage Xon/Xoff flow control directly between C-Kermit and the
  440.    local modem is to change your modem's DIAL INIT-STRING to do it.
  441.  
  442.  . If your version of C-Kermit does not support SET FLOW RTS/CTS (or other
  443.    hardware options), then C-Kermit will not attempt to change your modem's
  444.    flow control setting.  Change your modem's DIAL INIT-STRING to do it.
  445.  
  446. Hardware flow control options are presently handled only for Telebit modems.
  447. On other modem types, you can set the flow control outside of Kermit, or
  448. change Kermit's DIAL INIT-STRING.
  449.  
  450. Most modern modems support RTS/CTS (if they support any hardware flow control
  451. at all), but some computers use different RS-232 circuits for the same
  452. purposes, e.g. DTR and CD, or DTR and CTS.  In such cases, you might be able
  453. to make your computer work with your modem by appropriately cross-wiring the
  454. circuits in the cable connector, for example the computer's DTR to the modem's
  455. RTS, and modem's CD to the computer's CTS.  HOWEVER, C-Kermit does not know
  456. you have done this.  So if you have (say) SET FLOW DTR/CD, C-Kermit will make
  457. no attempt to tell the modem to use RTS/CTS.  You probably did this yourself
  458. when you configured the modem; if not, you can put the appropriate command in
  459. the DIAL INIT-STRING or DIAL-COMMAND.
  460.  
  461. C-Kermit is fully compatible with "TIES" (Time Independent Escape Sequence)
  462. modems.  A TIES modem does not require any guard time around its escape
  463. sequence.  The following text:
  464.  
  465. +++ATH0
  466.  
  467. if sent through a TIES modem, for example because you were uploading this
  468. file through it, could pop the modem back into command mode and make it hang
  469. up the connection.  Newer versions of the Telebit T1600 and T3000 (version
  470. LA3.01E firmware and later), and all WorldBlazers, use TIES.
  471.  
  472. However, unlike other protocols (such as XMODEM, YMODEM, ZMODEM, SLIP, PPP),
  473. Kermit handles this situation very nicely.  Any sequence of 3 or more repeated
  474. characters is encoded in a special way, so no matter what your escape sequence
  475. is, Kermit transfers won't contain it (note: these comments apply to transfers
  476. between any pair of Kermit programs that negotiate repeat-count compression;
  477. such programs include C-Kermit, MS-DOS Kermit, IBM Mainframe Kermit, and
  478. PDP-11 Kermit).  For example, if your escape sequence is +++, and +++ appears
  479. in your data, it is encoded for transmission as ~#+.
  480.  
  481. TIES can still bite you, however, if you are using Kermit's TRANSMIT command
  482. to upload files through a TIES modem, or, indeed, any time your terminal or
  483. computer sends the escape sequence into the originating modem.  If you are
  484. using a Telebit TIES modem, you can turn off the modem's escape sequence
  485. recognition with:
  486.  
  487.   AT S48=0 S2=255
  488.  
  489. But when escape sequence recognition is turned off, "modem hangup"
  490. (<pause>+++<pause>ATH0<CR>) will not work, so you should also be sure to SET
  491. DIAL MODEM-HANGUP OFF.
  492.  
  493.  
  494. TERMINAL EMULATION
  495.  
  496. Except for the OS/2 and Macintosh versions, C-Kermit does not emulate any kind
  497. of terminal.  Rather, it acts more or less as a "transparent pipe", passing
  498. the characters you type during a CONNECT session to the remote host, and
  499. sending the characters received from the remote host to your screen.  Whatever
  500. is controlling your keyboard and screen provides the specific terminal
  501. emulation: a real terminal, a PC running a terminal emulator, etc, or (in the
  502. case of a self-contained workstation) your console driver, a terminal window,
  503. xterm, etc.
  504.  
  505. There are several exceptions to the "transparent pipe" rule:
  506.  
  507.  - During a TELNET ("set host") session, C-Kermit itself executes the
  508.    TELNET protocol and performs TELNET negotiations.  (But it does not
  509.    perform TN3270 protocol or any other type of 3270 terminal emulation.)
  510.  
  511.  - If you have changed your keyboard mapping using SET KEY, C-Kermit replaces
  512.    the characters you type with the characters or strings they are mapped to.
  513.  
  514.  - If you SET your TERMINAL CHARACTER-SET to anything but TRANSPARENT,
  515.    C-Kermit translates your keystrokes (after applying any SET KEY
  516.    definitions) before transmitting them, and translates received characters
  517.    before showing them on your screen.
  518.  
  519.  - If your remote and/or local TERMINAL CHARACTER-SET is an ISO 646 7-bit
  520.    national character set, such as German, French, Italian, Swedish, etc, or
  521.    Short KOI used for Cyrillic, C-Kermit's CONNECT command automatically skips
  522.    over ANSI escape sequences to avoid translating their characters.  Only
  523.    ANSI/ISO standard (VT100/200/300-like) 7-bit escape sequence formats are
  524.    supported for this purpose, no proprietary schemes like H-P, Televideo,
  525.    Tektronix, etc.
  526.  
  527. If you are running C-Kermit under a console driver, or in a terminal window,
  528. that emulates the VT100, and use C-Kermit to log in to a VMS system, the
  529. console driver or terminal window (not Kermit) is supposed to reply to the
  530. "what are you?" query (ESC Z) from the VAX.  If it doesn't, and you can't make
  531. it do so, then you can (a) live with the "unknown terminal" problem; (b) tell
  532. VMS to SET TERMINAL/DEVICE=VT100; (c) program a key using SET KEY to send the
  533. appropriate sequence and then punch the key at the right time; or (d) use the
  534. VMSLOGIN macro that is defined in CKERMIT.INI to do this for you
  535. automatically.
  536.  
  537. SET SESSION-LOG { TEXT, BINARY }, which is effective in UNIX and AOS/VS but
  538. not other C-Kermit versions, removes CR, DEL, NUL, XON, and XOFF characters
  539. ("Using C-Kermit" neglects to mention that XON and XOFF are removed).  The
  540. TEXT-mode setting is ineffective during SCRIPT command execution, as well as
  541. on X.25 connections.
  542.  
  543.  
  544. KEY MAPPING
  545.  
  546. Except in the OS/2 and Macintosh versions, C-Kermit's key mapping facilities
  547. are limited to normal "ASCII" keys, and cannot be used with function keys,
  548. arrow keys, arcane key combinations, etc.  Since C-Kermit runs on such a wide
  549. variety of hardware platforms (including, for example, more than 280 different
  550. UNIX platforms), it is not possible for C-Kermit to support every conceivable
  551. keyboard under every release of every UNIX (or VMS, or ...) product on every
  552. different kind of computer possibly under all manner of different console
  553. drivers.
  554.  
  555. In technical terms, C-Kermit uses the read() function to read keystrokes, and
  556. read() returns a single byte (value 0 through 255).  C-Kermit's SET KEY
  557. function applies to these single-byte codes.  "Extended function" keys, such
  558. as F-keys, arrow keys, etc, usually return either a 2-byte "scan code" or else
  559. a character string (such as an escape sequence like "ESC O p").  In both
  560. cases, C-Kermit has no way to tell the difference between such multibyte key
  561. values, and the corresponding series of single-byte key values.  This could
  562. only be done by accessing the keyboard at a much lower level in a highly
  563. system-dependent manner, probably requiring tens of thousands of lines of code
  564. to support even a sampling of the most popular workstation / OS combinations.
  565.  
  566. However, most workstation console drivers (terminal emulation windows, etc)
  567. include their own key-mapping facility.  For example, on an IBM RS/6000, the
  568. AIXterm program (in whose window you would run C-Kermit) allows rebinding of
  569. the F1-F12 keys to arbitrary strings.  The same might or might not be true of
  570. DECterm windows, Sun "vttool" or "crttool" windows, etc.  Consult the
  571. technical documentation for your workstation or emulator.
  572.  
  573. The SET KEY command (except in OS/2) does not allow a key definition to be
  574. (or contain) the NUL (\0) character.
  575.  
  576.  
  577. THE TRANSMIT COMMAND
  578.  
  579. Session logging is inactive during the TRANSMIT command, even if you have
  580. given a LOG SESSION command.
  581.  
  582.  
  583. FILE TRANSFER
  584.  
  585. When referring to MS-DOS, Atari ST, OS/2, or other file specifications that
  586. contain backslash characters in a C-Kermit command, you must double each
  587. backslash, for example:
  588.  
  589.   C-Kermit>get c:\\directory\\foo.txt
  590.  
  591. This is because backslash is used in C-Kermit commands for introducing special
  592. character codes, variables, functions, etc.  If you are sending this GET
  593. command to another copy of C-Kermit running as a server, for example on OS/2
  594. or the Atari ST, it too treats backslashes as prefix characters, so you will
  595. need 4 (yes, 4) copies of each backslash:
  596.  
  597.   C-Kermit>get c:\\\\directory\\\\foo.txt
  598.  
  599. Attempting to cancel local-mode file reception at a very early stage (i.e.
  600. before data packets are exchanged) with X or Z does not work.  Workarounds:
  601. Use E or Ctrl-C instead, or wait until the first data packets are sent.
  602.  
  603. If C-Kermit is sending a file, remote-mode packet-mode breakout (Ctrl-C Ctrl-C
  604. by default) is not effective until after C-Kermit sends its first packet.  If
  605. C-Kermit is receiving a file or is in server mode, it will be effective right
  606. away.  In the former case, the SET DELAY value determines the earliest time at
  607. which you can break out of packet mode.
  608.  
  609. Some communication programs have errors in their implementation of Kermit
  610. attribute packets.  If you get an error message from your communication
  611. program like "Attribute error", tell C-Kermit to SET ATTRIBUTES OFF.  Better
  612. yet, switch to a real Kermit program, such as MS-DOS Kermit.
  613.  
  614. Occasionally, when in receiving files in remote mode using a large window
  615. size, attempts to cancel a file (X) can take a long time.
  616.  
  617. The fullscreen file transfer display will not work right if your terminal type
  618. is set incorrectly, or is not known to the host operating system.  Even when
  619. it does work, it might slow down your file transfers a bit, especially on
  620. high-speed network connections.  On certain small computers, it has been
  621. reported to cause increased disk activity due to swapping or paging.  The
  622. fullscreen display is not particularly useful with speaking or Braille devices.
  623.  
  624. If you have trouble transferring files over a TCP/IP connection, give the
  625. command:
  626.  
  627.   SET PARITY SPACE
  628.  
  629. and try again.  If that doesn't work, also try a shorter packet length.
  630.  
  631. On the other hand, if file transfers through a TCP/IP connection work, but
  632. are very slow, use a longer packet length, 2000 or more.  Make sure FLOW is
  633. NONE.
  634.  
  635. Some communication software claims to implement sliding windows, but does so
  636. incorrectly.  If sliding window transfers fail, set C-Kermit's window size to
  637. the smallest one that works, for example:
  638.  
  639.   SET WINDOW 1
  640.  
  641. The UNIX version of C-Kermit discards carriage returns when receiving files
  642. in text mode.  Thus, "bare" carriage returns (sometimes used to achieve
  643. overstriking) are lost.
  644.  
  645. SET FILE COLLISION BACKUP is the default.  This means:
  646.  
  647.  - If you send the same file lots of times, there will be many backup files.
  648.    There is no automatic mechanism within Kermit to delete them, no notion of
  649.    a "version retention count", etc. 
  650.  
  651.  - If a file arrives that has the same name as a directory, the file transfer
  652.    fails.  Send the file with another name, or use SET FILE COLLISION RENAME.
  653.  
  654. SET FILE COLLISION UPDATE depends on the date/time stamp in the attribute
  655. packet.  However, this is recorded in local time, not GMT, and there is no
  656. indication of time zone.  The time is expressed to the precision of 1 second,
  657. but some file systems do not record with this precision -- for example, MS-DOS
  658. records the file date/time only to the nearest 2 seconds.  This might cause
  659. update operations to send more files than necessary.
  660.  
  661. SET FILE COLLISION OVERWRITE is risky, use it with caution.  Under certain
  662. conditions, the existing file can be deleted even if the incoming file is
  663. refused.
  664.  
  665. When C-Kermit is receiving files from another Kermit program that has been
  666. given the MAIL or REMOTE PRINT command, C-Kermit follows the current filename
  667. collision action.  This can be disconcerting if the action was (for example)
  668. BACKUP, because the existing file will be renamed, and the new file will be
  669. mailed (or printed) and then deleted.  Kermit cannot temporarily change to
  670. RENAME because the file collision action occurs when the filename packet is
  671. received, and the PRINT or MAIL disposition only comes later, in the Attribute
  672. packet.
  673.  
  674. The STATISTICS command will produce an incorrect efficiency report if (a) it
  675. does not know the true communication speed (e.g. on a network connection), or
  676. (b) it knows the true serial interface speed to a modem, but the modem is
  677. using a different communication speed with the other modem.  Similarly, in
  678. these circumstances, C-Kermit's automatic calculation of the packet timeout
  679. interval might also be incorrect, which can cause file transfers to fail.  One
  680. solution to the latter problem is to SET SEND and RECEIVE TIMEOUT to
  681. appropriate values for your true communication speed and packet length.
  682.  
  683. TELNET option negotiations are not handled during file transfer.
  684.  
  685. Why is Kermit file transfer over a TCP/IP connection slower than FTP?  Because
  686. the Kermit program on the remote end of the connection is not running directly
  687. on a TCP socket, but rather running underneath a TELNET server, usually on a
  688. pseudoterminal and under a login shell, with the vast amounts of per-character
  689. overhead all of that implies.  Future Kermit releases will be able to act
  690. directly as TCP servers, eliminating all this overhead.
  691.  
  692. BUG: C-Kermit (at least the UNIX version), when told to send a file to which
  693. the user has directory-listing access but does not have read access, goes into
  694. protocol mode, telling the user to escape back and give a RECEIVE command,
  695. etc, and only then does it notice that the file can't be opened, and gives a
  696. "?Read access denied" message -- but this is a terminal message, not an
  697. Error packet, so the user (having escaped back already) never sees it.
  698.  
  699.  
  700. SCRIPT PROGRAMMING
  701.  
  702. The CKERMIT.INI file that was originally distributed with C-Kermit 5A(188)
  703. and (189) contained a nonfunctional CISLOGIN (CompuServe Login) macro.
  704. Fixed in CKERMIT.INI dated September 2, 1993, or later.
  705.  
  706. You can't use END or RETURN statements in FOR, WHILE, and XIF commands (you
  707. can use them, but they won't do what you expect).
  708.  
  709. INPUT and REINPUT caseless string comparisons do not work for non-ASCII
  710. (international) characters.  Workaround: SET INPUT CASE OBSERVE.  Even then,
  711. the "lexically less than" and "lexically greater than" operations (IF LLT, IF
  712. LGT) probably won't work as expected.  The same is true for the
  713. case-conversion functions \Flower() and \Fupper().  C-Kermit does not know the
  714. collating sequence for different character sets and languages.
  715.  
  716. You can't include a NUL character (\0) in C-Kermit command text without
  717. terminating the character string in which it appears.  For example:
  718.  
  719.   echo In these brackets [\0] is a NUL
  720.  
  721. will echo "In these brackets [".  This applies to ECHO, INPUT, OUTPUT, and all
  722. other commands.  This is because C-language strings are terminated internally
  723. by the NUL character, and it allows all of C-Kermit's string comparison and
  724. manipulation functions to work in the normal way.
  725.  
  726. To illustrate:
  727.   INPUT 5 \0
  728. is equivalent to:
  729.   INPUT 5
  730. and:
  731.   INPUT 5 ABC\0DEF
  732. is equivalent to:
  733.   INPUT 5 ABC
  734.  
  735. INPUT operations discard and ignore NUL characters that arrive from the
  736. communication device, meaning that they do not figure into matching operations
  737. (e.g. A<NUL>B matches AB); they are not deposited in the INPUT buffer
  738. (\v(input)); and they are not counted in \v(incount), with two exceptions:
  739.  
  740.   1. An arriving NUL character restarts the INPUT SILENCE timer.
  741.  
  742.   2. An arriving NUL character terminates the INPUT command with the
  743.      SUCCESS condition if the INPUT command was given an empty search
  744.      string.  In this case \v(incount) is set to 1.
  745.  
  746. Also, the \v(inchar) variable is null (completely empty) if the last INPUT
  747. character was NUL.  That is, there is no way to tell only by looking at
  748. \v(inchar) the difference between a NUL that was INPUT and no INPUT at all.
  749. If the INPUT command succeeded but \v(inchar) is empty, then a NUL character
  750. was input.  Also, \v(incount) will be set to 1.
  751.  
  752. \v(incount) and \v(inchar) are NOT affected by the CLEAR command.
  753.  
  754. GOTO can be used sort of like switch/case.  For example, if you know that the
  755. value of \%a is 1, 2, or 3, you can "goto \%a" provided you have labels :1,
  756. :2, and :3.  What it missing, however, is an automatic way to trap failing
  757. GOTOs, similar to the "default:" clause of a C switch() statement.
  758.  
  759. The following script program:
  760.  
  761.   asg \%n \ffiles(\%1)
  762.   set count \%n
  763.   :loop
  764.   asg \%f \fnextfile()
  765.   send \%f
  766.   rem host print \%f
  767.   if count goto loop
  768.  
  769. does not work as expected.  The SEND command (and any other command that
  770. parses a filename) implicitly calls the same internal function that \ffiles()
  771. calls, and thus destroys the file list set up in the first line.  To
  772. accomplish this type of operation: (1) give the wild filespec to \ffiles();
  773. (2) loop through the file list and assign each filename to an array element;
  774. (3) use the array of filenames in subsequent file-related commands.  Example:
  775.  
  776.   asg \%n \ffiles(\%1)
  777.   declare \&f[\%n]
  778.   for \%i 1 \%n 1 { asg \&f[\%i] \fnextfile() }
  779.   for \%i 1 \%n 1 { -
  780.     send \&f[\%i], -
  781.     rem host print \&f[\%i] -
  782.   }
  783.  
  784. Certain settings are local to each command level, meaning that subordinate
  785. command levels (macros or command files) can change them without affecting
  786. their values at higher command levels.  When a new command level is invoked,
  787. the value is inherited from the previous level.  These settings are:
  788.  
  789.   CASE
  790.   COUNT and \v(count)
  791.   INPUT CASE
  792.   INPUT TIMEOUT
  793.   MACRO ERROR
  794.   TAKE ERROR
  795.  
  796. This arrangement allows CASE, TIMEOUT, and ERROR settings, which are used to
  797. control automatic exit from a command file or macro upon error, to be
  798. automatically restored when the command file or macro exits.
  799.  
  800. The COUNT variable follows this rule too, which permits nested SET COUNT /
  801. IF COUNT loops, as in this example in which the inner loop counts down from
  802. the current COUNT value of the outer loop (try it):
  803.  
  804.   DEFINE INNER WHILE COUNT { WRITE SCREEN {   Inner:}, SHOW COUNT }
  805.   SET COUNT 5
  806.   WHILE COUNT { WRITE SCREEN Outer:, SHOW COUNT, DO INNER }
  807.  
  808. Keep in mind that an inferior command level cannot manipulate the COUNT
  809. value held by a higher level.  For example:
  810.  
  811.   DEFINE OOFA SHOW COUNT, IF COUNT GOTO LOOP
  812.   SET COUNT 5
  813.   :LOOP
  814.   OOFA
  815.   ECHO Done
  816.  
  817. results in an infinite loop; the COUNT value remains at 5 because it is never
  818. decremented at the same level at which it was set.
  819.  
  820. NOTE: "WHILE COUNT" did not work prior to edit 095 of ckuusr.c, 19 Jan 93.
  821.  
  822. (End of CKCKER.BWR)
  823.