home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit70 / ckcbwr.txt < prev    next >
Text File  |  2020-01-01  |  59KB  |  1,262 lines

  1. CKCBWR.TXT           "Beware File" for C-Kermit Version 7.0        -*- text -*-
  2.  
  3. As of C-Kermit version:  7.0.197
  4. This file last updated:  8 February 2000
  5.  
  6. Authors: Frank da Cruz and Christine M. Gianone, Columbia University.
  7.  
  8.   Copyright (C) 1985, 2000,
  9.     Trustees of Columbia University in the City of New York.
  10.     All rights reserved.  See the C-Kermit COPYING.TXT file or the
  11.     copyright text in the ckcmai.c module for disclaimer and permissions.
  12.  
  13. Report problems, suggestions, fixes, etc, to:
  14.  
  15.   The Kermit Project
  16.   Columbia University
  17.   612 West 115th Street
  18.   New York NY 10025-7799
  19.   USA
  20.   Email: kermit-support@columbia.edu
  21.   Web:   http://www.columbia.edu/kermit/
  22.   News:  comp.protocols.kermit.misc
  23.  
  24.  
  25. DOCUMENTATION
  26.  
  27.   Frank da Cruz and Christine M. Gianone, "Using C-Kermit", Second Edition,
  28.   1997, Digital Press / Butterworth-Heinemann, Woburn, MA, ISBN 1-55558-164-1
  29.   US single-copy price: $44.95; quantity discounts available.  Available in
  30.   computer bookstores or directly from Columbia University:
  31.  
  32.     The Kermit Project
  33.     Columbia University
  34.     612 West 115th Street
  35.     New York NY  10025-7799  USA
  36.     Telephone: +1 (212) 854-3703
  37.     Email: kermit-orders@columbia.edu
  38.     Web: http://www.columbia.edu/kermit/
  39.  
  40.   The CKERMIT2.TXT file contains supplementary info for C-Kermit 7.0 to be
  41.   used until the 3rd edition of the manual is ready.
  42.  
  43.  
  44. WHAT IS IN THIS FILE
  45.  
  46. This is the "beware file" for C-Kermit.  It contains hints and tips,
  47. frequently asked questions (and answers), troubleshooting advice, limitations
  48. and restrictions, known bugs, etc, that apply to all C-Kermit variations.
  49. This file is supplemented by a platform-specific "beware file" for each major
  50. system where C-Kermit runs:
  51.  
  52.   ckubwr.txt - All variations of UNIX: Linux, HP-UX, AIX, SCO, Solaris, etc.
  53.   ckvbwr.txt - Compaq / Digital Equipment Corporation VMS and OpenVMS
  54.   cklbwr.txt - Stratus VOS
  55.   ckdbwr.txt - Data General AOS/VS
  56.   ckmbwr.txt - Apple Macintosh
  57.   ckibwr.txt - Commodore Amiga
  58.   cksbwr.txt - Atari ST
  59.   ck9bwr.txt - Microware OS-9
  60.   ckpbwr.txt - Bell Labs Plan 9
  61.  
  62. This file contains the following sections:
  63.  
  64.    (0) BUGS DISCOVERED SINCE C-KERMIT 7.0 WAS RELEASED
  65.    (1) INCOMPATIBLE CHANGES
  66.    (2) THE C-KERMIT COMMAND PARSER
  67.    (3) MULTIPLE SESSIONS
  68.    (4) NETWORK COMMUNICATION
  69.    (5) THE SERVICES DIRECTORY
  70.    (6) MODEMS AND DIALING
  71.    (7) DIALING HINTS AND TIPS
  72.    (8) TERMINAL SERVERS
  73.    (9) TERMINAL EMULATION
  74.   (10) KEY MAPPING
  75.   (11) THE TRANSMIT COMMAND
  76.   (12) FILE TRANSFER
  77.   (13) SCRIPT PROGRAMMING
  78.  
  79.  
  80. (0) BUGS DISCOVERED SINCE C-KERMIT 7.0 WAS RELEASED
  81.  
  82. The following bugs are known but not yet fixed:
  83.  
  84.  1. If you try:
  85.  
  86.       kermit -g <file>
  87.  
  88.     where file does not exist in the client directory it returns the error:
  89.  
  90.       FAILURE: No filespec given!
  91.  
  92.     instead of:
  93.  
  94.       FAILURE: <file> does not exist.
  95.  
  96.  2. True ISO 8601 date-time format is not supported: yyyymmddThhmmss
  97.     or yyyymmdd hhmmss.  Kermit supports yyyymmdd_hh:mm:ss.
  98.  
  99.  3. Log into IKSD
  100.     GET file1 newname
  101.     Switch to the client's command prompt
  102.     SEND file2
  103.     file2 will be stored on IKSD as newname
  104.  
  105.  4. The new built-in LOGIN command will conflict with any existing LOGIN
  106.     macros.  This is always the case with new commands, but LOGIN is an
  107.     especially likely name for a macro.  To work around, either rename your
  108.     LOGIN macro to something else, or else invoke it with "do login <args>".
  109.  
  110.  5. If a Hayes-command-set modem has "reset on DTR loss" set (&D3) and
  111.     the modem prints OK upon reset, even when the reset happened because
  112.     of DTR loss, Kermit can become mighty confused, especially after a
  113.     HANGUP command.  Elsa MicroLink modems (a German brand) has this
  114.     peculiarity.  The Kermit bug is that the HANGUP command will drop DTR
  115.     even if you SET MODEM HANGUP-METHOD MODEM-COMMAND, *if* the modem
  116.     command fails.  C-Kermit has always operated this way on the assumption
  117.     that if the user says to HANGUP, the user means it.  However, in this
  118.     case, dropping DTR produces the unexpected OK response, and then all
  119.     future dialog is out of sync.  There is no way for the user to tell 
  120.     C-Kermit NOT to drop DTR under these circumstances.  This will be
  121.     fixed in the next release.
  122.  
  123.  6. (Not a bug.)  All RENAME operations are performed using the underlying
  124.     system services for renaming a file.  If the underlying system service
  125.     does not allow files to be renamed across disks, these operations fail.
  126.     This includes the RENAME command and SEND, RECEIVE, or GET /MOVE-TO.  This
  127.     might not be clear enough in the documentation.  Note that in UNIX, there
  128.     is no obvious way for a user to tell whether two directories are on the
  129.     same disk.
  130.  
  131.  7. Various typos and syntax errors in the makefile and source files.  The
  132.     most serious error prevented any and all SCO OSR5 builds from working.
  133.     All these are fixed in C-Kermit 7.0.197, which simply allows builds to
  134.     succeed that didn't in 7.0.196, but which makes no functional changes.
  135.  
  136.  8. Modem signal detection does not work in SCO OSR5 and Unixware 7 (it
  137.     never did).  Cause: POSIX definitions are required for high serial speeds,
  138.     but prevent access to modem signals, since modem signal APIs are not
  139.     defined in POSIX.
  140.  
  141.  9. The new SHIFT command does not decrement \v(argc) if it is used within
  142.     an IF { } or ELSE { } block.
  143.  
  144. 10. When C-Kermit translates from (say) Latin-1 to UTF-8, it fails to convert
  145.     the C1 control bytes.  But text normally does not contain C1 characters so
  146.     this but should have little or no impact.
  147.  
  148. 11. If you TAKE <file> <arg1> <arg2> -- i.e. specify args, then the same args
  149.     remain in effect for the next TAKE command.  This is not really a bug,
  150.     since it's documented, but it's not optimal either, and probably will be
  151.     changed in the next release, so don't depend on this behavior.  In the
  152.     meantime, work around by UNDEF'ing \%1, \%2, ... after any TAKE command
  153.     that includes arguments.
  154.  
  155. 12. The HEBREW7 translation table had a typo preventing translation of the
  156.     letter Tav.
  157.  
  158. 13. SET TRANSFER CHARACTER-SET TRANSPARENT sets up a garbage translation.
  159.     Workaround: give a SET FILE CHARACTER-SET <any-character-set> command
  160.     after SET TRANSFER CHARACTER-SET TRANSPARENT.
  161.  
  162. 14. Automatic text/binary mode switching via filename patterns should ignore
  163.     pathname prefixes and backup suffixes, but does not.
  164.  
  165. 15. The MAIL command doesn't work at all due to an error in the command
  166.     parser.  Use the alternative form, SEND /MAIL:address filename, instead.
  167.  
  168. 16. The server side of the MAIL (SEND /MAIL) command doesn't work on HP-UX.
  169.     It tries to deliver the mail with the "Mail" command, but in HP-UX the
  170.     name of the command is "mailx".  Similar problems might exist on other
  171.     platforms.  The only workaround is to put a symlink from Mail to mailx
  172.     somewhere in your PATH: Mail -> /usr/bin/mailx.
  173.  
  174. 17. There are evidently some unguarded floating-point operations in the code,
  175.     which cause the program to halt on certain platforms, such as COHERENT
  176.     4.2, if Kermit was not built with a special compiler-specific option (-f
  177.     in this case) to enable these operations (the instance that was reported
  178.     occurs only when the debug log is activated).
  179.  
  180. 18. The sequence, "SET HOST /PTY <command>, INPUT <timeout> <string>" fails
  181.     immediately on just about every UNIX platform that supports the new PTY
  182.     feature except SunOS.  PTY <command> (which enters CONNECT mode), however,
  183.     works OK.  In other words, PTY connections on these platforms can't be
  184.     scripted even though they work interactively.  There is no runtime
  185.     workaround, but the following source-level patch can be used.  In
  186.     ckupty.c, at about line 226, change:
  187.  
  188.     #ifndef O_NDELAY
  189.     #ifdef O_NONBLOCK
  190.     #define O_NDELAY O_NONBLOCK
  191.     #endif /* O_NONBLOCK */
  192.     #endif /* O_NDELAY */
  193.  
  194.     to:
  195.  
  196.     #ifdef PTYNOBLOCK
  197.     #ifndef O_NDELAY
  198.     #ifdef O_NONBLOCK
  199.     #define O_NDELAY O_NONBLOCK
  200.     #endif /* O_NONBLOCK */
  201.     #endif /* O_NDELAY */
  202.     #else /* PTYNOBLOCK */
  203.     #ifdef O_NDELAY
  204.     #undef O_NDELAY
  205.     #endif /* O_NDELAY */
  206.     #define O_NDELAY 0
  207.     #endif /* PTYNOBLOCK */
  208.  
  209.     (and leave PTYNOBLOCK undefined).  This patch has been verified on Red Hat
  210.     Linux 5.2, Debian Linux 2.1, HP-UX 10.20, AIX 4.1, FreeBSD 2.2.8, SunOS
  211.     4.1.3, Tru64 UNIX 4.0E, Solaris 2.5.1, SINIX 5.42, BSDI 4.0.1, IRIX 6.5,
  212.     and DG/UX 5.4R4.11, and is probably safe everywhere.  However, should this
  213.     patch prevent PTY operations from working when they worked before, the
  214.     previous behavior can be restored by adding -DPTYNOBLOCK to CFLAGS,
  215.     recompiling ckupty.c, and relinking.
  216.  
  217. 19. If you declare a LOCAL variable whose name is a prefix of a global variable
  218.     (or a higher-level local variable), then upon exiting the context in which
  219.     the local variable was declared, the preexisting variable's name is changed
  220.     to the name of the local variable.
  221.  
  222. 20. The AOS/VS version of C-Kermit might not handle post-millenium dates
  223.     correctly, but it's doubtful whether AOS/VS itself does either.
  224.  
  225.  
  226. (1) INCOMPATIBLE CHANGES
  227.  
  228. These are not necessarily exhaustive lists.
  229.  
  230. The following incompatible changes were made in C-Kermit 6.0:
  231.  
  232.  . Unless you tell C-Kermit otherwise, if a serial or network connection
  233.    seems to be open, and you attempt to EXIT or to SET LINE or SET HOST or
  234.    TELNET, C-Kermit warns you that an active connection appears to be open
  235.    and asks you if you really want to close it.  If you do not want these
  236.    warnings, add SET EXIT WARNING OFF to your customization file.
  237.  
  238.  . The default for SET { SEND, RECEIVE } PATHNAMES was changed from ON
  239.    to OFF, to prevent unexpected creation of directories and depositing of
  240.    incoming files in places you might not know to look.
  241.  
  242.  . The default for SET FILE INCOMPLETE was changed from DISCARD to KEEP to
  243.    allow for file transfer recovery.
  244.  
  245.  . The default file-transfer block-check is now 3, rather than 1.  If the
  246.    other Kermit does not support this, the two will drop back to type 1
  247.    automatically.
  248.  
  249.  . The default flow-control is now "auto" ("do the right thing"), not Xon/Xoff.
  250.  
  251.  . Backslash (\) is no longer a command continuation character.  Only -
  252.    (hyphen, dash) may be used for this in C-Kermit 6.0 and later.
  253.  
  254.  . Negative INPUT timeout now results in infinite wait, rather than 1 second.
  255.  
  256. And in version 7.0:
  257.  
  258.  . The "multiline GET" command is gone.  Now use:
  259.  
  260.      get <remote-name> <local-name>
  261.  
  262.    or:
  263.  
  264.      get /as-name:<local-name> <remote-name>
  265.  
  266.    If either name contains spaces, enclose it in braces.
  267.  
  268.  . To send multiple file specifications to a server in a GET command,
  269.    you must now use MGET rather than GET:
  270.  
  271.       mget file1 file2 file3 ...
  272.  
  273. See ckermit2.txt Section 0 for additional items and further detail.
  274.  
  275.  
  276. (2) THE C-KERMIT COMMAND PARSER
  277.  
  278. When using the command-line processor ("kermit -l /dev/tty00 -b 19200", etc),
  279. note that in some cases the order of the command-line options makes a
  280. difference, contrary to the expectation that order of command-line options
  281. should not matter.  For example, the -b option must be given after the -l
  282. option if it is to have any effect.
  283.  
  284. In the interactive command parser:
  285.  
  286.  . VMS-style command editing (arrow keys, etc) is not supported.
  287.  . EMACS- or VI-style command line editing is not supported.
  288.  . Editing keys are hardwired (Ctrl-U, Ctrl-W, etc).
  289.  
  290. If you interrupt C-Kermit before it has issued its first prompt, it will exit.
  291. This means that you cannot interrupt execution of the initialization file, or
  292. of an "application file" (file whose name is given as the first command-line
  293. argument), or of an alternative initialization file ("-y filename"), and get
  294. to the prompt.  There is, however, one exception to this rule: you *can*
  295. interrupt commands -- including TAKE commands -- given in the '-C "command
  296. list"' command-line argument and -- if there were no action commands among the
  297. command-line arguments -- you will be returned to the C-Kermit prompt.  So,
  298. for example, if you want to start C-Kermit in such a way that it executes a
  299. command file before issuing its first prompt, and you also want to be able to
  300. interrupt the command file and get to the prompt, include a TAKE command for
  301. the desired command in the -C argument, for example:
  302.  
  303.    kermit -C "take dial.scr"
  304.  
  305. If you use the backslash (\) prefix to enter a control character, space, or
  306. question mark into a command literally, the backslash disappears and is
  307. replaced by the quoted character.  If it was a control character, it is shown
  308. as a circumflex (^).  This allows editing (backspace, delete, Ctrl-W) to work
  309. correctly even for control characters.
  310.  
  311. The only way to include a comma literally in a macro definition -- as opposed
  312. to having it separate commands within the definition -- is to enter its ASCII
  313. value (44) in backslash notation, e.g.:
  314.  
  315.   DEFINE ROWS MODE CO80\{44}\%1
  316.  
  317. If you quote special characters in a filename (e.g. in the SEND command),
  318. filename completion may seem to work incorrectly.  For example, if you have a
  319. file whose name is a*b (the name really contains an asterisk), and you type
  320. "send a\\*<ESC>", the "b" will not appear, nor will Ctrl-R redisplay the
  321. completed name correctly.  But internally the file name is recognized anyway.
  322.  
  323. Question-mark help does not work during execution of an ASKQ command.  The
  324. question marks are simply accepted as text.
  325.  
  326. The maximum length for a variable name is between 256 and 4096 characters,
  327. depending on the platform; for array declarations and references, that
  328. includes the subscript.
  329.                                                      Sample
  330. Some other maximums to watch out for:      Symbol    Value Defined in
  331.  
  332.  Nesting level for command files:           MAXTAKE      30  ckuusr.h
  333.  Nesting level for macros:                  MACLEVEL     50  ckuusr.h
  334.  Nesting level for FOR / WHILE loops:       FORDEPTH     10  ckuusr.h
  335.  Number of macros:                          MAC_MAX     256  ckuusr.h
  336.  Size of INPUT buffer:                      INPBUFSIZ   256  ckuusr.h
  337.  Maximum files to match a wildcard:         MAXWLD   varies  ck?fio.c
  338.  Filespecs in MSEND command:                MSENDMAX    100  ckuusr.h
  339.  Length of MSEND or GET string:             FSPECL      300  ckuusr.h
  340.  Length for GOTO target label:              LBLSIZ       50  ckuusr.h
  341.  Number of characters in a command:         CMDBL      1024  ckucmd.h
  342.  Number of chars in a field of a command:   ATMBL       256  ckucmd.h
  343.  \fexecute() recursion depth limit:         CMDDEP       20  ckucmd.h
  344.  
  345. The actual values of most of these items can vary with version and
  346. configuration, and are listed by SHOW FEATURES.
  347.  
  348. ASK and ASKQ strip leading and trailing spaces from what the user types.  This
  349. happens way down deep in the command parser -- it's nothing special about ASK
  350. and friends.  The only way around this that works in both C-Kermit and MS-DOS
  351. Kermit is for the user (the one who is responding to the ASK prompt) to type
  352. (the first) leading space as "\32" and the (final) trailing space as "\32".
  353. In this example, the password begins with 2 leading blanks and ends with two
  354. trailing blanks, and "Passwd:" is the ASK prompt:
  355.  
  356.  Passwd:\32 secret \32
  357.  
  358. Of course, the user could also type *all* blanks as \32.
  359.  
  360. In OUTPUT commands only, \B and \\B send a BREAK signal, and \L and \\L send a
  361. Long BREAK signal, and \N and \\N send a NUL (ASCII 0).  BREAK and Long BREAK
  362. are special signals, not characters, and NUL is a character that normally
  363. cannot be included in a C string, since it is the C string terminator.
  364.  
  365. If you really want to output a backslash followed by a B, an L, or an N (as is
  366. needed to configure certain modems, etc), use "output \\B".
  367.  
  368. In C-Kermit 6.1 or later, you can disarm and re-arm the special OUTPUT-command
  369. escapes (\B, \L, and \N) with SET OUTPUT SPECIAL-ESCAPES { OFF, ON }.
  370.  
  371.  
  372. (3) MULTIPLE SESSIONS
  373.  
  374. C-Kermit does not support multiple sessions.  When you SET LINE (or SET PORT,
  375. same thing) to a new device, or SET HOST to a new host, the previous SET LINE
  376. device or network host connection is closed, resulting in hangup of the modem
  377. or termination of the network connection.  In windowing environments like
  378. HP-VUE, NeXTSTEP, OS/2, etc, you can run separate copies of Kermit in different
  379. windows to achieve multiple sessions.
  380.  
  381. To achieve multiple sessions through a single serial port (e.g. when dialing
  382. up), you can install SLIP or PPP on your computer and then use C-Kermit's
  383. TCP/IP support over the SLIP or PPP connection, assuming you also have
  384. TCP/IP networking installed on your computer.
  385.  
  386. On UNIX systems that support the "term" program, you can establish a
  387. connection to another UNIX system with C-Kermit and then achieve multiple
  388. sessions using "term" client programs like trsh (see ckubwr.txt and the term
  389. documentation for details).
  390.  
  391.  
  392. (4) NETWORK COMMUNICATION
  393.  
  394. The most frequently asked question in many newsgroups is "Why does it take
  395. such a loooong time to make a telnet connection to (or from) my (e.g.) Linux
  396. PC?" (this applies to C-Kermit or to regular Telnet).  This question has
  397. two answers, one of them specific to C-Kermit 7.0:
  398.  
  399.  1. Most telnet servers nowadays perform reverse DNS lookups on the client
  400.     (for security and/or logging reasons).  If the Telnet client cannot be
  401.     found by the local DNS server, the DNS request goes out to the Internet at
  402.     large, and this can take quite some time.  The solution to this problem is
  403.     to make sure that both client and host are registered in DNS.
  404.  
  405.  2. C-Kermit 7.0 strictly enforces Telnet protocol rules.  One such rule is
  406.     that all negotiations must be responded to.  If C-Kermit sends a
  407.     negotiation and the host does not respond, C-Kermit will wait a long time
  408.     for the reply (in case the network is congested or the host is slow), but
  409.     eventually will time out.  To eliminate the waits (and therefore risk
  410.     possible protocol mismatches -- or worse --  between Telnet client and
  411.     server), tell C-Kermit to SET TELNET WAIT OFF (or include the /NOWAIT
  412.     switch with the TELNET command).
  413.  
  414. C-Kermit itself performs reverse DNS lookups unless you tell it not to.  This
  415. is to allow C-Kermit to let you know which host it is actually connected to
  416. in case you have made a connection to a "host pool" (multihomed host).  You
  417. can disable C-Kermit's reverse DNS lookup with SET TCP REVERSE-DNS-LOOKUP OFF.
  418.  
  419. In multiuser operating systems such as UNIX and VMS, TCP/IP RLOGIN connections
  420. are available only to privileged users, since "login" is a privileged socket.
  421. And assuming you are allowed to use it in the first place, it is likely to
  422. behave differently depending on what type of host you are rlogging in to, due
  423. to technical reasons having to do with conflicting interpretations of RFC793
  424. (Out-Of-Band Data) and Rlogin (RFC1122)...  "Specifically, the TCP urgent
  425. pointer in BSD points to the byte after the urgent data byte, and an
  426. RFC-compliant TCP urgent pointer points to the urgent data byte. As a result,
  427. if an application sends urgent data from a BSD-compatible implementation to an
  428. RFC-1122 compatible implementation then the receiver will read the wrong
  429. urgent data byte (it will read the byte located after the correct byte in the
  430. data stream as the urgent data byte)."  Rlogin requires the use of OOB data
  431. while Telnet does not.  Therefore, it is possible for Telnet to work between
  432. all systems while BSD and System V TCP/IP implementation are almost always a
  433. bad mix.
  434.  
  435. On a TCP/IP TELNET connection, you should normally have PARITY set to NONE and
  436. (except in VMS C-Kermit) FLOW-CONTROL also set to NONE.  If file transfer does
  437. not work with these settings (for example, because the remote TELNET server
  438. only gives a 7-bit data path), use SET PARITY SPACE.  Do not use SET PARITY
  439. MARK, EVEN, or ODD on a TELNET connection -- it interferes with TELNET
  440. protocol.
  441.  
  442. If echoing does not work right after connecting to a network host or after
  443. dialing through a TCP/IP modem server, it probably means that the TELNET
  444. server on the far end of the connection is executing the TELNET protocol
  445. incorrectly.  After initially connecting and discovering incorrect echoing
  446. (characters are echoed twice, or not at all), escape back, give the
  447. appropriate SET DUPLEX command (FULL or HALF), and then CONNECT again.
  448. For a consistently misbehaving connection, you can automate this process in
  449. a macro or TAKE file.
  450.  
  451. TELNET sessions are treated just like serial communications sessions as far as
  452. "terminal bytesize" and "command bytesize" are concerned.  If you need to view
  453. and/or enter 8-bit characters during a TELNET session, you must tell C-Kermit
  454. to SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, and SET PARITY NONE.
  455.  
  456. If you SET TERMINAL DEBUG ON or SET DEBUG SESSION (same thing), TELNET
  457. protocol negotiations will be displayed on your screen.  But most of the
  458. interesting negotiations happen at the time the SET HOST or TELNET command
  459. is given, before CONNECT mode is entered, so you won't see them on your
  460. screen.  However, you can still capture them in the debug log ("log debug").
  461.  
  462. C-Kermit version 6.0 and later includes SET TCP commands to control TCP-level
  463. parameters, such as "keepalive" protocol (that allows C-Kermit to detect more
  464. quickly and reliably when a connection is broken).  Use SHOW NET to see their
  465. values and SET TCP to change them.
  466.  
  467.  
  468. (5) THE SERVICES DIRECTORY
  469.  
  470. Is explained fully in "Using C-Kermit", 2nd Edition, Chapter 7.
  471.  
  472.  
  473. (6) MODEMS AND DIALING
  474.  
  475. Warning: Some phone companies are eliminating the busy signal.  Instead,
  476. they issue a voice message such as "press 1 to automatically redial until
  477. the number answers, or...".  Obviously this is a disaster for modem calls.
  478. If your service has this feature, there's nothing Kermit can do about it.
  479. Your modem will respond with NO CARRIER rather than BUSY, and Kermit will
  480. declare the call a failure, rather than trying to redial the same number.
  481.  
  482. The list of modem types supported by C-Kermit is obtained by typing:
  483.  
  484.   set modem type ?
  485.  
  486. at the C-Kermit> prompt.  Note that the ITU-T (V.25bis) modem type is
  487. supported only in asynchronous mode, not synchronous (HDLC) mode -- there is
  488. no support in C-Kermit for synchronous communication (except for SET NET X.25,
  489. which is only available on certain platforms).
  490.  
  491. If a built-in modem type doesn't work for you, and the modem is a modern
  492. high-speed (data compressing, error correcting) modem that uses the Hayes AT
  493. command set, try:
  494.  
  495.   SET MODEM TYPE GENERIC-HIGH-SPEED
  496.  
  497. Modems can be used by C-Kermit only when they are visible as or through a
  498. regular serial port device.  Note that certain modems can not be used in this
  499. normal way on many kinds of computers: Winmodems, RPI modems, Controllerless
  500. modems, the IBM Mwave, etc; all of these require special drivers that perform
  501. some, most, or all of the modem's functions in software.  Such drivers are
  502. generally NOT available in UNIX or other non-Windows (or non-OS/2, in the case
  503. of the Mwave) platforms.
  504.  
  505. An important change in C-Kermit 6.0 is that when you give a SET MODEM TYPE
  506. command to tell Kermit what kind of modem you have, Kermit also sets a number
  507. of other modem-related parameters automatically from its internal modem
  508. database.  Thus, the order in which you give modem-related commands is
  509. significant, whereas in prior releases they could be given in any order.
  510.  
  511. In particular, MODEM SPEED-MATCHING is set according to whether the modem
  512. is known to be capable of speed buffering.  SET MODEM TYPE HAYES-2400
  513. automatically turns SPEED-MATCHING ON, because when the Hayes 2400 reports
  514. a particular speed in its CONNECT message, that means its interface speed
  515. has changed to that speed, and C-Kermit's must change accordingly if it is
  516. to continue communicating.  This might cause some confusion if you use
  517. "set modem type hayes" for dialing a more advanced type of modem.
  518.  
  519. The new default for flow control is "auto", meaning "do the right thing".
  520. So (for example) if your version of C-Kermit supports SET FLOW RTS/CTS and
  521. your modem also supports RTS/CTS, then Kermit will automatically set its
  522. flow control to RTS/CTS *and* set modem's flow control to RTS/CTS too before
  523. attempting to use the modem.
  524.  
  525. For this reason, don't assume that "set modem type hayes" should be used for
  526. any modem that uses the Hayes AT command set.  "set modem type hayes" really
  527. does mean Hayes 1200 or 2400, which in turn means no hardware flow control,
  528. and no speed buffering.  This choice will rarely work with a modern high-speed
  529. modem.
  530.  
  531.  
  532. (7) DIALING HINTS AND TIPS
  533.  
  534. If you want to dial a number that starts with #, you'll need to quote the
  535. "#" character (as \# or \{35}), since it is also a comment introducer:
  536.  
  537.   C-Kermit>dial #98765421-1-212-5551212   ; Looks like a comment
  538.   ?You must specify a number to dial
  539.   C-Kermit>dial \#98765421-1-212-5551212  ; Works OK
  540.  
  541. When using a dialing directory, remember what happens if a name is not found:
  542.  
  543.   C-Kermit>dial xyzcorp
  544.   Lookup: "xyzcorp" - not found - dialing as given
  545.  
  546. This normally does no harm, but some modems might behave strangely when given
  547. dial strings that contain certain letters.  For example, a certain German
  548. modem treats any dial string that contains the letter "s" as a command to
  549. fetch a number from its internal list, and replies OK to the ATD command,
  550. which is normally not a valid response except for partial dialing.  To avoid
  551. this situation, use:
  552.  
  553.   lookup xyzcorp
  554.   if success dial
  555.  
  556. Remember: In many C-Kermit implementations (depending on the underlying
  557. operating system -- mostly Windows, OS/2, and System-V-based UNIX versions,
  558. and in C-Kermit 6.1, also VMS), you can't CONNECT to a modem and type the
  559. modem's dialing command (like "ATDT7654321") manually, unless you first tell
  560. C-Kermit to:
  561.  
  562.   SET CARRIER-WATCH OFF
  563.  
  564. This is because (in these implementations), the CONNECT command requires the
  565. modem's Carrier Detect (CD) signal to be on, but the CD signal doesn't come on
  566. until after dialing is complete.  This requirement is what allows C-Kermit to
  567. pop back to its prompt automatically when the connection is hung up.  See the
  568. description of SET CARRIER-WATCH in "Using C-Kermit".
  569.  
  570. Similarly, if your dialed connection drops when CARRIER-WATCH is set to AUTO
  571. or ON, you can't CONNECT back to the (now disconnected) screen to see what
  572. might have happened unless you first SET CARRIER-WATCH OFF.
  573.  
  574. Don't SET FLOW RTS/CTS if your modem is turned off, or if it is not presenting
  575. the CTS signal.  Otherwise, the serial device driver might get stuck waiting
  576. for this signal to appear.
  577.  
  578. The HANGUP command has no effect when C-Kermit is in remote mode.  This is
  579. on purpose.  If C-Kermit could hang up its own controlling terminal, this
  580. would (a) most likely leave behind zombie processes, and (b) pose a security
  581. risk.
  582.  
  583. If you have a high-speed, error-correcting, data-compressing, speed-buffering
  584. modem, you should fix the modem's interface speed as high as possible,
  585. preferably (at least) four times higher than its maximum connection
  586. (modulation) speed to allow compression to work at full advantage.  In this
  587. type of setup, you must also have an effective means of flow control enabled
  588. between C-Kermit and the modem, preferably hardware (RTS/CTS) flow control.
  589. On platforms that do not support hardware flow control, it is usually possible
  590. to select software flow control (Xon/Xoff), and C-Kermit will do its best to
  591. set the modem for local Xon/Xoff flow control too (but then, of course,
  592. Ctrl-S and Ctrl-Q characters can not be transmitted on the connection).
  593.  
  594. C-Kermit knows about a large number of modems, depending on how it was built
  595. (type "set modem type ?" and "show features" for further info).  This
  596. knowledge is imbedded in the SET MODEM and DIAL commands.  If you are having
  597. trouble dialing your modem, SET DIAL DISPLAY ON to watch the dialing
  598. interactions between C-Kermit and your modem.  Consult Chapters 3-4 of "Using
  599. C-Kermit" (2nd Ed) for modem-dialing troubleshooting instructions.
  600.  
  601. If it takes your call longer to be completed than the timeout interval that
  602. C-Kermit calculates, you can use the SET DIAL TIMEOUT command to override
  603. C-Kermit's value.  But beware: the modem has its own timeout for completing
  604. the call.  If it is a Hayes-like modem, C-Kermit adjusts the modem's value
  605. too by setting register S7.  But the maximum value for S7 might be smaller
  606. than the time you need!  In that case, C-Kermit sets S7 to 0, 255, or other
  607. (modem-specific) value to signify "no timeout".
  608.  
  609. WARNING: Certain modems might have a maximum dial timeout shorter than what
  610. Kermit expects it to be.  If Kermit attempts to set register S7 to a value
  611. higher than your modem's maximum, the modem will say "ERROR" and you will get
  612. a "Failure to initialize modem" error.  In that case, use SET DIAL TIMEOUT to
  613. override C-Kermit's calculation of the timeout value with the highest value
  614. that is legal for your modem, e.g. 60.
  615.  
  616. If you DIAL a modem, disconnect, then SET HOST or TELNET, and then HANGUP,
  617. Kermit sends the modem's hangup command, such as "+++ATHO".  There is no good
  618. way to avoid this, because this case can't reliably be distinguished from the
  619. case in which the user does SET HOST <terminal-server>, SET MODEM TYPE <name>,
  620. DIAL.  In both cases we have a valid modem type selected and we have a network
  621. connection.  If you want to DIAL and then later make a regular network
  622. connection, you will have to SET MODEM TYPE NONE or SET MODEM HANGUP RS232 to
  623. avoid this phenomenon.
  624.  
  625. The SET MODEM KERMIT-SPOOF command works only for Telebit and US Robotics
  626. modem types; it is OFF by default.  You may wish to experiment with large
  627. packets (1K or greater) and various window sizes with spoofing disabled in the
  628. modem.  In most situations the transfer rates achieved by Kermit with sliding
  629. windows and long packets are better than with protocol spoofing turned on.
  630. Also, attribute (A) packets are not passed by Telebit modems with spoofing
  631. enabled so if they are desired spoofing must be turned off.
  632.  
  633. Some modems have a feature called adaptive dialing.  When they are told to
  634. dial a number using Tone dialing, they check to make sure that dialtone has
  635. gone away after dialing the first digit.  If it has not, the modem assumes the
  636. phone line does not accept Tone dialing and so switches to Pulse.  When
  637. dialing out from a PBX, there is almost always a secondary dialtone.
  638. Typically you take the phone off-hook, get the PBX dialtone, dial "9" to get
  639. an outside line, and then get the phone company's dialtone.  In a situation
  640. like this, you need to tell the modem to expect the secondary dialtone.  On
  641. Hayes and compatible modems, this is done by putting a "W" in the dial string
  642. at the appropriate place.  For example, to dial 9 for an outside line, and
  643. then 7654321, use ATDT9W7654321.  In Kermit 95, this is accomplished with:
  644.  
  645.   SET PBX-OUTSIDE-PREFIX 9W
  646.  
  647. (replace "9" with whatever your PBX's outside-line prefix is).
  648.  
  649. DEC modems...  Reportedly, these don't work right when connected to a DEC
  650. terminal server -- result codes are never reported (on the other hand, this
  651. might be a modem configuration problem).  Dialing "by hand", "blind" still
  652. works.  Also, reportedly "For people who do have DEC modems directly connected
  653. to DEC computers the DF03, DF100-series, and DF200-series modem dialers should
  654. work.  The only thing that is not straightforward is that the DF124-CA,
  655. DF124-CM modems must use the DF200-series since they speak Digital Modem
  656. Command Language (DMCL) and AT commands.  The Digital Scholar Plus is a DF242
  657. so it uses the DF200-series."
  658.  
  659. If C-Kermit's dialing methods are insufficient for your purposes, you can
  660. write a C-Kermit script program to do the dialing.
  661.  
  662. (7.1) DIALING AND FLOW CONTROL
  663.  
  664. Most modern modems support RTS/CTS (if they support any hardware flow control
  665. at all), but some computers use different RS-232 circuits for the same
  666. purposes, e.g. DTR and CD, or DTR and CTS.  In such cases, you might be able
  667. to make your computer work with your modem by appropriately cross-wiring the
  668. circuits in the cable connector, for example the computer's DTR to the modem's
  669. RTS, and modem's CD to the computer's CTS.  HOWEVER, C-Kermit does not know
  670. you have done this.  So if you have (say) SET FLOW DTR/CD, C-Kermit will make
  671. no attempt to tell the modem to use RTS/CTS.  You probably did this yourself
  672. when you configured the modem.
  673.  
  674. (7.2) ESCAPE SEQUENCE GUARD TIME
  675.  
  676. A "TIES" (Time-Independent Escape Sequence) modem does not require any guard
  677. time around its escape sequence.  The following text:
  678.  
  679. +++ATH0
  680.  
  681. if sent through a TIES modem, for example because you were uploading this
  682. file through it, could pop the modem back into command mode and make it hang
  683. up the connection.  Newer versions of the Telebit T1600 and T3000 (version
  684. LA3.01E firmware and later), and all WorldBlazers, use TIES.
  685.  
  686. Although the probability of "+++" appearing in a Kermit packet is markedly
  687. lower than with most other protocols (see the File Transfer section below), it
  688. can still happen under certain circumstances.  It can also happen when using
  689. C-Kermit's TRANSMIT command.  If you are using a Telebit TIES modem, you can
  690. change the modem's escape sequence to an otherwise little-used control
  691. character such as Ctrl-_ (Control-Underscore):
  692.  
  693.   AT S2=31
  694.  
  695. A sequence of three consecutive Ctrl-_ characters will not appear in a
  696. Kermit packet unless you go to extraordinary lengths to defeat more than a few
  697. of Kermit's built-in safety mechanisms.  And if you do this, then you should
  698. also turn off the modem's escape-sequence recognition altogether:
  699.  
  700.   AT S48=0 S2=255
  701.  
  702. But when escape sequence recognition is turned off, "modem hangup"
  703. (<pause>+++<pause>ATH0<CR>) will not work, so you should also be sure to SET
  704. DIAL MODEM-HANGUP OFF.
  705.  
  706.  
  707. (8) TERMINAL SERVERS
  708.  
  709. How to DIAL from a TCP/IP reverse terminal server (modem server):
  710.  
  711.  1. (only if necessary) SET TELNET ECHO REMOTE
  712.  2. SET HOST <terminal-server-ip-name-or-address> [ <port> ]
  713.  3. SET MODEM <modem-type>
  714.  4. (only if necessary) SET DIAL HANGUP OFF
  715.  5. DIAL <phone-number>
  716.  
  717. The order is important.
  718.  
  719. Watch out for terminal server's escape character -- usually a control
  720. character such as Ctrl-Circumflex (Ctrl-^).  Don't unprefix it in Kermit !
  721.  
  722. Ciscos -- must often be told to "terminal download"...  Cisco ASM models don't
  723. have hardware flow control in both directions.
  724.  
  725. Many terminal servers only give you a 7-bit connection, so if you can't make
  726. it 8-bit, tell Kermit to "set parity space".
  727.  
  728. The following story, regarding trouble transferring 8-bit files through a
  729. reverse terminal server, was contributed by an Annex terminal server user
  730. (begin quote):
  731.  
  732. Using C-Kermit on an HP 9000 712/80 running the HP-UX 10.0 operating system.
  733. The HP was connected to a Xylogics Annex MICRO-ELS-UX R7.1 8 port terminal
  734. server via ethernet.  On the second port of the terminal server is an AT&T
  735. Paradyne 3810 modem, which is connected to a telephone line.  There is a
  736. program which runs on the HP to establish a Telnet connection between a serial
  737. line on the Annex and a character special file on the HP (/dev file).  This is
  738. an Annex specific program called rtelnet (reverse telnet) and is provided with
  739. the terminal server software. The rtelnet utility runs on top of the
  740. pseudo-terminal facility provided by UNIX.  It creates host-originiated
  741. connections to devices attached ot Annex serial ports.  There are several
  742. command line arguments to be specified with this program: the IP address of
  743. the terminal server, the number of the port to attach to, and the name of the
  744. pseudo-device to create.  In addition to these there are options to tell
  745. rtelnet how to operate on the connect: -b requests negotiation for Telnet
  746. binary mode, -d turns on socket-leve debugging, -f enables "connect on the
  747. fly" mode, -r removes the device-name if it already exists, etc.  The most
  748. important of these to be specified when using 8 data bits and no parity, as we
  749. found out, was the -t option.  This creates a transparent TCP connection to
  750. the terminal server.  Again, what we assumed to be happening was that the
  751. rtelnet program encountered a character sequence special to itself and then
  752. "eating" those kermit packets.  I think this is all of the information I can
  753. give you on the configuration, short of the values associated with the port on
  754. the terminal server.  If I can provide any other details, just let me know.
  755. Thanks again for your help.
  756.  
  757. (end quote)
  758.  
  759.  
  760. (9) TERMINAL EMULATION
  761.  
  762. Except for the Windows, OS/2, and Macintosh versions, C-Kermit does not
  763. emulate any kind of terminal.  Rather, it acts more or less as a "transparent
  764. pipe", passing the characters you type during a CONNECT session to the remote
  765. host, and sending the characters received from the remote host to your screen.
  766. Whatever is controlling your keyboard and screen provides the specific
  767. terminal emulation: a real terminal, a PC running a terminal emulator, etc, or
  768. (in the case of a self-contained workstation) your console driver, a terminal
  769. window, xterm, etc.
  770.  
  771. There are several exceptions to the "transparent pipe" rule:
  772.  
  773.  - During a TELNET ("set host") session, C-Kermit itself executes the
  774.    TELNET protocol and performs TELNET negotiations.  (But it does not
  775.    perform TN3270 protocol or any other type of 3270 terminal emulation.)
  776.  
  777.  - If you have changed your keyboard mapping using SET KEY, C-Kermit replaces
  778.    the characters you type with the characters or strings they are mapped to.
  779.  
  780.  - If you SET your TERMINAL CHARACTER-SET to anything but TRANSPARENT,
  781.    C-Kermit translates your keystrokes (after applying any SET KEY
  782.    definitions) before transmitting them, and translates received characters
  783.    before showing them on your screen.
  784.  
  785.  - If your remote and/or local TERMINAL CHARACTER-SET is an ISO 646 7-bit
  786.    national character set, such as German, French, Italian, Swedish, etc, or
  787.    Short KOI used for Cyrillic, C-Kermit's CONNECT command automatically skips
  788.    over ANSI escape sequences to avoid translating their characters.  Only
  789.    ANSI/ISO standard (VT100/200/300-like) 7-bit escape sequence formats are
  790.    supported for this purpose, no proprietary schemes like H-P, Televideo,
  791.    Tektronix, etc.
  792.  
  793.  - If your version of C-Kermit includes SET TERMINAL APC command, then
  794.    C-Kermit's CONNECT command will handle APC escape sequences if TERMINAL
  795.    APC is not set to OFF (which is the default).
  796.  
  797. If you are running C-Kermit under a console driver, or in a terminal window,
  798. that emulates the VT100, and use C-Kermit to log in to a VMS system, the
  799. console driver or terminal window (not Kermit) is supposed to reply to the
  800. "what are you?" query (ESC Z) from the VAX.  If it doesn't, and you can't make
  801. it do so, then you can (a) live with the "unknown terminal" problem; (b) tell
  802. VMS to SET TERMINAL/DEVICE=VT100; (c) program a key using SET KEY to send the
  803. appropriate sequence and then punch the key at the right time; or (d) use the
  804. VMSLOGIN macro that is defined in CKERMIT.INI to do this for you
  805. automatically.
  806.  
  807. SET SESSION-LOG { TEXT, BINARY }, which is effective in UNIX and AOS/VS but
  808. not other C-Kermit versions, removes CR, DEL, NUL, XON, and XOFF characters
  809. ("Using C-Kermit" neglects to mention that XON and XOFF are removed).  The
  810. TEXT-mode setting is ineffective during SCRIPT command execution, as well as
  811. on X.25 connections.
  812.  
  813.  
  814. (10) KEY MAPPING
  815.  
  816. Except in the terminal-emulating versions, C-Kermit's key mapping facilities
  817. are limited to normal "ASCII" keys, and cannot be used with function keys,
  818. arrow keys, arcane key combinations, etc.  Since C-Kermit runs on such a wide
  819. variety of hardware platforms (including, for example, more than 360 different
  820. UNIX platforms), it is not possible for C-Kermit to support every conceivable
  821. keyboard under every release of every UNIX (or VMS, or ...) product on every
  822. different kind of computer possibly under all manner of different console
  823. drivers.
  824.  
  825. In technical terms, C-Kermit uses the read() function to read keystrokes, and
  826. read() returns a single byte (value 0 through 255).  C-Kermit's SET KEY
  827. function applies to these single-byte codes.  "Extended function" keys, such
  828. as F-keys, arrow keys, etc, usually return either a 2-byte "scan code" or else
  829. a character string (such as an escape sequence like "ESC O p").  In both
  830. cases, C-Kermit has no way to tell the difference between such multibyte key
  831. values, and the corresponding series of single-byte key values.  This could
  832. only be done by accessing the keyboard at a much lower level in a highly
  833. system-dependent manner, probably requiring tens of thousands of lines of code
  834. to support even a sampling of the most popular workstation / OS combinations.
  835.  
  836. However, most workstation console drivers (terminal emulation windows, etc)
  837. include their own key-mapping facility.  For example, on an IBM RS/6000, the
  838. AIXterm program (in whose window you would run C-Kermit) allows rebinding of
  839. the F1-F12 keys to arbitrary strings.  The same might or might not be true of
  840. DECterm windows, Sun "vttool" or "crttool" windows, etc.  Consult the
  841. technical documentation for your workstation or emulator.
  842.  
  843. The SET KEY command (except in OS/2) does not allow a key definition to be
  844. (or contain) the NUL (\0) character.
  845.  
  846.  
  847. (11) THE TRANSMIT COMMAND
  848.  
  849. Session logging is inactive during the TRANSMIT command, even if you have
  850. given a LOG SESSION command.
  851.  
  852.  
  853. (12) FILE TRANSFER
  854.  
  855. C-Kermit 7.0 is the first release of C-Kermit to use fast (rather than robust
  856. and therefore slow) protocol defaults: long packets, sliding windows,
  857. control-character unprefixing, and streaming where possible.  This makes most
  858. transfers (partner willing) dramatically faster "out of the box" but might
  859. break some combinations that worked before.  If transfers with C-Kermit 7.0
  860. fail where transfers worked with earlier C-Kermit versions, try the following:
  861.  
  862.  a. ROBUST: this command reverts to the most conservative protocol settings.
  863.  b. CAUTIOUS: Selects medium but cautious protocol settings.
  864.  c. SET PREFIXING ALL: Disables control-character unprefixing.
  865.  d. SET STREAMING OFF: Disables streaming.
  866.  
  867. File transfer failures can occur for all sorts of reasons, many of them listed
  868. in Chapter 10 of the manual.  Another one came up recently when using Kermit
  869. on a certain laptop with its built-in modem: the modem's "auto timeout delay"
  870. was hanging up the connection in the middle of a file transfer.  Most modems,
  871. even if they have this feature, do not have it enabled by default.  But if you
  872. experience otherwise inexplicable disconnections in the midst of your Kermit
  873. sessions, check the modem manual for such things as "idle timeout", "auto
  874. timeout", etc, and add the command to disable this feature to Kermit's init
  875. string for this modem.
  876.  
  877. If you have a multihop connection, with the interior nodes in CONNECT
  878. mode (Kermit, Telnet, Rlogin, or any other), you can expect (a) file transfer
  879. to be slower, and (b) the connection to be less transparent (to control
  880. characters, perhaps to the 8th bit) than a more direct connection.  C-Kermit
  881. 7.0 has a "-0" (dash-zero) command-line option to make it 100% transparent
  882. in cases where it is to be used in the middle.
  883.  
  884. The recovery feature (RESEND command) that was added in edit 190 works only
  885. for binary-mode transfers.  In order for this feature to be useful at all, the
  886. default for SET FILE INCOMPLETE was changed from DISCARD to KEEP.  Otherwise
  887. an interrupted transfer would leave no partial file behind unless you had
  888. remembered to change the default.  But now you have to pay closer attention to
  889. Kermit's messages to know whether a transfer succeeded or failed --
  890. previously, if it failed, the file would not show up on the receiving end at
  891. all; in edit 190 and later, you'll get a partial file which could easily be
  892. mistaken for the complete file unless you change the default back to DISCARD
  893. or read the screen messages, or keep a transaction log.
  894.  
  895. Watch out for SET FILE COLLISION RENAME, especially when used in conjunction
  896. with recovery.  Recall that this option (which is NOT the default) renames
  897. the incoming file if a file already exists with the same name (the default is
  898. to rename the previously existing file, and store the incoming file with its
  899. own name).  It is strongly recommended that you do not use SET FILE COLLISION
  900. RENAME if you ever intend to use the recovery feature:
  901.  
  902.  . When the file is first received by C-Kermit, its name will be changed if
  903.    another file already has the same name.  When you RESEND the same file
  904.    after a failure, C-Kermit will probably try to append the re-sent portion
  905.    to the wrong file.
  906.  
  907.  . Assuming that you get RESEND to work with FILE COLLISION RENAME, C-Kermit,
  908.    when receiving the remainder of the file during a RESEND operation, will
  909.    report back the wrong name.  Nothing can be done about this because the
  910.    name is reported back before the receiving Kermit program finds out that
  911.    it is a recovery operation.
  912.  
  913. Also watch out for DISABLE DELETE, since this implicitly sets FILE COLLISION
  914. RENAME.  And note tht DELETE is DISABLEd automatically any time you Kermit
  915. is in local mode (i.e. it makes a connection).  Also note that for purposes
  916. of DISABLE and ENABLE, "set host *" connections do not count as local mode
  917. even though, strictly speaking, they are.
  918.  
  919. When using ADD SEND-LIST and entering a wildcard in the list, there is no way
  920. to specify "automatic switching" -- the file type still must be text or
  921. binary.  To work around, use regular expressions to create separate wildcards
  922. for the text and binary files.
  923.  
  924. Automatic directory creation for received files does not work for pathnames
  925. given in the "-a" command-line argument.
  926.  
  927. There are no command-line arguments for "set file names { literal, converted }"
  928. or "set { send, receive } pathnames { on, off }", but you can include these
  929. (or any other) commands on the command line in the -C option string.
  930.  
  931. When referring to MS-DOS, Windows, Atari ST, OS/2, or other file
  932. specifications that contain backslash characters in a C-Kermit command, you
  933. might have to double each backslash, for example:
  934.  
  935.   C-Kermit>get c:\\directory\\foo.txt
  936.  
  937. This is because backslash is used in C-Kermit commands for introducing special
  938. character codes, variables, functions, etc.  If you are sending this GET
  939. command to another copy of C-Kermit running as a server, for example on OS/2
  940. or the Atari ST, it too treats backslashes as prefix characters, so you will
  941. need 4 (yes, 4) copies of each backslash:
  942.  
  943.   C-Kermit>get c:\\\\directory\\\\foo.txt
  944.  
  945. But read about SET COMMAND QUOTING OFF in the manual.
  946.  
  947. ANOTHER NOTE: In Kermit 95, this restriction is lifted as far as referring
  948. to files on the local PC.  You can now refer to these files using natural PC
  949. notation, e.g.
  950.  
  951.   C-Kermit>send c:\letters\oofa.txt
  952.  
  953. in any command field that knowingly parses a filename.
  954.  
  955. Attempting to cancel local-mode file reception at a very early stage (i.e.
  956. before data packets are exchanged) with X or Z does not work.  Workarounds:
  957. Use E or Ctrl-C instead, or wait until the first data packets are sent.
  958.  
  959. If you cancel a transfer that is underway using X or Z, and a lot of window
  960. slots are in use, it might take a long time for the cancellation to take
  961. effect, especially if you do this on the receiving end; that's because a lot
  962. of packets might already be on their way to you.  In that case, just be
  963. patient and let Kermit "drain" them.
  964.  
  965. If C-Kermit is sending a file, remote-mode packet-mode breakout (Ctrl-C Ctrl-C
  966. by default) is not effective until after C-Kermit sends its first packet.  If
  967. C-Kermit is receiving a file or is in server mode, it will be effective right
  968. away.  In the former case, the SET DELAY value determines the earliest time at
  969. which you can break out of packet mode.
  970.  
  971. Some communication programs have errors in their implementation of Kermit
  972. attribute packets.  If you get an error message from your communication
  973. program like "Attribute error", tell C-Kermit to SET ATTRIBUTES OFF.  Better
  974. yet, switch to a real Kermit program, such as MS-DOS Kermit.
  975.  
  976. When using C-Kermit to transfer files with the HP48SX calculator, you must
  977. SET FLOW NONE.  The HP48SX does not support flow control, and evidently also
  978. becomes confused if you attempt to use it.  You might also need to use
  979. SET SEND PAUSE 100 (or other number).
  980.  
  981. The fullscreen file transfer display will not work right if your terminal type
  982. is set incorrectly, or is not known to the host operating system.  Even when
  983. it does work, it might slow down your file transfers a bit, especially on
  984. high-speed network connections.  On certain small computers, it has been
  985. reported to cause increased disk activity due to swapping or paging.  The
  986. fullscreen display is not particularly useful with speaking or Braille devices.
  987. In these cases, use SET FILE DISPLAY CRT or SET FILE DISPLAY SERIAL.
  988.  
  989. If you have trouble transferring files over a TCP/IP connection, give the
  990. command:
  991.  
  992.   SET PARITY SPACE
  993.  
  994. and try again.  If that doesn't work, also try a shorter packet length.
  995.  
  996. On the other hand, if file transfers through a TCP/IP connection work, but are
  997. very slow, use a longer packet length, 2000 or more, and also try increasing
  998. the window size.  Also, make sure FLOW is NONE since TCP/IP handles flow
  999. control itself, and XON/XOFF processing only slows things down.
  1000.  
  1001. Some communication software claims to implement sliding windows, but does so
  1002. incorrectly.  If sliding window transfers fail, set C-Kermit's window size to
  1003. the smallest one that works, for example:
  1004.  
  1005.   SET WINDOW 1
  1006.  
  1007. The UNIX version of C-Kermit discards carriage returns when receiving files
  1008. in text mode.  Thus, "bare" carriage returns (sometimes used to achieve
  1009. overstriking) are lost.
  1010.  
  1011. SET FILE COLLISION BACKUP is the default.  This means:
  1012.  
  1013.  - If you send the same file lots of times, there will be many backup files.
  1014.    There is no automatic mechanism within Kermit to delete them, no notion of
  1015.    a "version retention count", etc, but you can use the PURGE command to
  1016.    clean them up.
  1017.  
  1018.  - If a file arrives that has the same name as a directory, the file transfer
  1019.    fails because Kermit will not rename a directory.  Send the file with
  1020.    another name, or use SET FILE COLLISION RENAME.
  1021.  
  1022.  - If the directory lacks write permission, the file transfer fails even if
  1023.    you have write access to the file that is being backed up; in that case,
  1024.    switch to SET FILE COLLISION OVERWRITE or APPEND, or send to a different
  1025.    directory.
  1026.  
  1027. SET FILE COLLISION UPDATE depends on the date/time stamp in the attribute
  1028. packet.  However, this is recorded in local time, not Universal Time (GMT),
  1029. and there is no indication of time zone.  The time is expressed to the
  1030. precision of 1 second, but some file systems do not record with this precision
  1031. -- for example, MS-DOS records the file date/time only to the nearest 2
  1032. seconds.  This might cause update operations to send more files than
  1033. necessary.
  1034.  
  1035. (This paragraph does NOT apply to UNIX, where, as of C-Kermit 6.1, C-Kermit
  1036. pipes incoming mail and print material directly the mail or print program):
  1037. When C-Kermit is receiving files from another Kermit program that has been
  1038. given the MAIL or REMOTE PRINT command, C-Kermit follows the current filename
  1039. collision action.  This can be disconcerting if the action was (for example)
  1040. BACKUP, because the existing file will be renamed, and the new file will be
  1041. mailed (or printed) and then deleted.  Kermit cannot temporarily change to
  1042. RENAME because the file collision action occurs when the filename packet is
  1043. received, and the PRINT or MAIL disposition only comes later, in the Attribute
  1044. packet.
  1045.  
  1046. Execution of multiple file transfers by C-Kermit from a command file when
  1047. in remote mode might exhibit long delays between each transfer.  To avoid
  1048. this, just include the command "SET DELAY 0" in your command file before any
  1049. of the file-transfer commands.
  1050.  
  1051.  
  1052. (13) SCRIPT PROGRAMMING
  1053.  
  1054. 13.1. Comments Versus the SCRIPT Command
  1055.  
  1056. Remember that ";" and "#" introduce comments when (a) they are the first
  1057. character on the line, or (b) they are preceded by at least one blank or
  1058. tab within a line.  Thus constructions like:
  1059.  
  1060.   INPUT 5 ;
  1061.   SCRIPT ~0 #--#--#
  1062.  
  1063. must be coded using backslash notation to keep the data from being ignored:
  1064.  
  1065.   INPUT 5 \59            ; 59 is the decimal ASCII code for ";"
  1066.   SCRIPT ~0 \35--#--#        ; 43 is the decimal ASCII code for "#"
  1067.  
  1068. or, more simply:
  1069.  
  1070.   INPUT 5 \;                    ; Just quote the semicolon
  1071.   SCRIPT ~0 \#--#--#            ; Just quote the "#"
  1072.  
  1073. 13.2. Alphabetic Case and the INPUT Command
  1074.  
  1075. INPUT and REINPUT caseless string comparisons do not work for non-ASCII
  1076. (international) characters.  Workaround: SET INPUT CASE OBSERVE.  Even then,
  1077. the "lexically less than" and "lexically greater than" operations (IF LLT, IF
  1078. LGT) probably won't work as expected.  The same is true for the
  1079. case-conversion functions \Flower() and \Fupper().  C-Kermit does not know the
  1080. collating sequence for different character sets and languages.  (On the other
  1081. hand, it might work depending on such items as how Kermit was linked, whether
  1082. your operating supports "locales", etc)
  1083.  
  1084. 13.3. NUL (0) Characters in C-Kermit Commands
  1085.  
  1086. You can't include a NUL character (\0) in C-Kermit command text without
  1087. terminating the character string in which it appears.  For example:
  1088.  
  1089.   echo In these brackets [\0] is a NUL
  1090.  
  1091. will echo "In these brackets [".  This applies to ECHO, INPUT, OUTPUT, and all
  1092. other commands (but you can represent NUL by "\N" in an OUTPUT string).  This
  1093. is because C-language strings are terminated internally by the NUL character,
  1094. and it allows all of C-Kermit's string comparison and manipulation functions
  1095. to work in the normal "C" way.
  1096.  
  1097. To illustrate:
  1098.   INPUT 5 \0
  1099. is equivalent to:
  1100.   INPUT 5
  1101. and:
  1102.   INPUT 5 ABC\0DEF
  1103. is equivalent to:
  1104.   INPUT 5 ABC
  1105.  
  1106. INPUT operations discard and ignore NUL characters that arrive from the
  1107. communication device, meaning that they do not figure into matching operations
  1108. (e.g. A<NUL>B matches AB); they are not deposited in the INPUT buffer
  1109. (\v(input)); and they are not counted in \v(incount), with two exceptions:
  1110.  
  1111.   1. An arriving NUL character restarts the INPUT SILENCE timer.
  1112.  
  1113.   2. An arriving NUL character terminates the INPUT command with the
  1114.      SUCCESS condition if the INPUT command was given an empty search
  1115.      string.  In this case \v(incount) is set to 1.
  1116.  
  1117. Also, the \v(inchar) variable is null (completely empty) if the last INPUT
  1118. character was NUL.  That is, there is no way to tell only by looking at
  1119. \v(inchar) the difference between a NUL that was INPUT and no INPUT at all.
  1120. If the INPUT command succeeded but \v(inchar) is empty, then a NUL character
  1121. was input.  Also, \v(incount) will be set to 1.
  1122.  
  1123. \v(incount) and \v(inchar) are NOT affected by the CLEAR command.
  1124.  
  1125. 13.4. \ffiles() and \fnextfile() Peculiarities
  1126.  
  1127. The following script program:
  1128.  
  1129.   for \%i 1 \ffiles(oofa.*) 1 {
  1130.       send \fnextfile()
  1131.   }
  1132.  
  1133. did not work as expected in C-Kermit 6.0 and earlier but does work in
  1134. C-Kermit 6.1 and later.
  1135.  
  1136. 13.5. Commands That Have Only Local Effect
  1137.  
  1138. Certain settings are local to each command level, meaning that subordinate
  1139. command levels (macros or command files) can change them without affecting
  1140. their values at higher command levels.  When a new command level is invoked,
  1141. the value is inherited from the previous level.  These settings are:
  1142.  
  1143.   CASE
  1144.   COUNT and \v(count)
  1145.   INPUT CASE
  1146.   INPUT TIMEOUT
  1147.   MACRO ERROR
  1148.   TAKE ERROR
  1149.  
  1150. This arrangement allows CASE, TIMEOUT, and ERROR settings, which are used to
  1151. control automatic exit from a command file or macro upon error, to be
  1152. automatically restored when the command file or macro exits.
  1153.  
  1154. The COUNT variable follows this rule too, which permits nested SET COUNT /
  1155. IF COUNT loops, as in this example in which the inner loop counts down from
  1156. the current COUNT value of the outer loop (try it):
  1157.  
  1158.   DEFINE INNER WHILE COUNT { WRITE SCREEN {   Inner:}, SHOW COUNT }
  1159.   SET COUNT 5
  1160.   WHILE COUNT { WRITE SCREEN Outer:, SHOW COUNT, DO INNER }
  1161.  
  1162. Keep in mind that an inferior command level cannot manipulate the COUNT
  1163. value held by a higher level.  For example:
  1164.  
  1165.   DEFINE OOFA SHOW COUNT, IF COUNT GOTO LOOP
  1166.   SET COUNT 5
  1167.   :LOOP
  1168.   OOFA
  1169.   ECHO Done
  1170.  
  1171. results in an infinite loop; the COUNT value remains at 5 because it is never
  1172. decremented at the same level at which it was set.
  1173.  
  1174. NOTE: "WHILE COUNT" did not work prior to edit 095 of ckuusr.c, 19 Jan 93.
  1175.  
  1176. 13.6. Literal Braces in Function Calls
  1177.  
  1178. Since braces are used in function calls to indicate grouping, there is no way
  1179. to pass literal braces to the function itself.  Solution: Define a variable
  1180. containing the string that has braces.  Example:
  1181.  
  1182.   define \%a ab{cd
  1183.   echo \fsubstring(\%a)
  1184.   ab{cd
  1185.  
  1186. If the string is to start with a leading brace and end with a closing brace,
  1187. then double braces must appear around the string (which itself is enclosed in
  1188. braces):
  1189.  
  1190.   define \%a {{{foo}}}
  1191.   echo \fsubstring(\%a)
  1192.   {foo}
  1193.  
  1194. This also works for any other kind of string:
  1195.  
  1196.   define \%a {{ab{cd}}
  1197.   echo \fsubstring(\%a)
  1198.   ab{cd
  1199.  
  1200. 13.7. Defining Variables on the C-Kermit Command Line
  1201.  
  1202. To define variables on the C-Kermit command line, use the -C command-line
  1203. option with one or more DEFINE or ASSIGN commands.  Note that the C-Kermit
  1204. command line must cope with the quoting rules of your shell.  Examples:
  1205.  
  1206.   kermit -C "define \\%a foo, define phonenumber 7654321"
  1207.  
  1208. In this case we follow UNIX quoting rules by doubling the backslash.  Once
  1209. C-Kermit starts, the \%a and \m(phonenumber) variables are defined as
  1210. indicated and can be used in the normal way.
  1211.  
  1212. In DOS or Windows or OS/2 the command would be:
  1213.  
  1214.   kermit -C "define \%%a foo, define phonenumber 7654321"
  1215.  
  1216. Here we need to double the percent sign rather than the backslash because
  1217. of DOS shell quoting rules.
  1218.  
  1219. 13.8. Per-Character Echo Check with the OUTPUT Command
  1220.  
  1221. Sometimes the OUTPUT command must be used to send commands or data to a device
  1222. in "echoplex" mode, meaning that characters must be sent one at a time, and
  1223. the next character can not be sent until the echo from the previous one has
  1224. been received.  For example, a certain PBX might have this characteristic.
  1225. Let's say a Kermit script is used to program the PBX.  If characters are sent
  1226. too fast, they can be lost.  It would seem that the command:
  1227.  
  1228.   SET OUTPUT PACING <milliseconds>
  1229.  
  1230. could be used to take care of this, but the pacing interval is constant and
  1231. must be set large enough to allow even the slowest echo to finish.  If the
  1232. script is large (an actual example is 14,000 lines long), this can cause it
  1233. to take hours longer than it needs to.
  1234.  
  1235. Here is a macro you can use to OUTPUT a string in an Echoplex environment:
  1236.  
  1237.   define XOUTPUT {
  1238.       local \%c \%i
  1239.       set output pacing 0
  1240.       for \%i 1 \flen(\%*) 1 {
  1241.       asg \%c \fsubstr(\%*,\%i,1)
  1242.           output \%c
  1243.       input 2 \%c
  1244.       }
  1245.   }
  1246.  
  1247. C-Kermit 7.0 or later is required.
  1248.  
  1249. It sends one character at a time and then waits up to 2 seconds for the
  1250. character to be echoed back, but continues to the next character as soon
  1251. as the echo appears, so no time is wasted.  You can add an IF FAIL clause
  1252. after the INPUT in case you want to do something special about failure
  1253. to detect an echo within the timeout period.  Obviously you can also change
  1254. the 2-second limit, and adjust the script in any other desired way.
  1255.  
  1256. 13.9. Other...
  1257.  
  1258. Escape sequences (or any strings that contain control characters) can't be
  1259. used as labels, GOTO targets, or SWITCH cases.
  1260.  
  1261. (End of CKCBWR.TXT)
  1262.