home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckuker.bwr < prev    next >
Text File  |  1994-12-09  |  73KB  |  1,535 lines

  1. CKUKER.BWR          "Beware File" for C-Kermit Version 5A          -*- text -*-
  2.  
  3.                  UNIX VERSION
  4.  
  5. As of C-Kermit version:  5A(190)
  6. This file last updated:  Sat Nov 12 13:07:44 1994
  7.  
  8. Authors: Frank da Cruz and Christine M. Gianone, Columbia University.
  9.  
  10.   Copyright (C) 1985, 1994, Trustees of Columbia University in the City of New
  11.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  12.   sold for profit as a software product itself, nor may it be included in or
  13.   distributed with commercial products or otherwise distributed by commercial
  14.   concerns to their clients or customers without written permission of the
  15.   Office of Kermit Development and Distribution, Columbia University.  This
  16.   copyright notice must not be removed, altered, or obscured.
  17.  
  18. WHAT IS IN THIS FILE
  19.  
  20. This is the "beware file" for the UNIX version of C-Kermit.  It contains
  21. hints and tips, frequently asked questions (and answers), troubleshooting
  22. advice, limitations and restrictions, known bugs, etc, that apply to all UNIX
  23. variations, as well as to specific ones like HP-UX, AIX, SunOS, Solaris,
  24. Unixware, NeXTSTEP, etc etc.  It should be read in conjunction with the
  25. system-independent C-Kermit "beware file", ckcker.bwr, which contains similar
  26. information that applies to all versions of C-Kermit (VMS, OS/2, AOS/VS, VOS,
  27. etc, as well as to UNIX).
  28.  
  29. CONTENTS:
  30.  
  31.   (1) DOCUMENTATION
  32.   (2) IMPORTANT FILES
  33.   (2) BINARIES
  34.   (3) NOTES ON SPECIFIC UNIX VERSIONS
  35.   (3.1) C-KERMIT AND AIX
  36.   (3.2) C-KERMIT AND HP-UX
  37.   (3.3) C-KERMIT AND LINUX
  38.   (3.4) C-KERMIT AND NEXTSTEP
  39.   (3.5) C-KERMIT AND QNX
  40.   (3.6) C-KERMIT AND SCO UNIX, XENIX, AND ODT
  41.   (3.7) C-KERMIT AND SOLARIS
  42.   (3.8) C-KERMIT AND SUNOS
  43.   (3.9) C-KERMIT AND ULTRIX
  44.   (3.10) C-KERMIT AND UNIXWARE
  45.   (3.11) C-KERMIT AND APOLLO SR10
  46.   (3.12) C-KERMIT AND TANDY XENIX 3.0
  47.   (3.13) C-KERMIT AND OSF/1
  48.   (4) GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS
  49.   (5) INITIALIZATION AND COMMAND FILES
  50.   (6) COMMUNICATION SPEED SELECTION
  51.   (7) COMMUNICATIONS AND DIALING
  52.   (8) HARDWARE FLOW CONTROL
  53.   (9) TERMINAL CONNECTION
  54.   (10) FILE TRANSFER
  55.   (11) EXTERNAL FILE TRANSFER PROTOCOLS
  56.   (11.1) C-KERMIT AS AN EXTERNAL PROTOCOL
  57.   (11.2) INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
  58.   (11.3) USING C-KERMIT WITH TERM
  59.   (12) MISCELLANEOUS
  60.  
  61. (1) DOCUMENTATION
  62.  
  63. C-Kermit 5A is documented in the book "Using C-Kermit" by Frank da Cruz and
  64. Christine M. Gianone, 1993, Digital Press / Butterworth-Heinemann, Woburn, MA,
  65. USA, ISBN 1-55558-108-0.  Price: US $34.95.  Available in book and computer
  66. stores, or order by phone, call Columbia University at +1 212 854-3703, or
  67. Butterworth-Heinemann at +1 800 366-2665.  A German edition is available from
  68. Verlag Heinz Heise in Hannover, Germany.
  69.  
  70. New features added since these books were published are documented in the
  71. ckcker.upd file.
  72.  
  73. Please consult the documentation listed above, plus the ckcker.bwr file and
  74. this file itself, before submitting questions, reporting problems, etc, to:
  75.  
  76.   E-Mail: kermit@columbia.edu
  77.  
  78.     Post: Kermit Development and Distribution
  79.           Columbia University Academic Information Systems
  80.           612 West 115th Street, New York, NY  10025  USA
  81.  
  82.     Fax: +1 212 663-8202
  83.      or: +1 212 662-6442
  84.  
  85.  
  86. (2) IMPORTANT FILES
  87.  
  88. In addition to the published documentation, the following files are useful
  89. in troubleshooting:
  90.  
  91.     ckaaaa.hlp:  Overview, file naming conventions, list of files, etc.
  92.     ckuins.doc:  Installation instructions for UNIX C-Kermit.
  93.     ckccfg.doc:  C-Kermit program configuration information.
  94.     ckcker.bwr:  C-Kermit "beware file" for all C-Kermit implementations.
  95.     ckuker.bwr:  C-Kermit "beware file" specific to UNIX (this file).
  96.     ckcplm.doc:  C-Kermit program logic manual.
  97.     ckcker.upd:  User documentation for features added since 5A(188).
  98.     ckcXXX.upd:  Program edit history for edit XXX, e.g. ckc190.upd.
  99.  
  100. (2) BINARIES
  101.  
  102. It is often dangerous to run a binary C-Kermit (or any other) program built
  103. on a different computer.  Particularly if that computer had a different C
  104. compiler, libraries, operating system version, processor features, etc, and
  105. especially if the program was built with shared libraries.
  106.  
  107. It is often OK to run a binary built on an earlier OS version, but it is
  108. rarely possible (or safe) to run a binary built on a later one, for example
  109. to run a binary built under SunOS 4.1.2 on a SunOS 4.1.1 system.
  110.  
  111. When in doubt, build C-Kermit from the source code on the system where it is
  112. to be run (if possible!).
  113.  
  114. (3) NOTES ON SPECIFIC UNIX VERSIONS
  115.  
  116. The following sections apply to specific UNIX versions.
  117.  
  118. (3.1) C-KERMIT AND AIX
  119.  
  120. Many problems reported with bidirectional terminal lines on AIX 3.2.x on the
  121. RS/6000.  Workaround: don't use bidirectional terminal lines, or write some
  122. kind of shell script that turns getty off on the line before starting Kermit,
  123. or before Kermit attempts to do the SET LINE.
  124.  
  125. Reportedly, all versions of IBM AIX use the same (undocumented) lockfile
  126. conventions as RTAIX.  If this is true, the "makes" for PS/2 AIX and AIX/370
  127. will have to be changed to use the RTAIX convention (it may be sufficient to
  128. simply add -DRTAIX to the make entry).
  129.  
  130. C-Kermit SET HOST or TELNET from AIX on an RS/6000 to another RS/6000 won't
  131. work right unless you set your local terminal type to something other than
  132. AIXTERM.  When your terminal type is AIXTERM, AIX TELNET sends two escapes
  133. whenever you type one, and the AIX telnet server swallows one of them.
  134. This has something to do with the "hft" device.  This behavior is reportedly
  135. removed in AIX 3.2.
  136.  
  137. Transfer of binary -- and maybe even text -- files can fail on AIX 3.x.  The
  138. problem was traced to a facility in AIX whereby a particular port can have
  139. character-set translation done for it by the tty driver.  The following
  140. advice from a knowledgeable AIX user:
  141.  
  142.   (begin quote...)  [This feature] has to be checked (and set/cleared) with
  143.   a separate command, unfortunately stty doesn't handle this.  To check:
  144.  
  145.     $ setmaps
  146.     input map: none installed
  147.     output map: none installed
  148.  
  149.   If it says anthing other than "none installed" for either one, it is likely
  150.   to cause a problem with kermit.  To get rid of installed maps:
  151.  
  152.     $ setmaps -t NOMAP
  153.  
  154.   However, I seem to recall that with some versions of AIX before 3.2.5, only
  155.   root could change the setting.  I'm not sure what versions - it might have
  156.   only been under AIX 3.1 that this was true.  At least with AIX 3.2.5 an
  157.   ordinary user can set or clear the maps.  (...end quote) And this would
  158.   imply that Kermit itself cannot be coded to take care of this, because it
  159.   would have to run as root.  On the same problem, another knowledgeable AIX
  160.   user says:
  161.  
  162.   The way to get information on the NLS mapping under AIX (3.2.5 anyway) is
  163.   as follows.  From the command line type:
  164.  
  165.     lsattr -l tty# -a imap -a omap -E -H
  166.  
  167.   Replace the tty number for the number sign above. This will give a human
  168.   readable output of the settings that looks like this;
  169.  
  170.     # lsattr -l tty2 -a imap -a omap -E -H
  171.     attribute value description     user_settable
  172.  
  173.     imap      none  INPUT map file  True
  174.     omap      none  OUTPUT map file True
  175.  
  176.   If you change the -H to a -O, you get output that can easily be processed
  177.   by another program or a shell script, for example:
  178.  
  179.     # lsattr -l tty2 -a imap -a omap -E -O
  180.     #imap:omap
  181.     none:none
  182.  
  183.   To change the settings from the command line, the chdev command is used
  184.   with the following syntax.
  185.  
  186.     chdev -l tty# -a imap='none' -a omap='none'
  187.  
  188.   Again substituting the appropriate tty port number for the number sign,
  189.   "none" being the value we want for C-Kermit.  Of course, the above can also
  190.   be changed by using the SMIT utility and selecting devices - tty.
  191.   (...end quote)
  192.  
  193. (3.2) C-KERMIT AND HP-UX
  194.  
  195. (3.2.1) HP-UX 5.21
  196.  
  197. Reportedly, "[there is] a bug in C-Kermit using HP-UX version 5.21 on the
  198. HP-9000 series 500 computers.  It only occurs when the controlling terminal
  199. is using an HP-27140 six-port modem mux.  The problem is not present if the
  200. controlling terminal is logged into an HP-27130 eight-port mux.  The symptom
  201. is that just after dialing successfully and connecting Kermit locks up and
  202. the port is unusable until both forks of Kermit and the login shell are
  203. killed."
  204.  
  205. (3.2.2) HP-UX 8.05
  206.  
  207. To make C-Kermit work on HP-UX 8.05 on a model 720, obtain and install HP-UX
  208. patch PHNE_0899.  This patch deals with a lot of driver issues, particularly
  209. related to communication at higher speeds.
  210.  
  211. (3.2.3) HP-UX 9.00 AND LATER
  212.  
  213. HP-UX 9.00 and 9.01 need patch PHNE_3641 for hptt0.o, asio0.o, and ttycomn.o
  214. in libhp-ux.a.  Contact Hewlett Packard if you need this patch.  Without it,
  215. the dialout device (tty) will be hung after first use; subsequent attempts to
  216. use will return an error like "device busy".
  217.  
  218. C-Kermit works fine -- including its curses-based file-transfer display -- on
  219. the console terminal, in a remote session (e.g. when logged in to the HP 9000
  220. on a terminal port or when telnetted or rlogin'd), and in an HP-VUE hpterm
  221. window or an xterm window.
  222.  
  223. Before you can use serial ports on the HP-9000, you must configure them as
  224. either "terminals" or "modems" with SAM ("peripheral devices"..."terminals and
  225. modems"), as described in the HP manual, "Configuring HP-UX for Peripherals:
  226. HP 9000".  If you attempt to use a serial device before it has been configured
  227. this way, it will not work properly; typical symptoms are (a) no communication
  228. at all; (b) nonfunctional modem signals; and/or (c) massive amounts of
  229. character loss in both directions.
  230.  
  231. In HP-UX 9.0, serial device names were different between HP9000 Series 700 and
  232. Series 800 systems.  In 10.0, device file names (and also major and minor
  233. numbers) have "converged", as shown in the following table:
  234.  
  235.   Converged HP-UX Serial I/O Filenames : TTY Mux Naming
  236.   ---------------------------------------------------------------------
  237.   General meaning        S800 9.0          S700 9.0    Convio 10.0
  238.   ---------------------------------------------------------------------
  239.   tty* hardwired ports   tty<X>p<Y>        tty<YY>     tty<D>p<p>
  240.              diag:mux<X>                   diag:mux<D>
  241.   ---------------------------------------------------------------------
  242.   ttyd* dial-in modems   ttyd<X>p<Y>       ttyd<YY>    ttyd<D>p<p>
  243.              diag:ttyd<X>p<Y>              diag:ttyd<D>p<p>
  244.   ---------------------------------------------------------------------
  245.   cua* auto-dial out     cua<X>p<Y>        cua<YY>     cua<D>p<p>
  246.              diag:cua<X>p<Y>
  247.   ---------------------------------------------------------------------
  248.   cul* dial-out          cul<X>p<Y>        cul<YY>     cul<D>p<p>
  249.              diag:cul<X>p<Y>
  250.   ---------------------------------------------------------------------
  251.    <X>= LU (Logical Unit)  <D>= Devspec (decimal card instance)
  252.    <Y> or <YY> = Port      <p>= Port
  253.  
  254. For dialing out, you should use the cua or cul devices.  When C-Kermit's
  255. CARRIER setting is AUTO or ON, C-Kermit will pop back to its prompt
  256. automatically if the carrier signal drops, e.g. when you log out from the
  257. remote computer or service.  If you use the tty<D>p<d> (e.g. tty0p0) device,
  258. the carrier signal is ignored.  The tty<D>p<d> device should be used for
  259. direct connections where the carrier signal does not follow RS-232
  260. conventions (use the cul device for hardwired connections through a true null
  261. modem).  Do not use the ttyd<D>p<d> device for dialing out.
  262.  
  263. Kermit's access to serial devices is controlled by "UUCP lockfiles", which are
  264. intended to prevent different users using different software programs (Kermit,
  265. cu, etc, and UUCP itself) from accessing the same serial device at the same
  266. time.  When a device is in use by a particular user, a file with a special
  267. name is created in the /var/spool/locks directory.  The file's name indicates
  268. the device that is in use, and its contents indicates the process ID (pid) of
  269. the process that is using the device.  Since serial devices and the
  270. /var/spool/locks directory are not both publicly readable and writable, Kermit
  271. and other communication software must be installed setuid to the owner (bin)
  272. of the serial device and setgid to the group (daemon) of the /var/spool/locks
  273. directory.  Kermit's setuid and setgid privileges are enabled only when
  274. opening the device and accessing the lockfiles.
  275.  
  276. Let's say "unit" means a string of decimal digits (the interface instance
  277. number) followed by the letter "p" (lowercase), followed by another string of
  278. decimal digits (the port number on the interface), e.g. "0p0", "0p1", "1p0",
  279. etc.  Then a normal serial device (driver) name consists of a prefix ("tty",
  280. "ttyd", "cua", "cul") followed by a unit, e.g. "cua0p0".  Kermit's treatment
  281. of UUCP lockfiles is as close as possible to that of the HP-UX "cu" program.
  282. Here is a table of the lockfiles that Kermit creates for unit 0p0:
  283.  
  284.   Selection      Lockfile 1     Lockfile 2
  285.   ------------   ------------   ------------
  286.   /dev/tty0p0    LCK..tty0p0    (none)
  287. * /dev/ttyd0p0   LCK..ttyd0p0   (none)
  288.   /dev/cua0p0    LCK..cua0p0    LCK..ttyd0p0
  289.   /dev/cul0p0    LCK..cul0p0    LCK..ttyd0p0
  290.   <other>        LCK..<other>   (none)
  291.  
  292. (* = Dialin device, should not be used.)
  293.  
  294. The final case allows for symbolic links, etc, but, of course, it is not
  295. foolproof since we have no way of telling which device is really being used.
  296.  
  297. When Kermit tries to open a dialout device whose name ends with a "unit", it
  298. searches the lockfile directory for all possible names for the same unit.  For
  299. example, if user selects /dev/cul2p3, Kermit looks for lockfiles named
  300. LCK..tty2p3, LCK..ttyd2p3, LCK..cua2p3, and LCK..cul2p3.
  301.  
  302. If any of these files are found, Kermit opens them to find out the ID (pid) of
  303. the process that created them; if the pid is still valid, the process is still
  304. active, and so the SET LINE command fails and the user is informed of the pid
  305. so s/he can use "ps" to find out who is using the device.
  306.  
  307. If the pid is not valid, the file is deleted.  If all such files (i.e. with
  308. same "unit" designation) are successfully removed, then the SET LINE command
  309. succeeds; up to four messages are printed telling the user which "stale
  310. lockfiles" are being removed.
  311.  
  312. If the selected device was in use by "cu", Kermit can't open it, because "cu"
  313. has changed its ownership, so we never get as far as looking at the lockfiles.
  314. In the normal case, we can't even look at the device to see who the owner is
  315. because it is visible only to its (present) owner.  In this case, Kermit says
  316. (for example):
  317.  
  318.   /dev/cua0p0: Permission denied
  319.  
  320. When Kermit releases a device it has successfully opened, it removes all the
  321. lockfiles that it created.  This also happens whenever Kermit exits "under its
  322. own power".
  323.  
  324. If Kermit is killed with a device open, the lockfile(s) are left behind.  The
  325. next Kermit program that tries to assign the device, under any of its various
  326. names, will automatically clean up the stale lockfiles because the pids
  327. they contain are invalid.
  328.  
  329. (3.3) C-KERMIT AND LINUX
  330.  
  331. Building C-Kermit on Linux 1.1.33 and 1.1.34 gets fatal compilation errors
  332. due to inconsistencies in the Linux header files.  Linux kernel versions prior
  333. to 1.1.33 and later than 1.1.34 should be OK.
  334.  
  335. C-Kermit versions prior to 5A(190) did not support hardware flow control or
  336. high interface speeds for Linux.
  337.  
  338. Different UUCP lockfile conventions are used by Linux, depending on your
  339. Linux distribution.  By default, "make linux" or "make linuxtcp" uses
  340. /usr/spool/uucp/LCK..name, integer PID.  If you add -DLINUXFSSTND ("Linux
  341. File System Standard") to the compile-time definitions, for example:
  342.  
  343.   make linux KFLAGS=-DLINUXFSSTND
  344.  
  345. then it will use /var/lock/LCK..name, decimal ASCII 10-byte PID string with
  346. leading zeros.  Use whichever option agrees with your uucp, cu, tip, etc,
  347. programs.
  348.  
  349. Run C-Kermit in the regular console screen, which provides VT100 emulation via
  350. the "console" termcap entry, or under X-Windows in an xterm window.  Before
  351. starting C-Kermit in an xterm window, tell the xterm window's shell to "stty
  352. sane".
  353.  
  354. One Linux user reported problems dialing out using the /dev/cua device;
  355. "device busy" errors.  He said that using the alternative name (driver) for
  356. the device, /dev/ttyS2, made the problem go away.
  357.  
  358. (3.4) C-KERMIT AND NEXTSTEP
  359.  
  360. Run C-Kermit in a Terminal, Stuart, or xterm window, or when logged in
  361. remotely through a serial port or TELNET connection.  C-Kermit does not work
  362. correctly when invoked directly from the NeXTSTEP File Viewer or Dock.  This
  363. is because the terminal-oriented gtty, stty, & ioctl calls don't work on the
  364. little window that NeXTSTEP pops up for non-NeXTSTEP applications like Kermit.
  365. CBREAK and No-ECHO settings do not take effect in the command parser --
  366. commands are parsed strictly line at a time.  "set line /dev/cua" works.
  367. During CONNECT mode, the console stays in cooked mode, so characters are not
  368. transmitted until carriage return or linefeed is typed, and you can't escape
  369. back.  If you want to run Kermit directly from the File Viewer, then launch it
  370. from a shell script that puts it in the desired kind of window, something like
  371. this (for "Terminal"):
  372.  
  373.   Terminal -Lines 24 -Columns 80 -WinLocX 100 -WinLocY 100 $FONT $FONTSIZE \
  374.   -SourceDotLogin -Shell /usr/local/bin/kermit &
  375.  
  376. C-Kermit does not work correctly on a NeXT with NeXTSTEP 3.0 to which you have
  377. established an rlogin connection, due to a bug in NeXTSTEP 3.0, which has been
  378. reported to NeXT.
  379.  
  380. The SET CARRIER command has no effect on the NeXT -- this is a limitation of
  381. the tty device drivers.
  382.  
  383. Hardware flow control on the NeXT is selected not by "set flow rts/cts" in
  384. Kermit (since NeXTSTEP offers no API for this), but rather, by using a
  385. specially-named driver for the serial device: /dev/cufa instead /dev/cua;
  386. /dev/cufb instead of /dev/cub.  This is available only on 68040-based NeXT
  387. models (the situation for Intel NeXTSTEP implementations is unknown).
  388.  
  389. NeXT-built 68030 and 68040 models have different kinds of serial interfaces;
  390. the 68030 has a Macintosh-like RS-422 interface, which lacks RTS and CTS
  391. signals; the 68040 has an RS-423 (RS-232 compatible) interface, which
  392. supports the commonly-used modem signals.  WARNING: the connectors look
  393. exactly the same, but the pins are used in completely DIFFERENT ways --
  394. different cables are required for the two kinds of interfaces.
  395.  
  396.   IF YOU GET LOTS OF RETRANSMISSIONS during file transfer, even when
  397.   using a /dev/cuf* device and the modem is correctly configured for
  398.   RTS/CTS flow control, YOU PROBABLY HAVE THE WRONG KIND OF CABLE.
  399.  
  400. On the NeXT, Kermit reportedly (by TimeMon) causes the kernel to use a lot of
  401. CPU time when using a "set line" connection.  That's because there is no DMA
  402. channel for the NeXT serial port, so the port must interrupt the kernel for
  403. each character in or out.
  404.  
  405. One user reported trouble running C-Kermit on a NeXT from within NeXT's
  406. Subprocess class under NeXTstep 3.0, and/or when rlogin'd from one NeXT to
  407. another: Error opening /dev/tty:, congm: No such device or address.
  408. Diagnosis: Bug in NeXTSTEP 3.0, cure unknown.
  409.  
  410. (3.5) C-KERMIT AND QNX
  411.  
  412. Support for QNX 4.x was added in C-Kermit 5A(190).  This is a full-function
  413. implementation, thoroughly tested on QNX 4.21, and verified to work in both
  414. 16-bit and 32-bit versions.  Most advanced features are supported including
  415. TCP/IP, high serial speeds, hardware flow-control, modem-signal awareness,
  416. curses support, etc.
  417.  
  418. Dialout devices are normally /dev/ser1, /dev/ser2, ..., and can be opened
  419. explicitly with SET LINE.  Reportedly, "/dev/ser" (no unit number) opens the
  420. first available /dev/ser<n> device.
  421.  
  422. Like all other UNIX C-Kermit implementations, QNX C-Kermit does not provide
  423. any kind of terminal emulation.  Terminal specific functions are provided by
  424. your terminal, terminal window (e.g. QNX Terminal or xterm), or emulator.
  425.  
  426. QNX C-Kermit, as distributed, does not include support for UUCP line-locking;
  427. the QNX makefile entries (qnx32 and qnx16) include the -DNOUUCP switch.  This
  428. is because QNX, as distributed, does not include UUCP, and its own
  429. communications software (e.g. qterm) does not use UUCP line locking.  If you
  430. have a UUCP product installed on your QNX system, remove the -DNOUUCP switch
  431. from the makefile entry and rebuild.  Then check to see that Kermit's UUCP
  432. lockfile conventions are the same as those of your UUCP package; if not, read
  433. the UUCP lockfile section ckuins.doc and make the necessary changes to the
  434. makefile entry (e.g. add -DHDBUUCP).
  435.  
  436. BUG: The fullscreen file transfer display works fine the first time, but it is
  437. fractured on subsequent file transfers.  Cause and cure unknown.
  438.  
  439. (3.6) C-KERMIT AND SCO UNIX, XENIX, AND ODT
  440.  
  441. Use SCO-provided utilities for switching the directionality of a modem line,
  442. such as "enable" and "disable" commands.  For example, to dial out on tty1a,
  443. which is normally set up for logins:
  444.  
  445.   disable tty1a
  446.   kermit -l /dev/tty1a
  447.   enable tty1a
  448.  
  449. In SCO Xenix, you must use SET CARRIER ON *and* use the upper-case tty device
  450. name in order to have carrier detection.  SET CARRIER OFF should work with
  451. either upper or lowercase tty devices.  SET CARRIER AUTO is the same as OFF.
  452.  
  453. SCO Xenix and UNIX can provide different names for the same device.  In Xenix,
  454. /dev/tty1a refers to a terminal device that has no modem control; open, read,
  455. write, and close operations do not depend on carrier.  On the other hand,
  456. /dev/tty1A (same name, but with final letter upper case), is the same device
  457. with modem control, in which carrier is required (the SET LINE command does
  458. not complete until carrier appears, read/write operations fail if there is no
  459. carrier, etc).  In the SCO case, C-Kermit always uses the lowercase name when
  460. creating the UUCP lockfile (this is, according to SCO experts, the proper
  461. behavior, but reportedly not all other communications applications found on
  462. SCO systems follow this rule).
  463.  
  464. One user of C-Kermit on SCO UNIX 3.2.4 reports that C-Kermit dumps core when
  465. receiving files in local mode.  The crash invariably occurs when the 16384th
  466. byte arrives, obviously indicating some kind of int/long, or short/int, or
  467. similar mismatch in argument-passing -- no doubt the byte count.  Other users
  468. of SCO UNIX 3.2.4, built using the same makefile entry, report that they can
  469. receive files of any length with no problem at all.  Maybe it depends on which
  470. file transfer display is being used?  If this happens to you, try using a
  471. different file transfer display (SET FILE DISPLAY NONE, SERIAL, CRT, or
  472. FULLSCREEN).
  473.  
  474. (3.7) C-KERMIT AND SOLARIS
  475.  
  476. C-Kermit can't be compiled successfully under Solaris 2.3 using SUNWspro cc
  477. 2.0.1 unless at least some of the following patches are applied to cc (it is
  478. not known which one(s), if any, fix the problem):
  479.  
  480.   100935-01 SparcCompiler C 2.0.1: bad code generated when addresses
  481.     of two double arguments are involved 
  482.   100961-05 SPARCcompilers C 2.0.1: conditional expression with
  483.     function returning strucure gives wrong value 
  484.   100974-01 SparcWorks 2.0.1: dbx jumbo patch
  485.   101424-01 SPARCworks 2.0.1 maketool SEGV's instantly on Solaris 2.3
  486.  
  487. With unpatched cc 2.0.1, the symptom is that certain modules generate
  488. truncated object files, resulting in many unresolved references at link time.
  489.  
  490. Reportedly, "C-Kermit ... causes a SPARCstation running Solaris 2.3
  491. to panic after the modem connects.  I have tried compiling C-Kermit with Sun's
  492. unbundled C compiler, with GCC Versions 2.4.5 and 2.5.3, with make targets
  493. 'sunos51', 'sunos51tcp', 'sunos51gcc', and even 'sys5r4', and each time it
  494. compiles and starts up cleanly, but without fail, as soon as I dial the number
  495. and get a 'CONNECT' message from the modem, I get:
  496.  
  497.   BAD TRAP
  498.   kermit: Data fault
  499.   kernel read fault at addr=0x45c, pme=0x0
  500.   Sync Error Reg 80 <INVALID>
  501.   ...
  502.   panic: Data Fault.
  503.   ...
  504.   Rebooting...
  505.  
  506. The same modem works fine for UUCP/tip calling."  Also (reportedly), this only
  507. happens if the dialout port is configured as in/out via admintool.  If it is
  508. configured as out-only, no problem.  This is the same dialing code that works
  509. on hundreds of other System-V based UNIX OS's.  Since it should be impossible
  510. for a user program to crash the operating system, this problem must be chalked
  511. up to a Solaris bug.  Even if you SET CARRIER OFF, CONNECT, and dial manually
  512. by typing ATDTnnnnnnn, the system panics as soon as the modem issues its
  513. CONNECT message.  (Clearly, when you are dialing manually, C-Kermit does not
  514. know a thing about the CONNECT message, and so the panic is almost certainly
  515. caused by the transition of the Carrier Detect (CD) line from off to on.)
  516. This problem was reported by many users, all of whom say that C-Kermit worked
  517. fine on Solaris 2.1 and 2.2.  If the speculation about CD is true, then a
  518. possible workaround might be to configure the modem to leave CD on (or off)
  519. all the time.  Perhaps by the time you read this, a patch will have been
  520. issued for Solaris 2.3.
  521.  
  522. The following is from Karl S. Marsh, Systems & Networks Administrator,
  523. AMBIX Systems Corp, Rochester, NY (begin quote):
  524.  
  525. "Environment:
  526.   Solaris 2.3 Patch 101318-45
  527.   C-Kermit 5A(189) (and presumably this applies to 188 and 190 also)
  528.   eeprom setting:
  529.     ttya-rts-dtr-off=false
  530.     ttya-ignore-cd=false
  531.     ttya-mode=19200,8,n,8,-
  532.  
  533. "To use C-Kermit on a bidirectional port in this environment, do not use
  534. admintool to configure the port.  Use admintool to delete any services running
  535. on the port and then quit admintool and issue the following command:
  536.  
  537.   pmadm -a -p zsmon -s ttyb -i root -fu -v 1 -m "`ttyadm -b -d /dev/term/b \
  538.   -l conttyH -m ldterm,ttcompat -s /usr/bin/login -S n`"
  539.  
  540. [NOTE: This was copied from a fax, so please check it carefully]  where:
  541.  
  542.   -a = Add service
  543.   -p = pmtag (zsmon)
  544.   -s = service tag (ttyb)
  545.   -i = id to be associated with service tag (root)
  546.   -fu = create utmp entry
  547.   -v = version of ttyadm
  548.   -m = port monitor-specific portion of the port monitor administrative file
  549.        entry for the service
  550.   -b = set up port for bidirectional use
  551.   -d = full path name of device
  552.   -l = which ttylabel in the /etc/ttydefs file to use
  553.   -m = a list of pushable STREAMS modules
  554.   -s = pathname of service to be invoked when connection request received
  555.   -S = software carrier detect on or off (n = off)
  556.  
  557. "This is exactly how I was able to get Kermit to work on a bi-directional
  558. port without crashing the system."  (End quote)
  559.  
  560. On the Solaris problem, also see SunSolve Bug ID 1150457 ("Using C-Kermit, get
  561. Bad Trap on receiving prompt from remote system").  Another user reported "So,
  562. I have communicated with the Sun tech support person that submitted this bug
  563. report [1150457].  Apparently, this bug was fixed under one of the jumbo
  564. kernel patches.  It would seem that the fix did not live on into 101318-45, as
  565. this is EXACTLY the error that I see when I attempt to use kermit on my
  566. system."
  567.  
  568. Later (Aug 94)...  C-Kermit dialout successfully tested on a Sun4m with a
  569. heavily patched Solaris 2.3.  The patches most likely to have been relevant:
  570.  
  571. 101318-50: SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)
  572. 101720-01: SunOS 5.3: ttymon - prompt not always visible on a modem connection
  573. 101815-01: SunOS 5.3: Data fault in put() NULL queue passed from
  574.                       ttycommon_qfull()
  575. 101328-01: SunOS 5.3: Automation script to properly setup tty ports prior to
  576.                       PCTS execution
  577.  
  578. Still later (Nov 94): another user (Bo Kullmar in Sweden) reports that after
  579. using C-Kermit to dial out on a bidirectional port, the port might not answer
  580. subsequent incoming calls, and says "the problem is easy enough to to fix with
  581. the Serial Port Manager; I just delete the service and and install it again
  582. using the graphical interface, which underneath uses commands like sacadm and
  583. pmadm."  Later Bo reports, "I have found that if I run Kermit with the
  584. following script then it works.  This script is for /dev/cua/a, -s a is the
  585. last a in /dev/cua/a
  586.  
  587.   #! /bin/sh
  588.   kermit
  589.   sleep 2
  590.   surun pmadm -e -p zsmon -s a
  591.  
  592. (end quote)
  593.  
  594. The built-in SunLink X.25 support for Solaris 2.3 and SunLink 8.01 works
  595. OK provided the X.25 system has been installed and initialized properly.
  596. Packet sizes might need to be reduced to 256, depending on the configuration
  597. of the X.25 installation.
  598.  
  599. In any case, according to Sun, C-Kermit's X.25 support is superfluous with
  600. SunLink 8.x / Solaris 2.3.  Quoting an anonymous Sun engineer:
  601.  
  602.   ... there is now no need to include any X.25 code within kermit.  As of
  603.   X.25 8.0.1 we support the use of kermit, uucp and similar protocols over
  604.   devices of type /dev/xty.  This facility was there in 8.0, and should
  605.   also work on the 8.0 release if patch 101524 is applied, but I'm not 100%
  606.   sure it will work in all cases, which is why we only claim support from
  607.   8.0.1 onwards.
  608.  
  609.   When configuring X.25, on the "Advanced Configuration->Parameters" screen
  610.   of the x25tool you can select a number of XTY devices.  If you set this
  611.   to be > 1, press Apply, and reboot, you will get a number of /dev/xty
  612.   entries created.
  613.  
  614.   Ignore /dev/xty0, it is a special case.  All the others can be used exactly
  615.   as if they were a serial line (e.g. /dev/tty) connected to a modem, except
  616.   that instead of using Hayes-style commands, you use PAD commands.
  617.  
  618.   From kermit you can do a 'set line' command to, say, /dev/xty1, then set
  619.   your dialing command to be "CALL 12345678", etc.  All the usual PAD
  620.   commands will work (SET, PAR, etc).
  621.  
  622.   I know of one customer in Australia who is successfully using this, with
  623.   kermit scripts, to manage some X.25-connected switches. He used standard
  624.   kermit, compiled for Solaris 2, with X.25 8.0 xty devices.
  625.  
  626. (3.8) C-KERMIT AND SUNOS
  627.  
  628. Sun SPARCstation users should read the section "Setting up Modem Software" in
  629. the Desktop SPARC Sun System & Network Manager's Guide.  If you don't set up
  630. your serial ports correctly, Kermit (and other communications software) won't
  631. work right.
  632.  
  633. Reportedly, C-Kermit does not work correctly on a Sun SPARCstation in an Open
  634. Windows window with scrolling enabled.  Disable scrolling, or else invoke
  635. Kermit in a terminal emulation window (xterm, crttool, vttool) under SunView
  636. (this might be fixed in later SunOS releases).
  637.  
  638. On the Sun with Open Windows, an additional symptom has been reported:
  639. outbound SunLink X.25 connections "magically" translate CR typed at the
  640. keyboard into LF before transmission to the remote host.  This doesn't happen
  641. under SunView.
  642.  
  643. SET CARRIER ON, when used on the SunOS 4.1 version of C-Kermit (compiled in
  644. the BSD universe), causes the program to hang uninterruptibly when SET LINE
  645. is issued for a device that is not asserting carrier.  When Kermit is built
  646. in the Sys V universe on the same computer, there is no problem (it can be
  647. interrupted with Ctrl-C).  This is apparently a limitation of the BSD-style
  648. tty driver.
  649.  
  650. SunOS 4.1 C-Kermit has been observed to dump core when running a complicated
  651. script program under cron.  The dump invariably occurs in ttoc(), while trying
  652. to output a character to a TCP/IP TELNET connection.  ttoc() contains a
  653. write() call, and when the system or the network is very busy, the write()
  654. call can get stuck for long periods of time.  To break out of deadlocks caused
  655. by stuck write() calls, there is an alarm around the write().  It is possible
  656. that the core dump occurs when this alarm signal is caught.  (This one has
  657. not been observed recently -- possibly fixed in edit 190.)
  658.  
  659. On Sun computers with SunOS 4.0 or 4.1, SET FLOW RTS/CTS works only if the
  660. carrier signal is present from the communication device at the time when
  661. C-Kermit enters packet mode or CONNECT mode.  If carrier is not sensed (e.g.
  662. when dialing), C-Kermit does not attempt to turn on RTS/CTS flow control.
  663. This is because the SunOS serial device driver does not allow characters to
  664. be output if RTS/CTS is set (CRTSCTS) but carrier (and DSR) are not present.
  665. Workaround (maybe):  SET CARRIER OFF before giving the SET LINE command,
  666. establish the connection, then SET FLOW RTS/CTS
  667.  
  668. It has also been reported that RTS/CTS flow control under SunOS 4.1 through
  669. 4.1.3 works only on INPUT, not on output, and that there is a patch from Sun
  670. to correct this problem: Patch-ID# T100513-04, 20 July 1993 (this patch might
  671. apply only to version 4.1.3).  It might also be necessary to configure the
  672. eeprom parameters of the serial port; e.g. do the following as root at the
  673. shell prompt:
  674.  
  675.   eeprom  ttya-ignore-cd=false
  676.   eeprom  ttya-rts-dtr-off=true
  677.  
  678. There have been reports of file transfer failures on Sun-3 systems when using
  679. long packets and/or large window sizes.  One user says that when this happens,
  680. the console issues many copies of this message:
  681.  
  682.   chaos vmunix: zs1: ring buffer overflow
  683.  
  684. This means that SunOS is not scheduling Kermit frequently enough to service
  685. interrupts from the zs serial device (Zilog 8350 SCC serial communication
  686. port) before its input silo overflows.  Workaround: use smaller packets
  687. and/or a smaller window size, or use "nice" to increase Kermit's priority.
  688. Use hardware flow control if available, or remove other active processes
  689. before running Kermit.
  690.  
  691. SunLink X.25 support in C-Kermit 5A(190) has been built and tested
  692. successfully under SunOS 4.1.3b and SunLink X.25 7.00.
  693.  
  694. (3.9) C-KERMIT AND ULTRIX
  695.  
  696. Reportedly, DEC ULTRIX 4.3 is immune to C-Kermit's disabling of SIGQUIT,
  697. which is the signal that is generated when the user types Ctrl-\, which kills
  698. the current process (i.e. C-Kermit) and dumps core.  Diagnosis and cure
  699. unknown.  Workaround: before starting C-Kermit -- or for that matter, when you
  700. first log in because this applies to all processes, not just Kermit -- give
  701. the following UNIX command:
  702.  
  703.   stty quit undef
  704.  
  705. Certain operations driven by RS-232 modem signal do not work on DECstations or
  706. other DEC platforms whose serial interfaces use MMP connectors (DEC version of
  707. RJ45 telephone jack with with offset tab).  These connectors convey only the
  708. DSR and DTR modem signals, but not carrier (CD), RTS, CTS, or RI.  Use SET
  709. CARRIER OFF to enable communication, or "hotwire" DSR to CD.
  710.  
  711. (3.10) C-KERMIT AND UNIXWARE
  712.  
  713. Using the UnixWare 1.1 Application Server, one user reports a system panic
  714. when the following script program is executed:
  715.  
  716.   set line /dev/tty4
  717.   set speed 9600
  718.   output \13
  719.   connect
  720.  
  721. The panic does not happen if a PAUSE is inserted:
  722.  
  723.   set line /dev/tty4
  724.   set speed 9600
  725.   pause 1
  726.   output \13
  727.   connect
  728.  
  729. This is using a Stallion EasyIO card installed as board 0 on IRQ 12 on
  730. a Gateway 386 with the Stallion-supplied driver.  The problem was reported 
  731. to Novell and Stallion, resolution pending.  (Reportedly, this problem
  732. is now fixed.)
  733.  
  734. (3.11) C-KERMIT AND APOLLO SR10
  735.  
  736. Reportedly, version 5A(190), when built under Apollo SR10 using "make
  737. sr10-bsd", compiles, links, and executes OK, but leaves the terminal unusable
  738. after it exits -- the "cs7" or "cs8" (character size) parameter has become
  739. cs5.  The terminal must be reset from another terminal.  Cause and cure
  740. unknown.  Suggested workaround: Wrap Kermit in a shell script something like:
  741.  
  742.   kermit @*
  743.   stty sane
  744.  
  745. (3.12) C-KERMIT AND TANDY XENIX 3.0
  746.  
  747. Reportedly, if you type lots of Ctrl-C's during execution of the
  748. initialization file, ghost Kermit processes will be created, and will compete
  749. for the keyboard.  They can only be removed via "kill -9" from another
  750. terminal, or by rebooting.  Diagnosis -- something strange happening with
  751. the SIGINT handler while the process is reading the directory (it seems to
  752. occur during the SET PROMPT [\v(dir)] ... sequence).  Cure: unknown.
  753. Workaround: don't interrupt C-Kermit while it is executing its init file on
  754. the Tandy 16/6000.
  755.  
  756. (3.13) C-KERMIT AND OSF/1
  757.  
  758. Reportedly, if a modem is set for &S0 (assert DSR at all times), the system
  759. resets or drops DTR every 30 seconds; reportedly DEC says to set &S1.
  760.  
  761. (4) GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS
  762.  
  763. C-Kermit will not work as expected on a remote UNIX system, when used through
  764. the GNU "screen" program.  In this case, terminal connections to the remote
  765. UNIX system work, but attempts to transfer files fail because the screen
  766. optimization (or at least, line wrapping, control-character absorption) done
  767. by this package interferes with Kermit's packets.
  768.  
  769. On UNIX workstations equipped with DOS emulators like SoftPC, watch out for
  770. what these emulators do to the serial port drivers.  After using a DOS
  771. emulator, particularly if you use it to run DOS communications software, you
  772. might have to reconfigure the serial ports for use by UNIX.
  773.  
  774. On AT&T 7300 (3B1) machines, you might have to "stty nl1" before starting
  775. C-Kermit.  Do this if characters are lost during communications operations.
  776.  
  777. Under the bash shell (versions prior to 1.07 from CWRU), "pushing" to an
  778. inferior shell and then exiting back to Kermit leaves Kermit in the background
  779. such that it must be explicitly fg'd.  This is reportedly fixed in version
  780. 1.07 of bash.
  781.  
  782. Interruption by Ctrl-Z makes UNIX C-Kermit try to suspend itself with
  783. kill(0,SIGSTOP), but only on systems that support job control, as determined
  784. by whether the symbol SIGTSTP is defined (or on POSIX or SVR4 systems, if
  785. syconf(_SC_JOB_CONTROL) or _POSIX_JOB_CONTROL in addition to SIGTSTP).
  786. However, if Kermit is running under a login shell (such as the original Bourne
  787. shell) that does not support job control, the user's session hangs and must be
  788. logged out from another terminal, or hung up on.  There is no way Kermit can
  789. defend itself against this.  If you use a non-job control shell on a computer
  790. that supports job control, give a command like "stty susp undef" to fix it so
  791. the suspend signal is not attached to any particular key, or give the command
  792. SET SUSPEND OFF to C-Kermit, or build C-Kermit with -DNOJC.
  793.  
  794. A more subtle problem occurs on certain system / shell combinations.
  795. Reportedly, for example, on Silicon Graphics (SGI) machines with IRIX 4.0,
  796. Kermit cannot be suspended by typing the suspend ("swtch") character if it was
  797. started from csh, even though other programs can be suspended this way, and
  798. even though the Z and SUSPEND commands still work correctly.  This is
  799. evidently because IRIX's csh does not deliver the SIGTSTP signal to Kermit.
  800. The reason other programs can be suspended in the same environment is probably
  801. that they do not trap SIGTSTP themselves, so the shell is doing the suspending
  802. rather than the application.
  803.  
  804. Reportedly, the UNIX C-Kermit server, under some conditions, on certain
  805. particular systems, fails to log out its login session upon receipt of a
  806. BYE command.  Before relying on the BYE command working, test it a few times
  807. to make sure it works on your system: there might be system configuration or
  808. security mechanisms to prevent an inferior process (like Kermit) from
  809. killing a superior one (like the login shell).
  810.  
  811. (5) INITIALIZATION AND COMMAND FILES
  812.  
  813. C-Kermit's initialization file for UNIX is .kermrc (lowercase, starts with
  814. period) in your home directory, unless Kermit was built with the system-wide
  815. initialization-file option (see ckuins.doc).
  816.  
  817. C-Kermit identifies your home directory based on the environment variable,
  818. HOME.  Most UNIX systems set this variable automatically when you log in.  If
  819. C-Kermit can't find your initialization file, check your HOME variable:
  820.  
  821.   echo $HOME      (at the UNIX prompt)
  822.  
  823. or:
  824.  
  825.   echo \$(HOME)   (at the C-Kermit prompt)
  826.  
  827. If HOME is not defined, or is defined incorrectly, add the appropriate
  828. definition to your UNIX .profile or .login file, depending on your shell:
  829.  
  830.   setenv HOME full-pathname-of-your-home-directory  (C-Shell, .login file)
  831. or:
  832.   HOME=full-pathname-of-your-home-directory         (sh, ksh, .profile file)
  833.   export HOME
  834.  
  835. NOTE: Various other operations depend on the correct definition of HOME.
  836. These include the "tilde-expansion" feature, which allows you to refer to
  837. your home directory as "~" in filenames used in C-Kermit commands, e.g.
  838.  
  839.   send ~/.kermrc
  840.  
  841. as well as the \v(home) variable.
  842.  
  843. Prior to version 5A(190), C-Kermit would look for its initialization file in
  844. the current directory if it was not found in the home directory.  This feature
  845. was removed from 5A(190) because it was a security risk.  Some people, however,
  846. liked this behavior and had .kermrc files in all their directories that would
  847. set up things appropriately for the files therein.  If you want this behavior,
  848. you can accomplish it in various ways, for example:
  849.  
  850.  . Create a shell alias, for example:
  851.    alias kd="kermit -Y ./.kermrc"
  852.  
  853.  . Create a .kermrc file in your home directory, whose contents are:
  854.    take ./.kermrc   
  855.  
  856. The TAKE command does not search your UNIX PATH for command files.  If a
  857. command file is not in the current directory, you must give a full path
  858. specification for it.  This poses a problem for TAKE commands that are
  859. themselves in TAKE files.  See the trick used in CKETEST.INI...
  860.  
  861. Suppose you need to pass a password from the UNIX command line to a C-Kermit
  862. script program, in such a way that it does not show up in "ps" or "w" listings.
  863. Here is a method (not guaranteed to be 100% secure, but definitely more secure
  864. than the more obvious methods):
  865.  
  866.   echo mypassword | kermit myscript
  867.  
  868. The "myscript" file contains all the commands that need to be executed during
  869. the Kermit session, up to and including EXIT, and also includes an ASK or ASKQ
  870. command to read the password from standard input, which has been piped in from
  871. the UNIX 'echo' command, but it must not include a CONNECT command.  Only
  872. "kermit myscript" shows up in the ps listing.
  873.  
  874. (6) COMMUNICATION SPEED SELECTION
  875.  
  876. Version-7 based UNIX implementations, including 4.3 BSD and earlier and
  877. UNIX systems based upon BSD, use a 4-bit field to record a serial device's
  878. terminal speed.  This leaves room for 16 speeds, which are normally:
  879.  
  880.   0, 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 4800, and 9600
  881.  
  882. The remaining two are usually called EXTA and EXTB, and are defined by the
  883. particular UNIX implementation.  C-Kermit determines which speeds are
  884. available on your system based on whether symbols for them are defined in your
  885. terminal device header files.  EXTA is generally assumed to be 19200 and EXTB
  886. 38400, but these assumptions might be wrong, or they might not apply to a
  887. particular device that does not support these speeds.  Presumably, if you try
  888. to set a speed that is not legal on a particular device, the driver will
  889. return an error, but this can not be guaranteed.
  890.  
  891. On these systems, it is usually not possible to select a speed of 14400 bps
  892. for use with V.32bis modems.  In that case, use 19200 or 38400 bps, configure
  893. your modem to lock its interface speed and to use RTS/CTS flow control, and
  894. tell C-Kermit to SET SPEED RTS/CTS and SET DIAL SPEED-MATCHING OFF.
  895.  
  896. Some recent versions of UNIX, and/or terminal device drivers that come with
  897. certain third-party add-in high-speed serial communication interfaces, use the
  898. low "baud rates" to stand for higher ones.  For example, SET SPEED 50 gets you
  899. 57600 bps; SET SPEED 75 gets you 76800; SET SPEED 110 gets 115200.
  900.  
  901. The situation is similar, but different, in System V.  SVID Third Edition
  902. lists the same speeds, 0 through 38400.
  903.  
  904. For further details, read the section TERMINAL SPEEDS in ckuins.doc.
  905.  
  906. (7) COMMUNICATIONS AND DIALING
  907.  
  908. The SET CARRIER command works as advertised only if the underlying operating
  909. system and device drivers support this feature; in particular only if a read()
  910. operation returns immediately with an error code if the carrier signal goes
  911. away.  And, of course, if the devices themselves (e.g. modems)
  912. are configured appropriately and the cables convey the carrier signal, etc.
  913.  
  914. When UNIX C-Kermit exits, it closes (and must close) the communications
  915. device.  If you were dialed out, this will most likely hang up the connection.
  916. If you want to get out of Kermit and still use Kermit's communication device,
  917. you have several choices:
  918.  
  919.  1. Shell out from Kermit or suspend Kermit, and refer to the device literally
  920.     (as in "term -blah -blah < /dev/cua > /dev/cua").
  921.  
  922.  2. Shell out from Kermit and use the device's file descriptor which Kermit
  923.     makes available to you in the \v(ttyfd) variable.
  924.  
  925.  3. Use C-Kermit's REDIRECT command.  See the CKCKER.UPD file about this.
  926.  
  927. If you are having trouble dialing:
  928.  
  929.  1. Make sure the dialout line is configured correctly.  More
  930.     about this below.
  931.  
  932.  2. Make sure all necessary patches are installed for your operating
  933.     system.
  934.  
  935.  3. If you can't dial on a "bidirectional" line, then configure it for
  936.     outbound-only (remove the getty) and try again.  (The mechanisms -- if
  937.     any -- for grabbing bidirectional lines for dialout vary wildly
  938.     among UNIX implementations and releases, and C-Kermit -- which runs on
  939.     well over 300 different UNIX variations -- makes no effort to keep up 
  940.     with them; the recommended method for coping with this situation is to 
  941.     wrap C-Kermit in a shell script that takes the appropriate actions.)
  942.  
  943.  4. Make sure C-Kermit's SET DIAL and SET MODEM parameters agree with the
  944.     modem you are actually using -- pay particular attention to SET DIAL
  945.     SPEED-MATCHING.
  946.  
  947.  5. Try SET DIAL HANGUP OFF before the DIAL command.  Also, SET DIAL DISPLAY
  948.     ON to watch what's happening.  See section 8 of ckuins.doc.
  949.  
  950.  6. Read pages 50-67 of "Using C-Kermit".
  951.  
  952.  7. As a last resort, don't use the DIAL command at all; SET CARRIER OFF and
  953.     CONNECT to the modem and dial interactively, or write a script program to
  954.     dial the modem.
  955.  
  956. Make sure your dialout line is correctly configured for dialing out (as
  957. opposed to login).  The method for doing this is different for each kind of
  958. UNIX system.  Consult your system documentation for configuring lines for
  959. dialing out (for example, SUN SparcStation IPC users should read the section
  960. "Setting up Modem Software" in the Desktop SPARC Sun System & Network
  961. Manager's Guide; HP-9000 workstation users should consult the manual
  962. "Configuring HP-UX for Peripherals", etc).
  963.  
  964. Symptom: DIAL works, but a subsequent CONNECT command does not.  Diagnosis:
  965. the modem is not asserting Carrier Detect (CD) after the connection is made,
  966. or the cable does not convey the CD signal.  Cure: Reconfigure the modem,
  967. replace the cable.  Workaround: SET CARRIER OFF (at least in System-V based
  968. UNIX versions).
  969.  
  970. C-Kermit tries to use the 8th bit for data when parity is NONE, and this
  971. generally works on real UNIX terminal (tty) devices, but it often does not
  972. work when the UNIX system is accessed over a network via telnet or rlogin
  973. protocols, including (in many cases) through terminal servers.  For example,
  974. an Encore computer with Annex terminal servers only gives a 7-bit path if
  975. the rlogin protocol is selected in the terminal server but it gives the full
  976. 8 bits if the proprietary RDP protocol is used.
  977.  
  978. If file transfer does not work through a host to which you have rlogin'd,
  979. use "rlogin -8" rather than "rlogin".  If that doesn't work, tell both Kermit
  980. programs to "set parity space".
  981.  
  982. The Encore TELNET server does not allow long bursts of input.  When you have
  983. a TELNET connection to an Encore, tell C-Kermit on the Encore to SET RECEIVE
  984. PACKET-LENGTH 200 or thereabouts.
  985.  
  986. For Berkeley-UNIX-based systems (4.3BSD and earlier), Kermit includes code to
  987. use LPASS8 mode when parity is none, which is supposed to allow 8-bit data and
  988. Xon/Xoff flow control at the same time.  However, as of edit 174, this code is
  989. entirely disabled because it is unreliable: even though the host operating
  990. system might (or might not) support LPASS8 mode correctly, the host access
  991. protocols (terminal servers, telnet, rlogin, etc) generally have no way of
  992. finding out about it and therefore render it ineffective, causing file
  993. transfer failures.  So as of edit 174, Kermit once again uses rawmode for
  994. 8-bit data, and so there is no Xon/Xoff flow control during file transfer or
  995. terminal emulation in the Berkeley-based versions (4.3 and earlier, not 4.4).
  996.  
  997. Also on Berkeley-based systems (4.3 and earlier), there is apparently no way
  998. to configure a dialout line for proper carrier handling, i.e. ignore carrier
  999. during dialing, require carrier thereafter, get a fatal error on any attempt
  1000. to read from the device after carrier drops (this is handled nicely in System
  1001. V by manipulation of the CLOCAL flag).  The symptom is that carrier loss does
  1002. not make C-Kermit pop back to the prompt automatically.  This is evident on
  1003. the NeXT, for example, but not on SunOS, which supports the CLOCAL flag.  This
  1004. is not a Kermit problem, but a limitation of the underlying operating system.
  1005. For example, the cu program on the NeXT doesn't notice carrier loss either,
  1006. whereas cu on the Sun does.
  1007.  
  1008. On certain AT&T UNIX systems equipped with AT&T modems, DIAL and HANGUP don't
  1009. work right.  Workarounds: (1) SET DIAL HANGUP OFF before attempting to dial;
  1010. (2) If HANGUP doesn't work, SET LINE, and then SET LINE <device> to totally
  1011. close and reopen the device.  If all else fails, SET CARRIER OFF.
  1012.  
  1013. C-Kermit does not contain any particular support for AT&T DataKit devices.
  1014. You can use Kermit software to dial in to a DataKit line, but C-Kermit does
  1015. not contain the specialized code required to dial out from a DataKit line.  If
  1016. the UNIX system is connected to DataKit via serial ports, dialout should work
  1017. normally (e.g. set line /dev/ttym1, set speed 19200, connect, and then see the
  1018. DESTINATION: prompt, from which you can connect to another computer on the
  1019. DataKit network or to an outgoing modem pool, etc).  But if the UNIX system
  1020. is connected to the DataKit network through the special DataKit interface
  1021. board, then SET LINE to a DataKit pseudodevice (such as /dev/dk031t) will not
  1022. work (you must use the DataKit "dk" or "dkcu" program instead).
  1023.  
  1024. In some BSD-based UNIX C-Kermit versions, SET LINE to a port that has nothing
  1025. plugged in to it with SET CARRIER ON will hang the program (as it should), but
  1026. it can't be interrupted with Ctrl-C.  The interrupt trap is correctly armed,
  1027. but apparently the UNIX open() call cannot be interrupted in this case.  When
  1028. SET CARRIER is OFF or AUTO, the SET LINE will eventually return, but then the
  1029. program hangs (uninterruptibly) when the EXIT or QUIT command (or, presumably,
  1030. another SET LINE command) is given.  The latter is probably because of the
  1031. attempt to hang up the modem.  (In edit 169, a timeout alarm was placed around
  1032. this operation.)
  1033.  
  1034. With SET DIAL HANGUP OFF in effect, the DIAL command might work only once,
  1035. but not again on the same device.  In that case, give a SET LINE command
  1036. with no arguments to close the device, and then another SET LINE command for
  1037. the desired device.  Or rebuild your version of Kermit with the -DCLSOPN
  1038. compile-time switch (see ckuins.doc).
  1039.  
  1040. The DIAL command says "To cancel: Type your interrupt character (normally
  1041. Ctrl-C)."  This is just one example of where program messages and
  1042. documentation assume your interrupt character is Ctrl-C.  But it might be
  1043. something else.  In most (but not necessarily all) cases, the character
  1044. referred to is the one that generates the SIGINT signal.  If Ctrl-C doesn't
  1045. act as an interrupt character for you, type the Unix command "stty -a" or
  1046. "stty all" or "stty everything" to see what your interrupt character is.
  1047. (Kermit could be made to find out what the interrupt character is, but this
  1048. would require a lot of system-dependent coding and #ifdefs, and a new routine
  1049. and interface between the system-dependent and system-independent parts of the
  1050. program.)
  1051.  
  1052. In general, the hangup operation on a serial communication device is prone
  1053. to failure.  C-Kermit tries to support many, many different kinds of
  1054. computers, and there seems to be no portable method for hanging up a modem
  1055. connection (i.e. turning off the RS-232 DTR signal and then turning it back on
  1056. again).  If HANGUP, DIAL, and/or Ctrl-\H do not work for you, and you are a
  1057. programmer, look at the tthang() function in ckutio.c and see if you can add
  1058. code to make it work correctly for your system, and send the code to the
  1059. address above.  (NOTE: This problem has been largely sidestepped as of edit
  1060. 188, in which Kermit first attempts to hang up the modem by "escaping back"
  1061. via +++ and then giving the modem's hangup command, e.g. ATH0, when DIAL
  1062. MODEM-HANGUP is ON, which is the default setting.)
  1063.  
  1064. Even when Kermit's modem-control software is configured correctly for your
  1065. computer, it can only work right if your modem is also configured to assert
  1066. the CD signal when it is connected to the remote modem and to hang up the
  1067. connection when your computer drops the DTR signal.  So before deciding Kermit
  1068. doesn't work with your modem, check your modem configuration AND the cable (if
  1069. any) connecting your modem to the computer -- it should be a straight-through
  1070. modem cable conducting the signals FG, SG, TD, RD, RTS, CTS, DSR, DTR, CD,
  1071. and RI.
  1072.  
  1073. Many UNIX systems keep aliases for dialout devices; for example, /dev/acu
  1074. might be an alias for /dev/tty00.  But most of these UNIX systems also use
  1075. UUCP lockfile conventions that do not take this aliasing into account, so if
  1076. one user assigns (e.g.) /dev/acu, then another user can still assign the same
  1077. device by referring to its other name.  This is not a Kermit problem --
  1078. Kermit must follow the lockfile conventions used by the vendor-supplied
  1079. software (cu, tip, uucp).
  1080.  
  1081. The SET FLOW-CONTROL KEEP option should be given *before* any communication
  1082. (dialing, terminal emulation, file transfer, INPUT/OUTPUT/TRANSMIT, etc) is
  1083. attempted, if you want C-Kermit to use all of the device's preexisting
  1084. flow-control related settings.  The default flow-control setting is XON/XOFF,
  1085. and it will take effect when the first communication-related command is given,
  1086. and a subsequent SET FLOW KEEP command will not necessarily know how to
  1087. restore *all* of the device's original flow-control settings.
  1088.  
  1089. (8) HARDWARE FLOW CONTROL
  1090.  
  1091. SET FLOW RTS/CTS is available in UNIX C-Kermit only when the underlying
  1092. operating system provides an Application Program Interface (API) for turning
  1093. this feature on and off under program control, which turns out to be a rather
  1094. rare feature among UNIX systems.  To see if your UNIX C-Kermit version
  1095. supports hardware flow control, type "set flow ?" at the C-Kermit prompt, and
  1096. look for "rts/cts" among the options.  Other common situations include:
  1097.  
  1098.  1. The API is available, so "set flow rts/cts" appears as a valid C-Kermit
  1099.     command, but it doesn't do anything because the device driver (part of
  1100.     the operating system) was never coded to do hardware flow control.  This
  1101.     is common among System V R4 implementations (details below).
  1102.  
  1103.  2. The API is not available, so "set flow rts/cts" does NOT appear as a valid
  1104.     C-Kermit command, but you can still get RTS/CTS flow control by selecting
  1105.     a specially named device in your SET LINE command.  Examples:
  1106.  
  1107.       NeXTSTEP: /dev/cufa instead of /dev/cua, /dev/cufb instead of /dev/cub
  1108.       (68040 only; "man zs" for further info).
  1109.  
  1110.       IRIX: /dev/ttyf2 instead of /dev/ttyd2 or /dev/ttym2 ("man 7 serial").
  1111.  
  1112.  3. The API is available, doesn't work, but a workaround as in (2) can be used.
  1113.  
  1114.  4. The API is available, but Kermit doesn't know about it.  In these cases,
  1115.     you can usually use an stty command to enable RTS/CTS on the device, e.g.
  1116.     "stty crtscts" or "stty ctsflow", "stty rtsflow", before starting Kermit,
  1117.     and then tell Kermit to SET FLOW KEEP.
  1118.  
  1119.  5. No API and no special device drivers.  Hardware flow control is completely
  1120.     unavailable.
  1121.  
  1122. System V R4 based UNIXes are supposed to supply a <termiox.h> file, which
  1123. gives Kermit the necessary interface to command the terminal driver to
  1124. enable/disable hardware flow control.  Unfortunately, but predictably, many
  1125. implementations of SVR4 whimsically place this file in /usr/include/sys rather
  1126. than /usr/include (where SVID clearly specifies it should be; see SVID, Third
  1127. Edition, V1, termiox(BA_DEV).  Thus if you build C-Kermit with any of the
  1128. makefile entries that contain -DTERMIOX or -DSTERMIOX (the latter to select
  1129. <sys/termiox.h>), C-Kermit will have "set flow rts/cts" and possibly other
  1130. hardware flow-control related commands.  BUT...  That does not necessarily
  1131. mean that they will work.  In some cases, the underlying functions are simply
  1132. not coded into the operating system.
  1133.  
  1134. (9) TERMINAL CONNECTION
  1135.  
  1136. UNIX C-Kermit's SET KEY command currently can not be used with keys that
  1137. generate "wide" scan codes or multibyte sequences, such as workstation 
  1138. function or arrow keys.  More about this in CKCKER.BWR.
  1139.  
  1140. Many UNIX workstations and/or console drivers provide their own key mapping
  1141. feature.  With xterm, for example, you can use 'xmodmap' ("man xmodmap" for
  1142. details); here is an xterm mapping to map the Sun keyboard to DEC VT200 values
  1143. for use with VT-terminal oriented applications like VMS EVE:
  1144.  
  1145.   keycode 101=KP_0
  1146.   keycode 119=KP_1
  1147.   keycode 120=KP_2
  1148.   keycode 121=KP_3
  1149.   keycode 98=KP_4
  1150.   keycode 99=KP_5
  1151.   keycode 100=KP_6
  1152.   keycode 75=KP_7
  1153.   keycode 76=KP_8
  1154.   keycode 77=KP_9
  1155.   keycode 52=KP_F1
  1156.   keycode 53=KP_F2
  1157.   keycode 54=KP_F3
  1158.   keycode 57=KP_Decimal
  1159.   keycode 28=Left
  1160.   keycode 29=Right
  1161.   keycode 30=KP_Separator
  1162.   keycode 105=KP_F4
  1163.   keycode 78=KP_Subtract
  1164.   keycode 8=Left
  1165.   keycode 10=Right
  1166.   keycode 32=Up
  1167.   keycode 33=Down
  1168.   keycode 97=KP_Enter
  1169.  
  1170. UNIX GNU EMACS includes a "kermit" library that allows Kermit connections to
  1171. be made to other computers from within an EMACS window.  As of June 1994,
  1172. there is also a Kermit file transfer library for GNU EMACS.
  1173.  
  1174. (10) FILE TRANSFER
  1175.  
  1176. UNIX C-Kermit does not reject incoming files on the basis of size.  There
  1177. appears to be no good (reliable, portable) way to determine in advance how
  1178. much disk space is available, either on the device, or (when quotas are
  1179. involved) to the user.
  1180.  
  1181. File transfer will fail if the incoming file is bigger than your ULIMIT.
  1182. Use the UNIX ulimit command to examine or change your ULIMIT (the number is
  1183. in 512-byte blocks, i.e. 0.5K).
  1184.  
  1185. UNIX C-Kermit discards all carriage returns from incoming files when in text
  1186. mode.
  1187.  
  1188. If you SET FILE DISPLAY FULLSCREEN, and C-Kermit complains "Sorry, terminal
  1189. type not supported", it means that the terminal library (termcap or termlib)
  1190. that C-Kermit was built with does not know about a terminal whose name is the
  1191. current value of your TERM environment variable.  If this happens, EXIT from
  1192. C-Kermit and set a UNIX terminal type from among the supported values that is
  1193. also supported by your terminal emulator, or else have an entry for your
  1194. terminal type added to the system termcap and/or terminfo database.
  1195.  
  1196. If you attempt to suspend C-Kermit during local-mode file transfer and then
  1197. continue it in the background (via bg), it will block for "tty output" if
  1198. you are using the FULLSCREEN file transfer display.  This is apparently
  1199. a problem with curses.  Moving a local-mode file transfer back and forth
  1200. between foreground and background works correctly, however, with the SERIAL,
  1201. CRT, or NONE file transfer displays.
  1202.  
  1203. If C-Kermit's command parser no longer echoes, or otherwise acts strangely,
  1204. after returning from a file transfer with the fullscreen (curses) display,
  1205. and your version of UNIX is based on AT&T System V, then try rebuilding your
  1206. version of C-Kermit with -DCK_NEWTERM.  Similarly if it echoes doubly, which
  1207. might even happen during a subsequent CONNECT session.  If rebuilding with
  1208. -DCK_NEWTERM doesn't fix it, then there is something very strange about your
  1209. systems curses library, and you should probably not use it.  Tell C-Kermit
  1210. to SET FILE DISPLAY CRT or anything else other than FULLSCREEN.
  1211.  
  1212. It has been observed on a couple platforms -- e.g. BSDI and QNX -- that the
  1213. curses display works properly only once.  The second and subsequent times,
  1214. the display is a mess.  The reason is unknown, the cure is unknown.  See the
  1215. comments in screenc() in ckuusx.c.  In one other case (one of the Linux
  1216. distributions), a cure was obtained by linking to a different curses library
  1217. (ncurses rather than curses).
  1218.  
  1219. Reportedly, when using "MSEND *" from a 14-character filename UNIX system to
  1220. another system (e.g. BSD) that allows longer names, with SET FILE NAMES
  1221. LITERAL, any files with 14-character names will have a space added to the end
  1222. of the name on the receiving machine.
  1223.  
  1224. Optimum file transfer performance is a matter of tuning parameters like packet
  1225. length and window size, and, on serial connections, of ensuring there is an
  1226. effective flow control method, preferably hardware (such as RTS/CTS).  In
  1227. C-Kermit 5A(189) and later, you can also use the new "control character
  1228. unprefixing feature" to boost performance, particularly for binary and/or
  1229. precompressed files (see the ckcker.upd file for details).
  1230.  
  1231. However, a fully-configured C-Kermit program can be slower than a minimally
  1232. configured one simply because of its size.  A command-line-only version that
  1233. is stripped of every conceivable feature not affecting file transfer (such as
  1234. "sunos41m" for the Sun or "dellsys5r4m" for Dell) can move files faster than a
  1235. full-featured one.  Thus, it might make sense to keep a minimal version
  1236. available as well as a full-featured one.  See the files ckuins.doc and
  1237. ckccfg.doc as well as the makefile for how to do this.
  1238.  
  1239. A fairly substantial reduction in size and a noticeable improvement in speed
  1240. can be obtained simply by rebuilding C-Kermit without the debugging feature:
  1241.  
  1242.   make <entryname> KFLAGS=-DNODEBUG
  1243.  
  1244. See ckccfg.doc for more detailed information about configuration.
  1245.  
  1246. (11) EXTERNAL FILE TRANSFER PROTOCOLS
  1247.  
  1248. UNIX C-Kermit can be used in conjunction with other communications software
  1249. in various ways.  C-Kermit can be invoked from another communications program
  1250. as an "external protocol", and C-Kermit can also invoke other communication
  1251. software to perform external protocols.
  1252.  
  1253. This sort of operation makes sense only when you are dialing out from your
  1254. UNIX system.  If the UNIX system is the one you have dialed in to, you don't
  1255. need any of these tricks.  Just run the desired software on your UNIX system
  1256. instead of Kermit.  When dialing out from a UNIX system, the difficulty is
  1257. getting two programs to share the same communication device in spite of the
  1258. UNIX UUCP lockfile mechanism, which would normally prevent any sharing.
  1259.  
  1260. (11.1) C-KERMIT AS AN EXTERNAL PROTOCOL
  1261.  
  1262. "pcomm" is a general-purpose terminal program that provides file transfer
  1263. capabilities itself (X- and YMODEM variations) and the ability to call on
  1264. external programs to do file transfers (ZMODEM and Kermit, for example).  You
  1265. can tell pcomm the command to send or receive a file with an external
  1266. protocol:
  1267.             send                receive
  1268.     ZMODEM        sz <filename>            rz
  1269.     Kermit        kermit -s <filename>        kermit -r
  1270.  
  1271. pcomm runs external programs for file transfer by making stdin and stdout
  1272. point to the modem port, and then exec-ing "/bin/sh -c xxx" (where xxx is the
  1273. appropriate command).  However, C-Kermit does not treat stdin and stdout as
  1274. the communication device unless you instruct it:
  1275.  
  1276.             send                receive
  1277.     Kermit        kermit -l 0 -s <filename>    kermit -l 0 -r
  1278.  
  1279. The "-l 0" option means to use file descriptor 0 for the communication device.
  1280.  
  1281. In general, any program can pass any open file descriptor to C-Kermit for the
  1282. communication device in the "-l" command-line option.
  1283.  
  1284. (11.2) INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
  1285.  
  1286. After you have opened a communication link with C-Kermit's SET LINE (SET PORT)
  1287. or SET HOST (TELNET) command, C-Kermit makes its file descriptor available to
  1288. you in the \v(ttyfd) variable so you can make it available to other programs
  1289. that you RUN from C-Kermit.  Here, for example, C-Kermit runs itself as an
  1290. external protocol:
  1291.  
  1292.   C-Kermit>set modem hayes
  1293.   C-Kermit>set line /dev/acu
  1294.   C-Kermit>set speed 2400
  1295.   C-Kermit>dial 7654321
  1296.    Call complete.
  1297.   C-Kermit>echo \v(ttyfd)
  1298.    3
  1299.   C-Kermit>run kermit -l \v(ttyfd)
  1300.  
  1301. Other programs that accept open file descriptors on the command line can be
  1302. started in the same way.
  1303.  
  1304. You can also use your shell's i/o redirection facilities to assign C-Kermit's
  1305. open file descriptor (ttyfd) to stdin or stdout.  For example, old versions of
  1306. the UNIX ZMODEM programs, sz and rz, when invoked as external protocols,
  1307. expect to find the communication device assigned to stdin and stdout with no
  1308. option for specifying any other file descriptor on the sz or rz command line.
  1309. However, you can still invoke sz and rz as exterior protocols from C-Kermit if
  1310. your current shell ($SHELL variable) is ksh (the Korn shell) or bash (the
  1311. Bourne-Again shell), which allows assignment of arbitrary file descriptors to
  1312. stdin and stdout:
  1313.  
  1314.   C-Kermit> run rz <&\v(ttyfd) >&\v(ttyfd)
  1315.  
  1316. or:
  1317.  
  1318.   C-Kermit> run sz oofa.zip <&\v(ttyfd) >&\v(ttyfd)
  1319.  
  1320. In version 5A(190) and later, you can use C-Kermit's REDIRECT command, if it
  1321. is available in your version of C-Kermit, to accomplish the same thing without
  1322. going through the shell:
  1323.  
  1324.   C-Kermit> redirect rz
  1325.  
  1326. or:
  1327.  
  1328.   C-Kermit> redirect sz oofa.zip
  1329.  
  1330. A complete set of rz,sz,rb,sb,rx,sx macros for UNIX C-Kermit is defined in
  1331. the file ckurzsz.ini.  It automatically chooses the best redirection method.
  1332.  
  1333. (11.3) USING C-KERMIT WITH TERM
  1334.  
  1335. The "term" program provides an error-corrected, multiplexed connection
  1336. between two UNIX systems, allowing you to run multiple applications over a
  1337. single connection, for example several terminal windows and a file transfer
  1338. simultaneously.  Term depends on a communications application (such as
  1339. C-Kermit) to make the connection and then redirect it to term's standard i/o.
  1340. The advantages of using C-Kermit rather than other communication programs for
  1341. this include:
  1342.  
  1343.  . C-Kermit's script language lets you automate the entire process.
  1344.  
  1345.  . With C-Kermit's REDIRECT command, term sessions are not limited to serial
  1346.    connections, but can work over network connections (TCP/IP, X.25) too.
  1347.  
  1348. Here is an example showing how to set up a term session between two UNIX
  1349. systems with with C-Kermit (assuming the connection has already been made
  1350. by C-Kermit, e.g. by dialing up):
  1351.  
  1352.   C-Kermit> connect
  1353.   login: xxx
  1354.   Password: xxx
  1355.   $ exec term -r -s 38400 -A
  1356.   ^\c (escape back)
  1357.   C-Kermit>redirect term -s 38400 -A &
  1358.   C-Kermit>push
  1359.   $ 
  1360.  
  1361. Now you can run term clients such as trsh and tupload at the local shell
  1362. prompt.
  1363.  
  1364. (12) MISCELLANEOUS
  1365.  
  1366. If C-Kermit has problems creating files in writable directories when it is
  1367. installed setuid or setgid on BSD-based versions of UNIX such
  1368. as NeXTSTEP 3.0, it probably needs to be rebuilt with the -DSW_ACC_ID
  1369. comilation switch (see ckuins.doc).
  1370.  
  1371. Reportedly, when coming into a Sequent UNIX (DYNIX) system through an X.25
  1372. connection, Kermit doesn't work right because the Sequent's FIONREAD ioctl
  1373. returns incorrect data.  To work around, use the 1-character-at-a-time version
  1374. of myread() in ckutio.c (i.e. undefine MYREAD in ckutio.c and rebuild the
  1375. program).
  1376.  
  1377. ------------------------------
  1378.  
  1379. USER REPORTS -
  1380.  
  1381. Date: Thu, 12 Mar 92 1:59:25 MEZ
  1382. From: Walter Mecky <walter@rent-a-guru.de>
  1383. Subject: Help.Unix.sw
  1384. To: svr4@pcsbst.pcs.com, source@usl.com
  1385.  
  1386. PRODUCT:    Unix
  1387. RELEASE:    Dell SVR4 V2.1 (is USL V3.0)
  1388. MACHINE:    AT-386
  1389. PATHNAME:    /usr/lib/libc.so.1
  1390.         /usr/ccs/lib/libc.a
  1391. ABSTRACT:    Function ttyname() does not close its file descriptor
  1392. DESCRIPTION:
  1393.     ttyname(3C) opens /dev but never closes it. So if it is called
  1394.     often enough the open(2) in ttyname() fails. Because the broken
  1395.     ttyname() is in the shared lib too all programs using it can
  1396.     fail if they call it often enough. One important program is
  1397.     uucico which calls ttyname for every file it transfers.
  1398.  
  1399. Here is a little test program if your system has the bug:
  1400.  
  1401. #include <stdlib.h>
  1402. #include <stdio.h>
  1403. main() {
  1404.     int i = 0;
  1405.     while (ttyname(0) != NULL)
  1406.       i++;
  1407.     perror("ttyname");
  1408.     printf("i=%d\n", i);
  1409. }
  1410.  
  1411. If this program runs longer than some seconds you don't have the bug.
  1412.  
  1413. WORKAROUND:
  1414.     None
  1415. FIX:
  1416.     Very easy if you have source code.
  1417.  
  1418. Another user reports some more explicit symptoms and recoveries:
  1419.  
  1420. > What happens is when invoking ckermit we get one of the following
  1421. > error messages:
  1422. >   You must set line
  1423. >   Not a tty
  1424. >   No more processes.
  1425. > One of the following three actions clears the peoblem:
  1426. >   shutdown -y -g0 -i6
  1427. >   kill -9 the ttymon with the highest PID
  1428. >   Invoke sysadm and disable then enable the line you want to use.
  1429. > Turning off respawn of sac -t 300 and going to getty's and uugetty's 
  1430. > does not help.
  1431. > Also C-Kermit reports "?timed out closing /dev/ttyxx".
  1432. > If this happens all is well.
  1433.  
  1434. ------------------------------
  1435.  
  1436. (Note: the following problem also occurs on SGI and probably many other
  1437. UNIX systems):
  1438.  
  1439. From: James Spath <spath@jhunix.hcf.jhu.edu>
  1440. To: Info-Kermit-Request@cunixf.cc.columbia.edu
  1441. Date: Wed, 9 Sep 1992 20:20:28 -0400
  1442. Subject: C-Kermit vs uugetty (or init) on Sperry 5000
  1443.  
  1444. We have sucessfully compiled the above release on a Unisys/Sperry 5000/95.  We
  1445. used the sys5r3 option, rather than sys5r2 since we have VR3 running on our
  1446. system.  In order to allow dialout access to non-superusers, we had to do
  1447. "chmod 666 /dev/tty###", where it had been -rw--w--w- (owned by uucp), and to
  1448. do "chmod +w /usr/spool/locks".  We have done text and binary file transfers
  1449. through local and remote connections.
  1450.  
  1451. The problem concerning uucp ownership and permissions is worse than I thought
  1452. at first.  Apparently init or uugetty changes the file permissions after each
  1453. session.  So I wrote the following C program to open a set of requested tty
  1454. lines.  I run this for any required outgoing line prior to a Kermit session.
  1455.  
  1456.    ------ cut here -------
  1457. /* opentty.c -- force allow read on tty lines for modem i/o */
  1458. /* idea from: restrict.c -- Systsem 5 Admin book Thomas/Farrow p. 605 */
  1459. /* /jes jim spath {spath@jhunix.hcj.jhu.edu } */
  1460. /* 08-Sep-92 NO COPYRIGHT. */
  1461. /* this must be suid to open other tty lines */
  1462.  
  1463. /* #define DEBUG */
  1464. #define TTY "/dev/tty"
  1465. #define LOK "/usr/spool/locks/LCK..tty"
  1466. #include <stdio.h>
  1467.  
  1468. /* allowable lines: */
  1469. #define TOTAL_LINES 3
  1470. static char allowable[TOTAL_LINES][4] = { "200", "201", "300" };
  1471. static int total=TOTAL_LINES;
  1472. int allow;
  1473.  
  1474. /* states: */
  1475. #define TTY_UNDEF 0
  1476. #define TTY_LOCK  1
  1477. #define TTY_OKAY  2
  1478.  
  1479. main(argc, argv)
  1480. int argc; char *argv[]; {
  1481.     char device[512];
  1482.     char lockdev[512];
  1483.     int i;
  1484.     if (argc == 1) {
  1485.     fprintf(stderr, "usage: open 200 [...]\n");
  1486.     }
  1487.     while (--argc > 0 && (*++argv) != NULL ) {
  1488. #ifdef DEBUG
  1489.     fprintf(stderr, "TRYING: %s%s\n", TTY, *argv);
  1490. #endif
  1491.     sprintf(device, "%s%s", TTY, *argv);
  1492.     sprintf(lockdev, "%s%s", LOK, *argv);
  1493.     allow = TTY_UNDEF; i = 0;
  1494.     while (i <= total) { /* look at all defined lines */
  1495. #ifdef DEBUG
  1496.         fprintf(stderr, "LOCKFILE? %s?\n", lockdev);
  1497. #endif
  1498.         if (access(lockdev, 00) == 0) {
  1499.         allow=TTY_LOCK;
  1500.         break;
  1501.         }
  1502. #ifdef DEBUG
  1503.         fprintf(stderr, "DOES:%s==%s?\n", allowable[i], *argv);
  1504. #endif
  1505.         if (strcmp(allowable[i], *argv) == 0)
  1506.           allow=TTY_OKAY;
  1507.         i++;
  1508.     }
  1509. #ifdef DEBUG
  1510.     fprintf(stderr, "allow=%d\n", allow);
  1511. #endif
  1512.     switch (allow) {
  1513.       case TTY_UNDEF:
  1514.         fprintf (stderr, "open: not allowed on %s\n", *argv);
  1515.         break;
  1516.       case TTY_LOCK:
  1517.         fprintf (stderr, "open: device locked: %s\n", lockdev);
  1518.         break;
  1519.       case TTY_OKAY:
  1520.         /* attempt to change mode on device */
  1521.         if (chmod (device, 00666) < 0)
  1522.           fprintf (stderr, "open: cannot chmod on %s\n", device);
  1523.         break;
  1524.       default:
  1525.         fprintf (stderr, "open: FAULT\n");
  1526.     }
  1527.     }
  1528.     exit (0);
  1529. }
  1530.  
  1531. ------------------------------
  1532.  
  1533. (End of CKUKER.BWR)
  1534.