home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ck9197.zip / ckubwr.txt < prev    next >
Text File  |  2000-02-20  |  173KB  |  3,514 lines

  1. CKUBWR.TXT         "Beware File" for C-Kermit Version 7.0         -*- text -*-
  2.  
  3.                   C-KERMIT FOR UNIX
  4.  
  5.  
  6. As of C-Kermit version:  7.0.197
  7. This file last updated:  8 February 2000
  8.  
  9.  
  10. Authors: Frank da Cruz and Christine M. Gianone, Columbia University.
  11.  
  12.   Copyright (C) 1985, 2000,
  13.     Trustees of Columbia University in the City of New York.
  14.     All rights reserved.  See the C-Kermit COPYING.TXT file or the
  15.     copyright text in the ckcmai.c module for disclaimer and permissions.
  16.  
  17. WHAT IS IN THIS FILE
  18.  
  19. This is the "beware file" for the UNIX version of C-Kermit.  It contains hints
  20. and tips, frequently asked questions (and answers), troubleshooting advice,
  21. limitations and restrictions, known bugs, unresolved reports, etc, that apply
  22. to all UNIX variations, as well as to specific ones like HP-UX, AIX, Solaris,
  23. SunOS, Unixware, NeXTSTEP, etc etc.
  24.  
  25. This file should be read in conjunction with the system-independent C-Kermit
  26. beware file, ckcbwr.txt, which contains similar information, but applying to
  27. all versions of C-Kermit (VMS, OS/2, AOS/VS, VOS, etc, as well as to UNIX).
  28.  
  29.  
  30. CONTENTS
  31.  
  32.   (0)  DOCUMENTATION AND TECHNICAL SUPPORT
  33.   (0.1)  THE C-KERMIT USER MANUAL
  34.   (0.2)  TECHNICAL SUPPORT
  35.   (0.3)  THE YEAR 2000
  36.   (0.4)  THE EURO SYMBOL
  37.   (1)  IMPORTANT FILES
  38.   (2)  BINARIES
  39.   (3)  NOTES ON SPECIFIC UNIX VERSIONS
  40.   (3.0)  C-KERMIT ON PC-BASED UNIXES
  41.   (3.1)  C-KERMIT AND AIX
  42.   (3.2)  C-KERMIT AND HP-UX
  43.      3.2.0. Common Problems
  44.      3.2.1. Building C-Kermit on HP-UX
  45.      3.2.2. Performance
  46.      3.2.3. Dialing Out and UUCP Lockfiles in HP-UX
  47.      3.2.4. HP-UX 5.00
  48.      3.2.5. HP-UX 8.00
  49.      3.2.6. HP-UX 9.00 AND LATER
  50.      3.2.7. HP-UX 10.10 AND LATER
  51.      3.2.8. HP-UX and X.25
  52.   (3.3)  C-KERMIT AND LINUX
  53.      3.3.1. Problems Building C-Kermit for Linux
  54.      3.3.2. Problems with Serial Devices in Linux
  55.      3.3.3. Terminal Emulation in Linux
  56.      3.3.4. Dates and Times
  57.          3.3.5. Startup Errors
  58.   (3.4)  C-KERMIT AND NEXTSTEP
  59.   (3.5)  C-KERMIT AND QNX
  60.   (3.6)  C-KERMIT AND SCO UNIX, XENIX, ODT, AND OPENSERVER
  61.   (3.7)  C-KERMIT AND SOLARIS
  62.   (3.8)  C-KERMIT AND SUNOS
  63.   (3.9)  C-KERMIT AND ULTRIX
  64.   (3.10) C-KERMIT AND UNIXWARE
  65.   (3.11) C-KERMIT AND APOLLO SR10
  66.   (3.12) C-KERMIT AND TANDY XENIX 3.0
  67.   (3.13) C-KERMIT AND OSF/1 (DIGITAL UNIX)
  68.   (3.14) C-KERMIT AND SGI IRIX
  69.   (3.15) C-KERMIT AND THE BEBOX
  70.   (3.16) C-KERMIT AND DG/UX
  71.   (3.17) C-KERMIT AND SEQUENT DYNIX
  72.   (3.18) C-KERMIT AND {FREE,OPEN,NET}BSD
  73.   (4)  GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS
  74.   (5)  INITIALIZATION AND COMMAND FILES
  75.   (6)  COMMUNICATION SPEED SELECTION
  76.   (7)  COMMUNICATIONS AND DIALING
  77.   (8)  HARDWARE FLOW CONTROL
  78.   (9)  TERMINAL CONNECTION AND KEY MAPPING
  79.   (10) FILE TRANSFER
  80.   (11) EXTERNAL FILE TRANSFER PROTOCOLS
  81.   (11.1) C-KERMIT AS AN EXTERNAL PROTOCOL
  82.   (11.2) INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
  83.   (11.3) USING C-KERMIT WITH TERM
  84.   (12) SECURITY
  85.   (13) MISCELLANEOUS USER REPORTS
  86.   (14) THIRD-PARTY DRIVERS
  87.  
  88.  
  89. (0) DOCUMENTATION AND TECHNICAL SUPPORT
  90.  
  91. (0.1) THE C-KERMIT USER MANUAL
  92.  
  93. C-Kermit is documented in the book "Using C-Kermit" by Frank da Cruz and
  94. Christine M. Gianone, Digital Press, Burlington, MA, USA, ISBN 1-55558-164-1.
  95. Price: US $44.95.  To order, call Columbia University, New York City, at
  96. +1 (212) 854-3703, or Digital Press / Butterworth-Heinemann at:
  97.  
  98.   +1 800 366-2665  (Massachusetts office for USA & Canada)
  99.   +441 1993 414414 (Rushden, England office for Europe)
  100.   +61 2 372-5511   (Chatswood, NSW, office for Australia & New Zealand)
  101.   +65 220-3684     (Singapore office for Asia)
  102.  
  103. Or visit the Kermit website at http://www.columbia.edu/kermit/.
  104.  
  105. A German edition is available from Verlag Heinz Heise in Hannover, Germany,
  106. Tel. +49 (05 11) 53 52-0, Fax. +49 (05 11) 53 52-1 29.
  107.  
  108. If you do not have the manual, please purchase it.  It explains how to use
  109. C-Kermit, from getting started through advanced use and scripting, and sales
  110. of the manual are the primary source of funding for C-Kermit development and
  111. support.
  112.  
  113. New features added since "Using C-Kermit", 2nd Ed, was published are
  114. documented in the ckermit2.txt file, which should be used as a supplement to
  115. the manual until the 3rd edition is published.
  116.  
  117. (0.2) TECHNICAL SUPPORT
  118.  
  119. Please consult the manual, plus the ckcbwr.txt file and this file itself,
  120. before submitting questions, reporting problems, etc, to:
  121.  
  122.   E-Mail: kermit-support@columbia.edu
  123.  
  124.     Web:  http://www.columbia.edu/kermit/support.html
  125.  
  126.     News: comp.protocols.kermit.misc
  127.  
  128.     Post: The Kermit Project
  129.           Columbia University
  130.           612 West 115th Street
  131.           New York NY  10025-7799
  132.           USA
  133.  
  134.     Fax: +1 212 663-8202
  135.  
  136. Telephone support is also available:
  137.  
  138.   +1 212 854-5126, cost: $25.00 per call, payable via Visa or MC.
  139.  
  140. (0.3) THE YEAR 2000
  141.  
  142. The UNIX version of C-Kermit, release 6.0 and later, is "Year 2000 compliant",
  143. but only if the underlying operating system is too.  Contact your UNIX
  144. operating system vendor to find out which operating system versions, patches,
  145. hardware, and/or updates are required.
  146.  
  147. As of C-Kermit 6.0, post-millenium file dates are recognized, transmitted,
  148. received, and reproduced correctly during the file transfer process in
  149. C-Kermit's File Attribute packets.  If post-millenium dates are not processed
  150. correctly on the other end, file transfer will still take place, but the
  151. modification or creation date of the received file might be incorrect.  The
  152. only exception would be if the "file collision update" feature is being used
  153. to prevent unnecessary transfer of files that have not changed since the last
  154. time a transfer took place; in this case, a file might be transferred
  155. unnecessarily, or it might not be transferred when it should have been.
  156. Correct operation of the update feature depends on both Kermit programs having
  157. the correct date and time.
  158.  
  159. Of secondary importance are the time stamps in the transaction and/or debug
  160. logs, and the date-related script programming constructs, such as \v(date),
  161. \v(ndate), \v(day), \v(nday), and perhaps also the time-related ones, \v(time)
  162. and \v(ntime), insofar as they might be affected by the date.  The \v(ndate)
  163. is a numeric-format date of the form yyyymmdd, suitable for both lexical and
  164. numeric comparison and sorting: e.g. 19970208 or 20011231.  If the underlying
  165. operating system returns the correct date information, these variables will
  166. have the proper values.  If not, then scripts that make decisions based on
  167. these variables might not operate correctly.
  168.  
  169. Most date-related code is based upon the C Library asctime() string, which
  170. always has a four-digit year.  In UNIX, the one bit of code in C-Kermit that
  171. is an exception to this rule is several calls to localtime(), which returns a
  172. pointer to a tm struct, in which the year is presumed to be expressed as
  173. "years since 1900".  The code depends on this assumption.  Any platforms that
  174. violate it will need special coding.  As of this writing, no such platforms
  175. are known.
  176.  
  177. Command and script programming functions that deal with dates use C-Kermit
  178. specific code that always uses full years.
  179.  
  180. (0.4) THE EURO SYMBOL
  181.  
  182. C-Kermit 7.0 and later support Unicode (ISO 10646), ISO 8859-15 Latin Alphabet
  183. 9, PC Code Page 858, Windows Code Pages 1250 and 1251, and perhaps other
  184. character sets, that encode the Euro symbol, and can translate among them
  185. as long as no intermediate character-set is involved that does not include
  186. the Euro.
  187.  
  188.  
  189. (1) IMPORTANT FILES
  190.  
  191. In addition to the published documentation, the following files are useful
  192. in troubleshooting:
  193.  
  194.     ckaaaa.txt:     Overview, file naming conventions, list of files, etc.
  195.     ckuins.txt:     Installation instructions for UNIX C-Kermit.
  196.     ckccfg.txt:     C-Kermit program configuration information.
  197.     ckcbwr.txt:     C-Kermit "beware file" for all platforms.
  198.     ckubwr.txt:     C-Kermit "beware file" for UNIX (this file).
  199.     ckcplm.txt:     C-Kermit program logic manual.
  200.     ckermit2.txt:   User documentation for features added since 6.0.192, and
  201.                     since the 2nd Edition of "Using C-Kermit" was published.
  202.     ckcXXX.txt:     Program edit history for edit XXX, e.g. ckc196.txt.
  203.     ckuker.mak:     (or makefile) Makefile for UNIX C-Kermit.
  204.     ck[cuw]*.[chw]: Source code for UNIX C-Kermit.
  205.  
  206. Note that all of the *.txt files are renamed from their pre-7.0 names due
  207. to Microsoft's usurpation of traditional text filetypes like .hlp and .doc
  208. for its own purposes.
  209.  
  210.  
  211. (2) BINARIES
  212.  
  213. It is often dangerous to run a binary C-Kermit (or any other) program built
  214. on a different computer.  Particularly if that computer had a different C
  215. compiler, libraries, operating system version, processor features, etc, and
  216. especially if the program was built with shared libraries, because as soon as
  217. you update the libraries on your system, they no longer match the ones
  218. referenced in the binary, and the binary refuses to load when you run it,
  219. in which case you'll see error messages similar to:
  220.  
  221.   Could not load program kermit
  222.   Member shr4.o not found or file not an archive
  223.   Could not load library libcurses.a[shr4.o]
  224.   Error was: No such file or directory
  225.  
  226. (These samples are from AIX.)  To avoid this problem, we try to build C-Kermit
  227. with statically linked libraries whenever we can, but many of the binaries are
  228. contributed from elsewhere (after all, we don't have several hundred different
  229. machines in-house to build them on), and in any case some platforms do not
  230. even offer the option of static linking.
  231.  
  232. It is often OK to run a binary built on an earlier OS version, but it is
  233. rarely possible (or safe) to run a binary built on a later one, for example
  234. to run a binary built under SunOS 4.1.2 on a SunOS 4.1.1 system.  Sometimes
  235. even the system-or-library patch/ECO level makes a difference.
  236.  
  237. A particularly insidious problem occurs when a binary was built on a version
  238. of the OS that has patches from the vendor (e.g. to libraries); in most cases
  239. you won't be able to run such a binary on an unpatched version of the same
  240. platform.
  241.  
  242. When in doubt, build C-Kermit from the source code on the system where it is
  243. to be run (if possible!).  If not, ask us for a binary specific to your
  244. configuration.  We might have one, and if we don't, we might be able to find
  245. somebody who will build one for you.
  246.  
  247.  
  248. (3) NOTES ON SPECIFIC UNIX VERSIONS
  249.  
  250. The following sections apply to specific UNIX versions.
  251.  
  252. One thread that runs through many of them, and implicitly perhaps through all,
  253. concerns the problems that occur when trying to dial out on a serial device
  254. that is (also) enabled for dialing in.  The "solutions" to this problem are
  255. many, varied, diverse, and usually gross, involving configuring the device for
  256. bidirectional use.  This is done in a highly system-dependent and often
  257. obscure manner, and the effects (good or evil) are also highly system-
  258. dependent.  Many examples are given in the system-specific sections below.
  259.  
  260. An important point to keep in mind is that C-Kermit is a CROSS-PLATFORM,
  261. PORTABLE program.  It was not designed specifically and only for your
  262. particular UNIX version, or for that matter, for UNIX in particular at all.
  263. It also runs on VMS, AOS/VS, VOS, and many other non-UNIX platforms.  All
  264. the UNIX versions of C-Kermit share common i/o modules, with compile-time
  265. #ifdef constructions used to account for the differences among the many UNIX
  266. products and releases.  If you think that C-Kermit is behaving badly, or
  267. missing something, on your particular UNIX version, you might be right -- we
  268. can't claim to be expert in 700+ different platforms.  If you're a programmer,
  269. take a look at the source code and send us your suggested fixes or changes.
  270. Or else just send us a report about what seems to be wrong (see the TECHNICAL
  271. SUPPORT section above for details).
  272.  
  273. (3.0) C-KERMIT ON PC-BASED UNIXES
  274.  
  275. PCs are not the best platform for real operating systems like UNIX.  The
  276. architecture suffers from numerous deficiencies, not the least of which is the
  277. stiflingly small number of hardware interrupts (either 7 or 15, most of which
  278. are preallocated).  Thus adding devices, using multiple serial ports, etc, is
  279. always a challenge and usually a nightmare.  The free-for-all nature of the PC
  280. market and the lack of standards combined with the diversity of UNIX OS
  281. versions makes it difficult to find drivers for any particular device on any
  282. particular version of UNIX.
  283.  
  284. Of special interest to Kermit users is the fact that there is no standard
  285. provision in the PC architecture for more than 2 communication (serial) ports.
  286. COM3 and COM4 (or higher) will not work unless you (a) find out the hardware
  287. address and interrupt for each, (b) find out how to provide your UNIX version
  288. with this information, and (c) actually set up the configuration in the UNIX
  289. startup files (or whatever other method is used).  Watch out for interrupt
  290. conflicts, and don't expect to be able to use more than two serial ports at
  291. the same time.
  292.  
  293. Here is a typical tale from a Linux user (Fred Smith) about installing a third
  294. serial port: "...problems can come from a number of causes. The one I fought
  295. with for some time, and finally conquered, was that my modem is on an add-in
  296. serial port, cua3/IRQ5.  By default IRQ5 has a very low priority, and does not
  297. get enough service in times when the system is busy to prevent losing
  298. data. This in turn causes many resends. There are two 'fixes' that I know of,
  299. one is to relax hard disk interrupt hogging by using the correct parameter to
  300. hdparm, but I don't like that one because the hdparm man page indicates it is
  301. risky to use. The other one, the one I used, was to get 'irqtune' and use it
  302. to give IRQ5 the highest priority instead of nearly the lowest. Completely
  303. cured the problem."
  304.  
  305. To complicate matters, the PC platform is becoming increasingly and inexorably
  306. Windows-oriented.  More and more add-on devices are "Windows only" -- meaning
  307. they are incomplete and rely on proprietary Windows-based software drivers to
  308. do the jobs that you would expect the device itself to do.  PCMCIA or
  309. "Plug-n-Play" devices are rarely supported on PC-based UNIX versions such as
  310. SCO; Winmodems, Winprinters, and the like are not supported at all on any UNIX
  311. to our knowledge (except Lucent has released a Linux-only driver for one of
  312. its PCI "software" modems).  The self-proclaimed Microsoft PC 97 (or later)
  313. standard will probably only make matters worse since its only purpose to
  314. ensure that PCs are "optimized to run Windows 95 and Windows NT 4.0 and future
  315. versions of these operating systems".
  316.  
  317. With the exception noted (the Lucent modem), drivers for "Win" devices are
  318. available only for Windows, since the Windows market dwarfs that of any
  319. particular UNIX brand, and for that matter all UNIXes (or for that matter, all
  320. non-Windows operating systems) combined.  If your version of UNIX (SCO, Linux,
  321. BSDI, FreeBSD, etc) does not support a particular device, then C-Kermit can't
  322. use it either.  C-Kermit, like any UNIX application, must access all devices
  323. through drivers and not directly.
  324.  
  325. Don't waste time thinking that you, or anybody else, could write a Linux (or
  326. other UNIX) driver for a Winmodem or other "Win" device.  First of all, these
  327. devices generally require realtime control, but since UNIX (unlike Windows) is
  328. a true multitasking system, realtime device control is not possible outside
  329. the kernel.  Second, the specifications for these devices are secret and
  330. proprietary, and each one (and each version of each one) is potentially
  331. different.  Third, a Winmodem driver would be enormously complex; it would
  332. take years to write and debug, by which time it would be obsolete.
  333.  
  334. Before you buy a new PC or add-on equipment, especially serial ports, internal
  335. modems, or printers, make sure they are compatible with your version of UNIX.
  336. This is becoming an ever-greater challenge; only a huge company like Microsoft
  337. can afford to be constantly cranking out and/or verifying drivers for the
  338. thousands of video boards, sound cards, network adapters, SCSI adapters,
  339. buses, etc, that spew forth in an uncontrolled manner from all corners of the
  340. world on a daily basis.  With very few exceptions, makers of PCs assemble the
  341. various components and then verify them only with Windows, which they must do
  342. since they are, no doubt, preloading the PC with Windows.  To find a modern PC
  343. that is capable of running a variety of non-Windows operating systems
  344. (e.g. Linux, SCO OpenServer, Unixware, and Solaris) is a formidable challenge
  345. requiring careful study of each vendor's "compatibility lists" and precise
  346. attention to exact component model numbers and revision levels.
  347.  
  348. Modems: External modems are recommended.  Internal PC modems (even when they
  349. are not Winmodems, which is increasingly unlikely in new PCs) are always
  350. trouble, especially in UNIX.  Even when they work for dialing out, they might
  351. not work for dialing in, etc.  Problems that occur when using an internal
  352. modem can almost always be eliminated by switching to an external one.  Even
  353. when an internal modem is not a Winmodem or Plug-n-Play, it is often a no-name
  354. model of unknown quality -- not the sort of thing you want sitting directly on
  355. your computer's bus.  (Even if it does not cause hardware problems, it
  356. probably came without a command list, so no UNIX software will know how to
  357. control it.)  For more about UNIX compatible modems, see:
  358.  
  359.   http://www.o2.net/~gromitkc/winmodem.html
  360.  
  361. Multiple modems: Remember that PCs, even now -- 2 decades after the PC was
  362. first introduced -- are not (in general) capable of supporting more than 2
  363. serial devices.  Here's a short success story from a recent newsgroup posting:
  364. "I have a Diamond SupraSonic II dual modem in my machine. What I had to end up
  365. doing is buying a PS/2 mouse and port and install it. Had to get rid of my
  366. serial mouse. I also had to disable PnP in my computer bios. I was having IRQ
  367. conflicts between my serial mouse and "com 3". Both modems work fine for me.
  368. My first modem is ttyS0 and my second is ttyS1."  Special third-party
  369. multiport boards such as DigiBoard are available for certain UNIX platforms
  370. (typically SCO, maybe Linux) that come with special platform-specific drivers.
  371.  
  372. Character sets: PCs generally have PC code pages such as CP437 or CP850, and
  373. these are often used by PC-based UNIX operating systems, particularly on the
  374. console.  These are supported directly by C-Kermit's SET FILE CHARACTER-SET
  375. and SET TERMINAL CHARACTER-SET commands.  Some PC-based UNIX versions, such as
  376. recent Red Hat Linux releases, might also support Microsoft Windows code pages
  377. such as CP1252, or even Latin Alphabet 1 itself (perhaps displayed with CP437
  378. glyphs).
  379.  
  380. Certain Windows code pages are not supported directly by C-Kermit, but since
  381. they are ISO Latin Alphabets with nonstandard "extensions" in the C1 control
  382. range, you can substitute the corresponding Latin alphabet (or other character
  383. set) in any C-Kermit character-set related commands:
  384.  
  385.   Windows Code Page    Substitution
  386.    CP 1004              Latin-1
  387.    CP 1051              HP Roman-8
  388.  
  389. Other Windows code pages are mostly (or totally) incompatible with their
  390. Latin Alphabet counterparts (e.g. CP1250 and Latin-2), but several of these
  391. are supported by C-Kermit 7.0 (1250, 1251, and 1252).
  392.  
  393. Finally, note that as a real operating system, UNIX (unlike Windows) does not
  394. provide the intimate connection to the PC keyboard, screen, and mouse that you
  395. might expect.  UNIX applications can not "see" the keyboard, and therefore can
  396. not be programmed to understand F-keys, Editing keys, Alt-key combinations,
  397. and the like.  This is because (a) UNIX is a portable operating system, not
  398. only for PCs; and (b) UNIX sessions can come from anywhere, not just the PC's
  399. keyboard and screen.
  400.  
  401. (3.1) C-KERMIT AND AIX
  402.  
  403. For additional information see the AIX FAQ:
  404.  
  405.   http://www.emerson.emory.edu/services/aix-faq/
  406.   http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html
  407.   http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top.html
  408.   http://aixpdslib.seas.ucla.edu/
  409.   ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1
  410.   ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/aix
  411.  
  412. and/or read the comp.unix.aix newsgroup.
  413.  
  414. C-Kermit won't be able to "set line /dev/tty0" (or any other dialout device)
  415. if you haven't installed "cu" or "uucp" on your system, because installing
  416. these is what creates the UUCP lockfile directory.  If SET LINE commands
  417. always result in "Sorry, access to lock denied", even when C-Kermit has been
  418. given the same owner, group, and permissions as cu:
  419.  
  420.   -r-sr-xr-x   1 uucp     uucp       67216 Jul 27 1999  cu
  421.  
  422. and even when you run it as root, then you must go back and install "cu" from
  423. your AIX installation media.
  424.  
  425. Streaming transfers into AIX 4.2 or 4.3 (through the AIX Telnet server) have
  426. been observed to fail, when exactly the same kind of transfers into AIX 4.1
  427. work without incident.  The error reported by AIX is "interrupted system
  428. call".  Streaming transfers work perfectly, however, if the AIX Telnet server
  429. is removed from the picture (e.g, by using "set host * 3000" on AIX, or by
  430. using Rlogin instead of Telnet).  They also work perfectly if the Telnet
  431. connection is forced into binary mode (C-Kermit command "set telopt requested
  432. requested").  In case of file-transfer failure on a Telnet connection to AIX
  433. 4.2 or 4.3, tell AIX C-Kermit to "set streaming off" and/or tell the file
  434. sender to prefix all control characters ("set prefixing all").  Also be sure
  435. that the AIX C-Kermit on the remote end has "set flow none" (which is the
  436. default).
  437.  
  438. About AIX version numbers:  "uname -a" tells the two-digit version number,
  439. such as 3.2 or 4.1.  The three-digit form can be seen with the "oslevel"
  440. command (this information is unavailable at the API level and is reportedly
  441. obtained by scanning the installed patch list).  Supposedly all three-digit
  442. versions within the same two-digit version (e.g. 4.3.1, 4.3.2) are binary
  443. compatible; i.e. a binary built on any one of them should run on all others,
  444. but this is not verified.
  445.  
  446. IMPORTANT: Do NOT try to run AIX 3.x C-Kermit binaries on AIX 4.x (or vice
  447. versa).  Obtain -- or build -- the C-Kermit binary that is appropriate for
  448. your AIX version.  In general, it is always better to build from source code.
  449.  
  450. According to IBM's "From Strength to Strength" document (21 April 1998),
  451. in AIX 4.2 and later "Async supports speeds on native serial ports up to
  452. 115.2kbps".  However, no API is documented to achieve serial speeds higher
  453. than 38400 bps.  Apparently the way to do this -- which might or might not
  454. work only on the IBM 128-port multiplexer -- is:
  455.  
  456.   cxma-stty fastbaud /dev/tty0
  457.  
  458. which, according to "man cxma-stty":
  459.  
  460.   fastbaud Alters the baud rate table, so 50 baud becomes 57600 baud.
  461.   -fastbaud Restores the baud rate table, so 57600 baud becomes 50 baud.
  462.  
  463. Presumably (but not certainly) this extrapolates to 110 "baud" becomes
  464. 76800 bps, and 150 becomes 115200 bps.  So to use high serial speeds in AIX
  465. 4.2 or 4.3, the trick would be to give the "cxma-stty fastbaud" command for
  466. the desired tty device before starting Kermit, and then use "set speed 50",
  467. "set speed 110", or "set speed 150" to select 56700, 76800, or 115200 bps.
  468. It is not known whether cxma-stty requires privilege.
  469.  
  470. According to one report, "Further investigation with IBM seems to indicate
  471. that the only hardware capable of doing this is the 128-port multiplexor with
  472. one (or more) of the 16 port breakout cables (Enhanced Remote Async Node
  473. 16-Port EIA-232). We are looking at about CDN$4,000 in hardware just to hang a
  474. 56kb modem on there. Of course, we can then hang 15 more, if we want. This
  475. hardware combo is described to be good to 230.4kbps."
  476.  
  477. Another report says (quote from AIX newsgroup, March 1999):
  478.  
  479.   The machine type and the adapter determine the speed that one can actually
  480.   run at.  The older microchannel machines have much slower crystal
  481.   frequencies and may not go beyond 76,800.  A feature put into AIX 421
  482.   allows one to key in non-POSIX baud rates and if the uart can support that
  483.   speed, it will get set. this applies also to 43p's and beyond.  115200 is
  484.   the max for the 43P's native serial port.  As crytal frequencies continue
  485.   to increase, the built-in serial ports speeds will improve.  To use 'uucp'
  486.   or 'ate' at the higher baud rates, configure the port for the desired
  487.   speed, but set the speed of uucp or ate to 50.  Any non-POSIX speeds set
  488.   in the ttys configuration will the be used.  In the case of the 128-port
  489.   adapters or the ISA 8-port or PCI 8-port adapter, there are only a few
  490.   higher baud rates.
  491.  
  492.    a. Change the port  to enable high baud rates:
  493.  
  494.       B50 for 57600
  495.       B75 for 76800
  496.       B110 for 115200
  497.       B200 for 230000
  498.  
  499.    b. chdev -l ttyX -a fastbaud=enable
  500.  
  501.   For the 128 ports original style rans, only 57600 bps is supported.
  502.   For the new enhanced RANs, up to 230Kbps is supported.
  503.  
  504. (end quote)
  505.  
  506. Note that some RS/6000s (e.g. the IBM PowerServer 320) have nonstandard
  507. rectangular 10-pin serial ports; the DB-25 connector is NOT a serial port;
  508. it is a parallel printer port.  IBM cables are required for the serial ports,
  509. (The IBM RT PC also had rectangular serial ports -- perhaps the same as these,
  510. perhaps different.)
  511.  
  512. If you dial in to AIX through a modem that is connected directly to an AIX
  513. port (e.g. on the 128-port multiplexer) and find that data is lost, especially
  514. when uploading files to the AIX system (and system error logs report buffer
  515. overruns on the port):
  516.  
  517.  1. Make sure the port and modem are BOTH configured for hardware (RTS/CTS)
  518.     flow control.  The port is configured somewhere in the system
  519.     configuration, outside of Kermit.
  520.  
  521.  2. Tell C-Kermit to "set flow keep"; experimentation shows that SET FLOW
  522.     RTS/CTS has no effect when used in remote mode (i.e. on /dev/tty, as
  523.     opposed to a specify port device).
  524.  
  525. Several people have reported that C-Kermit (version unspecified) causes
  526. AIX 4.2 (or later) to "freeze" or "hang" or "halt".  No further details are
  527. known at this time.  However:
  528.  
  529.  1. No user-mode application should ever be able to make AIX or any other
  530.     version of UNIX freeze, hang, or halt; if it does, this indicates a
  531.     serious bug in AIX, which should be reported immediately to IBM.
  532.  
  533.  2. Fixes for bugs in the original AIX 4.2 tty (serial i/o) support
  534.     and other AIX bugs are available from IBM at:
  535.  
  536.       http://service.software.ibm.com/rs6000/
  537.  
  538.     Downloads -> Software Fixes -> Download FixDist gets an application
  539.     for looking up known problems.
  540.  
  541. Other people have reported that after upgrading AIX from 4.1 to 4.2, the "ttys
  542. hang" when they try to use Kermit.  Again, so far no further details are
  543. available.  However, others report that C-Kermit 6.0 works fine on both AIX
  544. 4.2 and 4.3 if it is rebuilt from source code.  Still others report that the
  545. original C-Kermit 6.0 binaries, built under AIX 4.1, work perfectly in AIX
  546. 4.2 and 4.3.
  547.  
  548. More recently, people have reported various kinds of problems running a
  549. C-Kermit binary built under AIX 4.1 or 4.2 on AIX 4.3.  There has been some
  550. speculation on the newsgroups about a new round binary incompatibility between
  551. AIX 4.3 and earlier versions -- some even suggest renumbered syscalls, but
  552. that seems unlikely.  Example: a user in Germany reported that the C-Kermit
  553. 6.0 AIX 4.1 binary would crash during file transfer when run on AIX 4.2, but
  554. the problems disappeared when running a binary that was built on AIX 4.2.
  555.  
  556. C-Kermit 6.0.192 and earlier were built by default without "BIGBUFOK" defined
  557. for AIX, and this limits the maximum size of macros, etc.  In particular, it
  558. affects the alphanumeric page macro (TAPMSG) distributed with C-Kermit 6.0.
  559. BIGBUFOK should be defined, and it is in C-Kermit 6.1 and later.  In the
  560. meantime use:
  561.  
  562.   make clean ; make aix???  KFLAGS=-DBIGBUFOK
  563.  
  564. Reportedly, telnet from AIX 4.1-point-something to non-Telnet ports does not
  565. work unless the port number is in the /etc/services file; it's not clear from
  566. the report whether this is a problem with AIX Telnet (in which case it would
  567. not affect Kermit), or with the sockets library (in which case it would).  The
  568. purported fix is IBM APAR IX61523.
  569.  
  570. Many problems reported with bidirectional terminal lines on AIX 3.2.x on the
  571. RS/6000.  Workaround: don't use bidirectional terminal lines, or write a
  572. shell-script wrapper for Kermit that turns getty off on the line before
  573. starting Kermit, or before Kermit attempts to do the SET LINE.  (But note:
  574. These problems MIGHT be fixed in C-Kermit 6.0 and later.)  The commands for
  575. turning getty off and on (respectively) are /usr/sbin/pdisable and
  576. /usr/sbin/penable.
  577.  
  578. Reportedly, all versions of IBM AIX use the same (undocumented) lockfile
  579. conventions as RTAIX.  If this is true, the "makes" for PS/2 AIX and AIX/370
  580. will have to be changed to use the RTAIX convention (it may be sufficient to
  581. simply add -DRTAIX to the make entry).  This should not be an issue in
  582. C-Kermit 7.0 or later, which now calls the AIX ttlock() family of library
  583. functions to create, check, and remove lockfiles.  (But it is not known
  584. which versions of AIX prior to 4.1 have working ttlock() functions; for
  585. example, the functions are present in AIX 3.2 but do not seem to work).
  586.  
  587. C-Kermit SET HOST or TELNET from one AIX 3.1 (or earlier) system to another
  588. won't work right unless you set your local terminal type to something other
  589. than AIXTERM.  When your terminal type is AIXTERM, AIX TELNET sends two
  590. escapes whenever you type one, and the AIX telnet server swallows one of them.
  591. This has something to do with the "hft" device.  This behavior seems to be
  592. removed in AIX 3.2 and later.
  593.  
  594. Transfer of binary -- and maybe even text -- files can fail on AIX 3.x.  The
  595. problem was traced to a facility in AIX whereby a particular port can have
  596. character-set translation done for it by the tty driver.  The following
  597. advice from a knowledgeable AIX user:
  598.  
  599.   (begin quote...)  [This feature] has to be checked (and set/cleared) with
  600.   a separate command, unfortunately stty doesn't handle this.  To check:
  601.  
  602.     $ setmaps
  603.     input map: none installed
  604.     output map: none installed
  605.  
  606.   If it says anything other than "none installed" for either one, it is likely
  607.   to cause a problem with kermit.  To get rid of installed maps:
  608.  
  609.     $ setmaps -t NOMAP
  610.  
  611.   However, I seem to recall that with some versions of AIX before 3.2.5, only
  612.   root could change the setting.  I'm not sure what versions - it might have
  613.   only been under AIX 3.1 that this was true.  At least with AIX 3.2.5 an
  614.   ordinary user can set or clear the maps.  (...end quote) And this would
  615.   imply that Kermit itself cannot be coded to take care of this, because it
  616.   would have to run as root.  On the same problem, another knowledgeable AIX
  617.   user says:
  618.  
  619.   The way to get information on the NLS mapping under AIX (3.2.5 anyway) is
  620.   as follows.  From the command line type:
  621.  
  622.     lsattr -l tty# -a imap -a omap -E -H
  623.  
  624.   Replace the tty number for the number sign above. This will give a human
  625.   readable output of the settings that looks like this;
  626.  
  627.     # lsattr -l tty2 -a imap -a omap -E -H
  628.     attribute value description     user_settable
  629.  
  630.     imap      none  INPUT map file  True
  631.     omap      none  OUTPUT map file True
  632.  
  633.   If you change the -H to a -O, you get output that can easily be processed
  634.   by another program or a shell script, for example:
  635.  
  636.     # lsattr -l tty2 -a imap -a omap -E -O
  637.     #imap:omap
  638.     none:none
  639.  
  640.   To change the settings from the command line, the chdev command is used
  641.   with the following syntax.
  642.  
  643.     chdev -l tty# -a imap='none' -a omap='none'
  644.  
  645.   Again substituting the appropriate tty port number for the number sign,
  646.   "none" being the value we want for C-Kermit.  Of course, the above can also
  647.   be changed by using the SMIT utility and selecting devices - tty.
  648.   (...end quote)
  649.  
  650. About AIX versions and hardware platforms (from the AIX FAQ):
  651.  
  652.   If you are using IBM's xlc (cc) compiler, the default is to use the common
  653.   instruction set, so the same binary will run on both RS/6000 and PowerPC.
  654.  
  655.   The option -mcpu=common makes GCC use the common instruction set.  Please
  656.   note that (unlike xlc) this is *not* the default with GCC on AIX.
  657.  
  658. A couple of other gotcha's:
  659.  
  660.   Use shared libraries.  The C runtime can and does change as IBM introduces
  661.   patches.  Also this avoids "Netscape syndrome."  They bound AIX 3 libraries
  662.   into their browser.  Although AIX 3 binaries will run on AIX 4, the AIX 3
  663.   libraries aren't totally compatible.
  664.  
  665.   AIX 4.2 changed the C runtime radically.  AIX 4.2 binaries won't run on AIX
  666.   4.1 or 3.anything.  AIX 3 binaries run on AIX 4.1 and AIX 4.2.
  667.  
  668. Of course, the moment you take any of this as gospel,  you'll get into big
  669. trouble, but my own experience has pretty much jibed with the above.
  670.  
  671. (end quote)
  672.  
  673. "Is AIX Year 2000 Compliant?"  According to a comp.unix.aix newsgroup posting
  674. from IBM Austin, version 4.2 is; earlier versions such as 4.1.x and 3.2.5
  675. require PTFs (which, as of Jan 1997, have not yet been issued).
  676.  
  677. Here is a sample configuration for setting up an xterm keyboard for VT220 or
  678. higher terminal emulation on AIX, courtesy of Bruce Momjian, Drexel Hill, PA.
  679. Xterm can be started like this:
  680.  
  681. xterm $XTERMFLAGS +rw +sb +ls $@ -tm 'erase ^? intr ^c' -name vt220 \
  682.         -title vt220 -tn xterm-220 "$@" &
  683.  
  684. ---------------------------------------------------------------------------
  685. XTerm*VT100.Translations: #override \n\
  686.     <Key>Home: string(0x1b) string("[3~") \n \
  687.     <Key>End: string(0x1b) string("[4~") \n
  688. vt220*VT100.Translations: #override \n\
  689. Shift    <Key>F1: string("~") \n \
  690. Shift    <Key>F2: string("~") \n \
  691. Shift    <Key>F3: string("~") \n \
  692. Shift     <Key>F4: string("~") \n \
  693. Shift    <Key>F5: string("~") \n \
  694. Shift    <Key>F6: string("~") \n \
  695. Shift    <Key>F7: string("~") \n \
  696. Shift    <Key>F8: string("~") \n \
  697. Shift    <Key>F9: string("~") \n \
  698. Shift    <Key>F10: string("~") \n \
  699. Shift    <Key>F11: string("~") \n \
  700. Shift    <Key>F12: string("~") \n \
  701.     <Key>Print: string(0x1b) string("[32~") \n\
  702.     <Key>Cancel: string(0x1b) string("[33~") \n\
  703.     <Key>Pause: string(0x1b) string("[34~") \n\
  704.     <Key>Insert: string(0x1b) string("[2~") \n\
  705.     <Key>Delete: string(0x1b) string("[3~") \n\
  706.     <Key>Home: string(0x1b) string("[1~") \n\
  707.     <Key>End: string(0x1b) string("[4~") \n\
  708.     <Key>Prior: string(0x1b) string("[5~") \n\
  709.     <Key>Next: string(0x1b) string("[6~") \n\
  710.     <Key>BackSpace: string(0x7f) \n\
  711.     <Key>Num_Lock: string(0x1b) string("OP") \n\
  712.     <Key>KP_Divide: string(0x1b) string("Ol") \n\
  713.     <Key>KP_Multiply: string(0x1b) string("Om") \n\
  714.     <Key>KP_Subtract: string(0x1b) string("OS") \n\
  715.     <Key>KP_Add: string(0x1b) string("OM") \n\
  716.     <Key>KP_Enter: string(0x1b) string("OM") \n\
  717.     <Key>KP_Decimal: string(0x1b) string("On") \n\
  718.     <Key>KP_0: string(0x1b) string("Op") \n\
  719.     <Key>KP_1: string(0x1b) string("Oq") \n\
  720.     <Key>KP_2: string(0x1b) string("Or") \n\
  721.     <Key>KP_3: string(0x1b) string("Os") \n\
  722.     <Key>KP_4: string(0x1b) string("Ot") \n\
  723.     <Key>KP_5: string(0x1b) string("Ou") \n\
  724.     <Key>KP_6: string(0x1b) string("Ov") \n\
  725.     <Key>KP_7: string(0x1b) string("Ow") \n\
  726.     <Key>KP_8: string(0x1b) string("Ox") \n\
  727.     <Key>KP_9: string(0x1b) string("Oy") \n
  728.  
  729. !    <Key>Up: string(0x1b) string("[A") \n\
  730. !    <Key>Down: string(0x1b) string("[B") \n\
  731. !    <Key>Right: string(0x1b) string("[C") \n\
  732. !    <Key>Left: string(0x1b) string("[D") \n\
  733.  
  734. *visualBell:    true
  735. *saveLines:    1000
  736. *cursesemul:    true
  737. *scrollKey:    true
  738. *scrollBar:    true
  739.  
  740. (3.2) C-KERMIT AND HP-UX
  741.  
  742. For further information, read the comp.sys.hp.hpux newsgroup.
  743.  
  744. 3.2.0. Common Problems
  745.  
  746. The following sequence:
  747.  
  748.   set line /dev/cua0p0 ; or other device
  749.   set speed 19200      ; or other normal speed
  750.  
  751. produces the message "?Unsupported line speed".  This means the port is not
  752. configured for dialout.  Go into SAM and configure the port for dialout.
  753.  
  754. Some HP workstations have a BREAK/RESET key.  If you hit this key while
  755. C-Kermit is running, it might kill or suspend the C-Kermit process.  C-Kermit
  756. arms itself against these signals, but evidently the BREAK/RESET key is -- at
  757. least in some circumstances, on certain HP-UX versions -- too powerful to be
  758. caught.  (Some report that the first BREAK/RESET shows up as SIGINT and is
  759. caught by C-Kermit's *former* SIGINT handler even when SIGINT is currently set
  760. to SIG_IGN; the second kills Kermit; other reports suggest the first
  761. BREAK/RESET sends a SIGTSTP (suspend) signal to Kermit, which it catches and
  762. suspends itself.)  You can tell C-Kermit to ignore suspend signals with SET
  763. SUSPEND OFF.  You can tell C-Kermit to ignore SIGINT with SET COMMAND
  764. INTERRUPTION OFF.  It is not known whether these commands also grant immunity
  765. to the BREAK/RESET key (one report states that with SET SUSPEND OFF, the
  766. BREAK/RESET key is ignored the first four times, but kills Kermit the 5th
  767. time).  In any case:
  768.  
  769.  1. If this key is mapped to SIGINT or SIGTSTP, C-Kermit catches or ignores
  770.     it, depending on which mode (CONNECT, command, etc) Kermit is in.
  771.  
  772.  2. If it causes HP-UX to kill C-Kermit, there is nothing C-Kermit can do to
  773.     prevent it.
  774.  
  775. When HP-UX is on the remote end of the connection, it is essential that HP-UX
  776. C-Kermit be configured for Xon/Xoff flow control (this is the default, but in
  777. case you change it and then experience file-transfer failures, this is a
  778. likely reason).
  779.  
  780. 3.2.1. Building C-Kermit on HP-UX
  781.  
  782. During the C-Kermit 6.0 Beta cycle, something happened to ckcpro.w (or, more
  783. precisely, the ckcpro.c file that is generated from it) which causes HP
  784. optimizing compilers under HP-UX versions 7.0 and 8.0 (apparently on all
  785. platforms) as well as under HP-UX 9.0 on Motorola platforms only, to blow up.
  786. In versions 6.1 and 7.0 the problem has spread to other modules.
  787.  
  788. The symptoms vary from the system grinding to a halt, to the compiler
  789. crashing, to the compilation of the ckcpro.c module taking very long periods
  790. of time, like 9 hours.  This problem is handled by compiling the modules
  791. that tickle it without optimization; the new C-Kermit makefile takes care of
  792. this, and shows how to do it in case the same thing begins happening with
  793. other modules.
  794.  
  795. On HP-UX 9.0, a kernel parameter, maxdsiz (maximum process data segment size),
  796. seems to be important.  On Motorola systems, it is 16MB by default, whereas on
  797. RISC systems the default is much bigger.  Increasing maxdsiz to about 80MB
  798. seems to make the problem go away, but only if the system also has a lot of
  799. physical memory -- otherwise it swaps itself to death.
  800.  
  801. The optimizing compiler might complain about "some optimizations skipped" on
  802. certain modules, due to lack of space available to the optimizer.  You can
  803. increase the space (the incantation depends on the particular compiler version
  804. -- see the makefile), but doing so tends to make the compilations take a much
  805. longer time.  For example, the "hpux100o+" makefile entry adds the "+Onolimit"
  806. compiler flag, and about an hour to the compile time on an HP-9000/730.  But
  807. it *does* produce an executable that is about 10K smaller :-)
  808.  
  809. In the C-Kermit 7.0 makefile, all HP-UX entries automatically skip
  810. optimization of problematic modules.
  811.  
  812. 3.2.2. Performance
  813.  
  814. An unexpected slowness has been noted when transferring files over local
  815. Ethernet connections when an HP-UX system (9.0 or later, perhaps also earlier
  816. versions) is on the remote end.   The following experiment was conducted to
  817. determine the cause.  C-Kermit 6.0 was used; the situation is slightly better
  818. using C-Kermit 7.0's streaming feature.
  819.  
  820. The systems were HP-UX 10.00 (on 715/33) and SunOS 4.1.3 (on Sparc-20), both
  821. on the same local 10Mbps Ethernet, packet length 4096, parity none, control
  822. prefixing "cautious", using only local disks on each machine -- no NFS.  In
  823. the C-Kermit 6.0 (ACK/NAK) case, the window size was 20; in the streaming case
  824. there is no window size.  The test file was C-Kermit executable, transferred
  825. in binary mode.  Conditions were relatively poor: the Sun and the local net
  826. heavily loaded; the HP system is old, slow, and memory-constrained.
  827.  
  828.                    C-Kermit 6.0...    C-Kermit 7.0...
  829.  Local    Remote   ACK/NAK........    Streaming......
  830.  Client   Server   Send    Receive    Send    Receive
  831.   Sun      HP       36       18        64       18
  832.   HP       HP       25       15        37       16
  833.   HP       Sun      77       83       118       92
  834.   Sun      Sun      60       60       153      158
  835.  
  836. So whenever HP is the remote we have poor performance.  Why?
  837.  
  838.  . Changing file display to CRT has no effect (so it's not the curses
  839.    library on the client side).
  840.  
  841.  . Changing TCP RECV-BUFFER or SEND-BUFFER has little effect.
  842.  
  843.  . Telling the client to make a binary-mode connection (SET TELNET BINARY
  844.    REQUESTED, which successfully negotiates a binary connection) has no
  845.    effect on throughput.
  846.  
  847. BUT...  If I start C-Kermit as a TCP server:
  848.  
  849.   set host * 3000
  850.   server
  851.  
  852. and then from the client "set host blah 3000", I get:
  853.  
  854.                    C-Kermit 6.0...    C-Kermit 7.0...
  855.  Local    Remote   ACK/NAK........    Streaming......
  856.  Client   Server   Send    Receive    Send    Receive
  857.   Sun      HP       77       67       106      139
  858.   HP       HP       50       50        64       62
  859.   HP       Sun      57       85       155      105
  860.   Sun      Sun      57       50       321      314
  861.  
  862. Therefore the HP-UX telnet server or pty driver seems to be adding more
  863. overhead than the SunOS one, and most others.  When going through this type of
  864. connection (a remote telnet server) there is little Kermit can do improve
  865. matters, since the telnet server and pty driver are between the two Kermits,
  866. and neither Kermit program can have any influence over them (except putting
  867. the Telnet connection in binary mode, but that doesn't help).
  868.  
  869. (The numbers for the HP-HP transfers are lower than the others since both
  870. Kermit processes are running on the same slow CPU.)
  871.  
  872. 3.2.3. Dialing Out and UUCP Lockfiles in HP-UX
  873.  
  874. Before you can use serial ports on the HP-9000, you must configure them as
  875. either "terminals" or "modems" with SAM ("peripheral devices"..."terminals and
  876. modems"), as described in the HP manual, "Configuring HP-UX for Peripherals:
  877. HP 9000".  If you attempt to use a serial device before it has been configured
  878. this way, it will not work properly; typical symptoms are (a) no communication
  879. at all; (b) nonfunctional modem signals; and/or (c) massive amounts of
  880. character loss in both directions.
  881.  
  882. In HP-UX 9.0, serial device names began to change.  The older names looked
  883. like "/dev/cua00", "/dev/tty01", etc (sometimes with only one digit).
  884. The newer names have two digits with the letter "p" in between.  HP-UX 8.xx
  885. and earlier have the older form, HP-UX 10.00 and later have the newer form.
  886. HP-UX 9.xx has the newer form on Series 800 machines, and the older form on
  887. other hardware models.  The situation is summarized in the following table:
  888.  
  889.   Converged HP-UX Serial I/O Filenames : TTY Mux Naming
  890.   ---------------------------------------------------------------------
  891.   General meaning      Old Form     S800 9.0           Convio 10.0
  892.   ---------------------------------------------------------------------
  893.   tty* hardwired ports  tty<YY>     tty<X>p<Y>         tty<D>p<p>
  894.                             diag:mux<X>        diag:mux<D>
  895.   ---------------------------------------------------------------------
  896.   ttyd* dial-in modems  ttyd<YY>    ttyd<X>p<Y>        ttyd<D>p<p>
  897.                             diag:ttyd<X>p<Y>   diag:ttyd<D>p<p>
  898.   ---------------------------------------------------------------------
  899.   cua* auto-dial out    cua<YY>     cua<X>p<Y>         cua<D>p<p>
  900.                             diag:cua<X>p<Y>
  901.   ---------------------------------------------------------------------
  902.   cul* dial-out         cul<YY>     cul<X>p<Y>         cul<D>p<p>
  903.                             diag:cul<X>p<Y>
  904.   ---------------------------------------------------------------------
  905.    <X>= LU (Logical Unit)  <D>= Devspec (decimal card instance)
  906.    <Y> or <YY> = Port      <p>= Port
  907.  
  908. For dialing out, you should use the cua or cul devices.  When C-Kermit's
  909. CARRIER setting is AUTO or ON, C-Kermit should pop back to its prompt
  910. automatically if the carrier signal drops, e.g. when you log out from the
  911. remote computer or service.  If you use the tty<D>p<d> (e.g. tty0p0) device,
  912. the carrier signal should be ignored.  The tty<D>p<d> device should be used
  913. for direct connections where the carrier signal does not follow RS-232
  914. conventions (use the cul device for hardwired connections through a true null
  915. modem).  Do not use the ttyd<D>p<d> device for dialing out.
  916.  
  917. Kermit's access to serial devices is controlled by "UUCP lockfiles", which are
  918. intended to prevent different users using different software programs (Kermit,
  919. cu, etc, and UUCP itself) from accessing the same serial device at the same
  920. time.  When a device is in use by a particular user, a file with a special
  921. name is created in:
  922.  
  923.   /var/spool/locks  (HP-UX 10.00 and later)
  924.   /usr/spool/uucp   (HP-UX 9.xx and earlier)
  925.  
  926. The file's name indicates the device that is in use, and its contents
  927. indicates the process ID (pid) of the process that is using the device.  Since
  928. serial devices and the locks directory are not both publicly readable and
  929. writable, Kermit and other communication software must be installed setuid to
  930. the owner (bin) of the serial device and setgid to the group (daemon) of the
  931. /var/spool/locks directory.  Kermit's setuid and setgid privileges are enabled
  932. only when opening the device and accessing the lockfiles.
  933.  
  934. Let's say "unit" means a string of decimal digits (the interface instance
  935. number) followed (in HP-UX 10.00 and later) by the letter "p" (lowercase),
  936. followed by another string of decimal digits (the port number on the
  937. interface), e.g.:
  938.  
  939.   "0p0", "0p1", "1p0", etc       (HP-UX 10.00 and later)
  940.   "0p0", "0p1", "1p0", etc       (HP-UX 9.xx on Series 800)
  941.   "00",  "01",  "10",  "0", etc  (HP-UX 9.xx not on Series 800)
  942.   "00",  "01",  "10",  "0", etc  (HP-UX 8.xx and earlier)
  943.  
  944. Then a normal serial device (driver) name consists of a prefix ("tty", "ttyd",
  945. "cua", "cul", or possibly "cuad" or "culd") followed by a unit, e.g. "cua0p0".
  946. Kermit's treatment of UUCP lockfiles is as close as possible to that of the
  947. HP-UX "cu" program.  Here is a table of the lockfiles that Kermit creates for
  948. unit 0p0:
  949.  
  950.   Selection      Lockfile 1     Lockfile 2
  951.   ------------   ------------   ------------
  952.   /dev/tty0p0    LCK..tty0p0    (none)
  953. * /dev/ttyd0p0   LCK..ttyd0p0   (none)
  954.   /dev/cua0p0    LCK..cua0p0    LCK..ttyd0p0
  955.   /dev/cul0p0    LCK..cul0p0    LCK..ttyd0p0
  956.   /dev/cuad0p0   LCK..cuad0p0   LCK..ttyd0p0
  957.   /dev/culd0p0   LCK..culd0p0   LCK..ttyd0p0
  958.   <other>        LCK..<other>   (none)
  959.  
  960. (* = Dialin device, should not be used.)
  961.  
  962. In other words, if the device name begins with "cu", a second lockfile for
  963. the "ttyd" device, same unit, is created, which should prevent dialin access
  964. on that device.
  965.  
  966. The <other> case allows for symbolic links, etc, but of course it is not
  967. foolproof since we have no way of telling which device is really being used.
  968.  
  969. When C-Kermit tries to open a dialout device whose name ends with a "unit", it
  970. searches the lockfile directory for all possible names for the same unit.  For
  971. example, if user selects /dev/cul2p3, Kermit looks for lockfiles named:
  972.  
  973.   LCK..tty2p3
  974.   LCK..ttyd2p3
  975.   LCK..cua2p3
  976.   LCK..cul2p3
  977.   LCK..cuad2p3
  978.   LCK..culd2p3
  979.  
  980. If any of these files are found, Kermit opens them to find out the ID (pid) of
  981. the process that created them; if the pid is still valid, the process is still
  982. active, and so the SET LINE command fails and the user is informed of the pid
  983. so s/he can use "ps" to find out who is using the device.
  984.  
  985. If the pid is not valid, the file is deleted.  If all such files (i.e. with
  986. same "unit" designation) are successfully removed, then the SET LINE command
  987. succeeds; up to six messages are printed telling the user which "stale
  988. lockfiles" are being removed.
  989.  
  990. When the "set line" command succeeds in HP-UX 10.00 and later, C-Kermit also
  991. creates a UNIX System V R4 "advisory lock" as a further precaution (but not
  992. guarantee) against any other process obtaining access to the device while
  993. you are using it.
  994.  
  995. If the selected device was in use by "cu", Kermit can't open it, because "cu"
  996. has changed its ownership, so we never get as far as looking at the lockfiles.
  997. In the normal case, we can't even look at the device to see who the owner is
  998. because it is visible only to its (present) owner.  In this case, Kermit says
  999. (for example):
  1000.  
  1001.   /dev/cua0p0: Permission denied
  1002.  
  1003. When Kermit releases a device it has successfully opened, it removes all the
  1004. lockfiles that it created.  This also happens whenever Kermit exits "under its
  1005. own power".
  1006.  
  1007. If Kermit is killed with a device open, the lockfile(s) are left behind.  The
  1008. next Kermit program that tries to assign the device, under any of its various
  1009. names, will automatically clean up the stale lockfiles because the pids they
  1010. contain are invalid.  The behavior of cu and other communication programs
  1011. under these conditions should be the same.
  1012.  
  1013. 3.2.4. HP-UX 5.00
  1014.  
  1015. The HP-UX 5.00 version of C-Kermit does not include the fullscreen
  1016. file-transfer because of problems with the curses library.
  1017.  
  1018. If HP-UX 5.21 with Wollongong TCP/IP is on the remote end of a Telnet
  1019. connection, streaming transfers to HP-UX invariably fail.  Workaround:
  1020. SET STREAMING OFF.  Packets longer than about 1000 should not be used.
  1021. Transfers from these systems, however, can use streaming and/or longer
  1022. packets.
  1023.  
  1024. Reportedly, "[there is] a bug in C-Kermit using HP-UX version 5.21 on the
  1025. HP-9000 series 500 computers.  It only occurs when the controlling terminal
  1026. is using an HP-27140 six-port modem mux.  The problem is not present if the
  1027. controlling terminal is logged into an HP-27130 eight-port mux.  The symptom
  1028. is that just after dialing successfully and connecting Kermit locks up and
  1029. the port is unusable until both forks of Kermit and the login shell are
  1030. killed."  (This report predates C-Kermit 6.0 and might no longer apply.)
  1031.  
  1032. 3.2.5. HP-UX 8.00
  1033.  
  1034. To make C-Kermit work on HP-UX 8.05 on a model 720, obtain and install HP-UX
  1035. patch PHNE_0899.  This patch deals with a lot of driver issues, particularly
  1036. related to communication at higher speeds.
  1037.  
  1038. And this report just in:
  1039.  
  1040. "On HP-UX 8 DON'T install 'tty patch' PHKL_4656, install PHKL_3047 instead!
  1041. Yesterday I tried this latest tty patch PHKL_4656 and had terrible problems.
  1042. This patch should fix RTS/CTS problems. With text transver all looks nice.
  1043. But when I switched over to binary files the serial interface returned only
  1044. rubish to C-Kermit. All sorts of protocol, CRC and packed errors I had. After
  1045. several tests and after uninstalling that patch, all transvers worked fine.
  1046. MB's of data without any errors.  So keep your fingers away from that patch.
  1047. If anybody needs the PHKL_3047 patch I have it here. It is no longer availabel
  1048. from HP's patch base."
  1049.  
  1050. 3.2.6. HP-UX 9.00 AND LATER
  1051.  
  1052. HP-UX 9.00 and 9.01 need patch PHNE_10572 (note: this replaces PHNE_3641)
  1053. for hptt0.o, asio0.o, and ttycomn.o in libhp-ux.a.  Contact Hewlett Packard
  1054. if you need this patch.  Without it, the dialout device (tty) will be hung
  1055. after first use; subsequent attempts to use will return an error like "device
  1056. busy".  (There are also equivalent patches for s700 9.03 9.05 9.07
  1057. (PHNE_10573) and s800 9.00 9.04 (PHNE_10416).
  1058.  
  1059. When C-Kermit is in server mode, it might have trouble executing REMOTE HOST
  1060. commands.  This problem happens under HP-UX 9.00 (Motorola) and HP-UX 9.01
  1061. (RISC) IF the C-Shell is the login shell AND with the C-Shell Revision 70.15.
  1062. Best thing is to install HP's Patch PHCO_4919 for Series 300/400 and PHCO_5015
  1063. for the Series 700/800.  PHCO_5015 is called "s700_800 9.X cumulative csh(1)
  1064. patch with memory leak fix" which works for HP-UX 9.00, 9.01, 9.03, 9.04, 9.05
  1065. and 9.07.  At least you need C-Shell Revision 72.12!
  1066.  
  1067. C-Kermit works fine -- including its curses-based file-transfer display -- on
  1068. the console terminal, in a remote session (e.g. when logged in to the HP 9000
  1069. on a terminal port or when telnetted or rlogin'd), and in an HP-VUE hpterm
  1070. window or an xterm window.
  1071.  
  1072. 3.2.7. HP-UX 10.10 AND LATER
  1073.  
  1074. C-Kermit is included as part of the HP-UX operating system by contract between
  1075. Hewlett Packard and Columbia University for all HP-UX releases 10.00 and
  1076. later.  Each level of HP-UX includes a freshly built C-Kermit binary in
  1077. /bin/kermit, which should work correctly.  However, if you are building your
  1078. own or downloading from Columbia, you should be aware that you can only use a
  1079. binary that was built under the same OS level as you are running.  As of
  1080. C-Kermit version 6.0, HP-UX 10.xx / 11.xx binaries announce, in the startup
  1081. herald and the VERSION command, the explicit HP-UX version they were built
  1082. for: HP-UX 10.00, 10.01, 10.10, 10.20, 10.30, or 11.00.  If there is a version
  1083. mismatch, HP-UX (not Kermit) is very likely to do something like "Invalid
  1084. version for shared lib /usr/lib/libc.1, IOT trap (core dumped)" during program
  1085. load.
  1086.  
  1087. Beginning in 10.10, libcurses is linked to libxcurses, the new UNIX95 (X/Open)
  1088. version of curses, which has some serious bugs; some routines, when called,
  1089. would hang and never return, some would dump core.  Evidently libxcurses
  1090. contains a select() routine, and whenever C-Kermit calls what it thinks is the
  1091. regular (sockets) select(), it gets the curses one, causing a segmentation
  1092. fault.  There is a patch for this from HP, PHCO_8086, "s700_800 10.10
  1093. libcurses patch", "shared lib curses program hangs on 10.10", "10.10 enhanced
  1094. X/Open curses core dumps due to using wrong select call", 96/08/02 (you can
  1095. tell if the patch is installed with "what /usr/lib/libxcurses.1"; the unpatched
  1096. version is 76.20, the patched one is 76.20.1.2).  It has been verified that
  1097. C-Kermit works OK with the patched library, but results are not definite for
  1098. HP-UX 10.20 or higher.
  1099.  
  1100. To ensure that C-Kermit works even on non-patched HP-UX 10.10 systems,
  1101. separate makefile entries are provided for HP-UX 10.00/10.01, 10.10, 10.20,
  1102. etc, in which the entries for 10.10 and above link with libHcurses, which is
  1103. "HP curses", the one that was used in 10.00/10.01.
  1104.  
  1105. 3.2.8. HP-UX and X.25
  1106.  
  1107. Although C-Kermit presently does not include built-in support for HP-UX X.25
  1108. (as it does for the Sun and IBM X.25 products), it can still be used to make
  1109. X.25 connections as follows: start Kermit and then telnet to localhost.  After
  1110. logging back in, start padem as you would normally do to connect over X.25.
  1111. Padem acts as a pipe between Kermit and X.25.  In C-Kermit 7.0, you might also
  1112. be able to avoid the "telnet localhost" step by using:
  1113.  
  1114.   C-Kermit> pty padem <address>
  1115.  
  1116. This will work if padem uses standard i/o (see Section 2.7 of ckermit2.txt).
  1117.  
  1118. (3.3) C-KERMIT AND LINUX
  1119.  
  1120. For further information, read the comp.os.linux.misc, comp.os.linux.answers,
  1121. and other Linux-oriented newsgroups, and:
  1122.  
  1123.  The Linux Document Project (LDP):
  1124.   . http://sunsite.unc.edu/LDP/
  1125.  
  1126.  The Linux FAQ:
  1127.   . http://sunsite.unc.edu/LDP/FAQ/Linux-FAQ.html
  1128.  
  1129.  The Linux HOWTOs (especially the Serial HOWTO):
  1130.   . http://sunsite.unc.edu/LDP/HOWTO/Serial-HOWTO.html
  1131.   . ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO
  1132.   . ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO
  1133.   . http://sunsite.unc.edu/LDP/HOWTO/
  1134.   . http://sunsite.unc.edu/LDP/hmirrors.html
  1135.  
  1136. Also see general comments on PC-based UNIXes in Section 3.0.
  1137.  
  1138. Did you know: DECnet is available for Linux?  See:
  1139.  
  1140.   http://linux.dreamtime.org/decnet/
  1141.  
  1142. (But there is no support for it in C-Kermit -- anybody interested in adding
  1143. it, please let me know.)
  1144.  
  1145. Before proceeding, let's handle the two most frequently asked question in
  1146. the Linux newsgroups:
  1147.  
  1148.  1. Neither C-Kermit not any other Linux application can use Winmodems
  1149.     (with one exception).  See section 3.0 for details.
  1150.  
  1151.  2. "Why does it take such a long time to make a telnet connection to (or
  1152.     from) my Linux PC?" (this applies to C-Kermit or to regular Telnet).
  1153.     Most telnet servers these days perform reverse DNS lookups on the client
  1154.     (for security and/or logging reasons).  If the Telnet client cannot be
  1155.     found by the local DNS server, the DNS request goes out to the Internet
  1156.     at large, and this can take quite some time.  The solution to this
  1157.     problem is to make sure that both client and host are registered in DNS.
  1158.     C-Kermit itself performs reverse DNS lookups unless you tell it not to.
  1159.     This is to allow C-Kermit to let you know which host it is actually
  1160.     connected to in case you have made a connection to a "host pool"
  1161.     (multihomed host).  You can disable C-Kermit's reverse DNS lookup with
  1162.     SET TCP REVERSE-DNS-LOOKUP OFF.
  1163.  
  1164. 3.3.1.  Problems Building C-Kermit for Linux
  1165.  
  1166. Modern Linux distributions like Red Hat give you a choice at installation
  1167. whether to include "developer tools".  Obviously, you can't build C-Kermit or
  1168. any other C program from source code if you have not installed the developer
  1169. tools.  Note that you might also have to choose (separately) to install the
  1170. "curses" or "ncurses" terminal control library -- it is possible to install
  1171. the C compiler and linker, but omit the (n)curses library and headers.  If
  1172. curses is not installed, you will not be able to build a version of C-Kermit
  1173. that supports the fullscreen file-transfer display, in which case you'll need
  1174. to use the "linuxnc" makefile target (nc = No Curses) or else install ncurses
  1175. before building.
  1176.  
  1177. Be sure to read the comments in the "linux:" makefile entry.  There are all
  1178. sorts of confusing issues caused by the many and varied Linux distributions.
  1179. Some of the worst involve the curses library and header files: where are they,
  1180. what are they called, which ones are they really?  Other vexing questions
  1181. involve libc5 vs libc6 vs glibc vs glibc2 (C libraries), gcc vs egcs vs lcc
  1182. (compilers), plus using or avoiding features that were added in a certain
  1183. version of Linux or a library or a distribution, and are not available in
  1184. others.
  1185.  
  1186. Linux C-Kermit, like all other UNIX C-Kermit versions, was built traditionally
  1187. with curses.h and the curses library.  However, this library was evidently so
  1188. buggy (users reported that, after doing a file transfer using the fullscreen
  1189. display, "screen scrolling locks up" and the cursor "is stuck on the bottom of
  1190. the screen", etc), that a new curses library, called ncurses, was developed to
  1191. replace it.  C-Kermit, as of version 6.1, uses ncurses rather than curses.
  1192.  
  1193. After modern practice, ncurses is dynamically linked, rather than linked into
  1194. the executable.  This means a certain relationship must obtain between the
  1195. version number referenced in the executable and the version number of the
  1196. library.  But there are evidently several different numbering systems for
  1197. libncurses.so -- e.g. 1.9.9e is another "name" for 3.0 -- but the program
  1198. loader doesn't know that and so won't run the program.  Also the library
  1199. and/or terminfo database might be in a different place on the target system
  1200. (e.g. /usr/share/terminfo) than it was on the build system (e.g.
  1201. /usr/lib/terminfo).  Solution: Create the appropriate symbolic links and/or
  1202. rebuild C-Kermit yourself from source code, and if you have additional
  1203. trouble, come back and read the rest of this section.
  1204.  
  1205. Of course static linking is also a possibility, but this makes the executable
  1206. MUCH bigger and introduces new problems of its own.
  1207.  
  1208. From the March 1999 Kermit newsgroup traffic:
  1209.   : When I start Kermit (under Redhat Linux 5.2), it complains about not
  1210.   : being able to recognise my terminal type - I've tried all the obvious
  1211.   : terminal types - which ones can I use?  Or can I get it to recognise
  1212.   : xterm?
  1213.   :
  1214.   Assuming that you can use full screen programs, this looks identical to the
  1215.   problem introduced by RedHat with 5.1.  They moved the curses library, and
  1216.   didn't [ leave a link from the old location to the new one ]:
  1217.  
  1218.   To fix: cd /usr/share; ln -s terminfo ../lib
  1219.  
  1220. The termcap library is no longer referenced in the Linux target in the
  1221. makefile, since its functions are supposedly incorporated into the ncurses and
  1222. curses libraries.  However, should any termcap-related entry points come up
  1223. undefined at link time (_tgetent, _tgoto, _tputs, etc), it might be necessary
  1224. to add -ltermcap back to LIBS.  But then you might find that the termcap
  1225. library is not in /usr/lib after all, but has been moved to /usr/lib/termcap/,
  1226. in which case you'll need to make a symlink, or do something like:
  1227.  
  1228.   "LIBS = -L/usr/lib/curses -lcurses -L/usr/lib/termcap -ltermcap"
  1229.  
  1230. Different UUCP lockfile conventions are used by different Linux versions
  1231. and/or distributions.  In C-Kermit 6.0 and later, "make linux" uses
  1232. /var/lock/LCK..name, decimal ASCII 10-byte PID string with leading spaces
  1233. because -DLINUXFSSTND ("Linux File System Standard") is included in the
  1234. compilation CFLAGS.  If you remove this definition, C-Kermit will use the
  1235. earlier arrangement of integer PID, /usr/spool/uucp/LCK..name.  The leading
  1236. spaces are required by FSSTND 1.2, but FSSTND 1.0 required leading zeros; to
  1237. get the leading zeros, also include -DFSSTND10.  Use whichever option agrees
  1238. with your uucp, cu, tip, etc, programs.
  1239.  
  1240. One user reported problems building C-Kermit under Linux 2.0.30/Slackware 96,
  1241. errors like:
  1242.  
  1243.   /usr/include/linux/socket.h:77: warning: `PF_AAL5' redefined
  1244.   /usr/local/include/socketbits.h:68: warning: this is the location of the
  1245.   previous definition
  1246.   ckutio.c:4679: `TIOCGSERIAL' undeclared (first use this function)
  1247.   ckutio.c:4685: `TIOCSSERIAL' undeclared (first use this function)
  1248.   ckutio.c:6092: warning: passing arg 3 of `select' from incompatible
  1249.   pointer type
  1250.  
  1251. etc etc.  Diagnosis: These were caused by installing some other package, which
  1252. created files in /usr/local/include.  Cure: rm -rf /usr/local/include, and
  1253. start over.
  1254.  
  1255. Reportedly, building C-Kermit 6.0 on Linux 1.1.33 and 1.1.34 gets fatal
  1256. compilation errors due to inconsistencies in the Linux header files.  Linux
  1257. kernel versions prior to 1.1.33 and later than 1.1.34 should be OK.  (Also,
  1258. C-Kermit 6.1 and later should be OK since we no longer include kernel header
  1259. files.)
  1260.  
  1261. Reportedly there is a bug in gcc 2.5.8 with signed to unsigned compares
  1262. that can wreak havoc when Kermit (or most any other program) is compiled with
  1263. this version of gcc; reportedly this can be worked around, at least in part,
  1264. by adding "-fno-unroll-loops" to the gcc compilation options.  (This problem
  1265. is evidently fixed in more recent gcc releases.)
  1266.  
  1267. Reportedly, if you have the iBCS2 (Intel Binary Compatibility Standard 2)
  1268. module installed, you can also run SCO Xenix and UNIX binaries under Linux,
  1269. including the SCO C-Kermit binaries, shareable libraries and all.
  1270. (iCBS2 is available via anonymous ftp from tsx-11.mit.edu, along with an
  1271. SCO libc_s compatibility module for Linux).
  1272.  
  1273. There is evidently a minor problem with GCC (version unknown) on (64-bit)
  1274. Alpha platforms, in which it complains:
  1275.  
  1276.   warning: cast to pointer from integer of different size
  1277.  
  1278. whenever it encounters a legitimate trinary expression like:
  1279.  
  1280.   integer ? "string1" : "string2"
  1281.  
  1282. (The "integer" can also be an integer-valued expression.)  These warnings
  1283. appear to be harmless.
  1284.  
  1285. 3.3.2. Problems with Serial Devices in Linux
  1286.  
  1287.   Also see: "man setserial", "man irqtune".
  1288.   And: Sections 3.0, 6, 7, and 8 of this document.
  1289.  
  1290. Don't expect it to be easy.  Queries like the following are posted to the
  1291. Linux newsgroups almost daily:
  1292.  
  1293.   Problem of a major kind with my Compaq Presario 1805 in the sense that
  1294.   the pnpdump doesn't find the modem and the configuration tells me that
  1295.   the modem is busy when I set everything by hand!
  1296.  
  1297.   I have <some recent SuSE distribution>, kernel 2.0.35. Using the Compaq
  1298.   tells me that the modem (which is internal) is on COM2, with the usual
  1299.   IRQ and port numbers. Running various Windows diagnostics show me
  1300.   AT-style commands exchanged so I have no reason to beleive that it is a
  1301.   Winmodem. Also, the diagnostics under Win98 tell me that I am talking to
  1302.   an NS 16550AN.
  1303.  
  1304. [Editor's note: This does not necessarily mean it isn't a Winmodem.]
  1305.  
  1306.   Under Linux, no joy trying to talk to the modem on /dev/cua1 whether
  1307.   via. minicom, kppp, or chat. kppp at least tells me that tcgetattr()
  1308.   failed.
  1309.  
  1310.   Usage of setserial ("setserial /dev/cua1 port 0x2F8 irq 3 autoconfig"
  1311.   followed by "setserial -g /dev/cua1") tells me that the uart is
  1312.   'unknown'. I have tried setting the UART manullay via. setserial to
  1313.   16550A, 16550, and the other one (8550?) (I didn't try 16540). None of
  1314.   these manual settings resulted in any success.
  1315.  
  1316.   A look at past articles leads me to investigate PNP issues by calling
  1317.   pnpdump but pnpdump returns "no boards found". I have looked around on
  1318.   my BIOS (Phoenix) and there is not much evidence of it being PNP aware.
  1319.   However for what it calls "Serial port A", it offers a choice of Auto,
  1320.   Disabled or Manual settings (currently set to Auto), but using the BIOS
  1321.   interface I tried to change to 'manual' and saw the default settings
  1322.   offered to be were 0x3F8 and IRQ 4 (COM1). The BIOS menus did not give
  1323.   me any chance to configure COM2 or any "modem". I ended up not saving
  1324.   any BIOS changes in the course of my investigations.
  1325.  
  1326.   Can anybody suggest something else for me to try?
  1327.  
  1328. (end quotes)
  1329.  
  1330. Watch out for PCI, PCMCIA and Plug-n-Play devices, Winmodems, and the like
  1331. (see cautions in Section 3.0).  Linux supports Plug-n-Play devices to some
  1332. degree via the isapnp and pnpdump programs; read the man pages for them.  (If
  1333. you don't have them, look on your installation CD for isapnptool or download
  1334. it from sunsite or a sunsite mirror or other politically correct location).
  1335.  
  1336. Even when you have a real serial port, always be wary of interrupt conflicts
  1337. and similar PC hardware configuration issues: a PC is not a real computer like
  1338. other UNIX workstations -- it is generally pieced together from whatever
  1339. random components were the best bargain on the commodity market the week it
  1340. was built.  Once it's assembled and boxed, not even the manufacturer will
  1341. remember what it's made of or how it was put together because they've moved on
  1342. to a new model.  Their job is to get it (barely) working with Windows; for
  1343. Linux and other OS's you are on your own.
  1344.  
  1345. "set line /dev/modem" or "set line /dev/ttyS2", etc, results in an error,
  1346. "/dev/modem is not a tty".  Cause unknown, but obviously a driver issue, not a
  1347. Kermit one (Kermit uses "isatty()" to check that the device is a tty, so it
  1348. knows it will be able to issue all the tty-related ioctl's on it, like setting
  1349. the speed & flow control).  Try a different name (i.e. driver) for the same
  1350. port, e.g.  "set line /dev/cua2" or whatever.
  1351.  
  1352. "set modem type xxx" (where xxx is the name of a modem) followed by
  1353. "set line /dev/modem" or "set line /dev/ttyS2", etc, hangs (but can be
  1354. interrupted with Ctrl-C).  Experimentation shows that if the modem is
  1355. configured to always assert carrier (&C0) the same command does not hang.
  1356. Again, a driver issue.  Use /dev/cua2 (or whatever) instead.  (Or not --
  1357. hopefully none of these symptoms occur in C-Kermit 7.0.)
  1358.  
  1359. "set line /dev/cua0" reports "Device is busy", but "set line /dev/ttyS0"
  1360. works OK.
  1361.  
  1362. In short: If the cua device doesn't work, try the corresponding ttyS device.
  1363. If the ttyS device doesn't work, try the corresponding cua device -- but note
  1364. that Linux developers do not recommend this, and are phasing out the cua
  1365. devices.  From /usr/doc/faq/howto/Serial-HOWTO:
  1366.  
  1367.   12.4. What's The Real Difference Between The /dev/cuaN And /dev/ttySN
  1368.         Devices?
  1369.   The only difference is the way that the devices are opened.  The
  1370.   dialin devices /dev/ttySN are opened in blocking mode, until CD is
  1371.   asserted (ie someone connects).  So, when someone wants to use the
  1372.   /dev/cuaN device, there is no conflict with a program watching the
  1373.   /dev/ttySN device (unless someone is connected of course).
  1374.   The multiple /dev entries, allow operation of the same physical device
  1375.   with different operating characteristics.  It also allows standard
  1376.   getty programs to coexist with any other serial program, without the
  1377.   getty being retrofitted with locking of some sort.  It's especially
  1378.   useful since standard Unix kernel file locking, and UUCP locking are
  1379.   both advisory and not mandatory.
  1380.  
  1381. It was discovered during development of C-Kermit 6.1 that rebuilding C-Kermit
  1382. with -DNOCOTFMC (No Close/Open To Force Mode Change) made the aforementioned
  1383. problem with /dev/ttyS0 go away.  It is not yet clear, however, what its
  1384. affect might be on the /dev/cua* devices.  As of 19 March 1998, this option
  1385. has been added to the CFLAGS in the makefile entries for Linux ("make linux").
  1386.  
  1387. Note that the cua device is now "deprecated", and new editions of Linux will
  1388. phase it out in favor of the ttyS device.  See:
  1389.  
  1390.   http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html
  1391.  
  1392. One user reported that C-Kermit 7.0, when built with egcs 1.1.2 and run on
  1393. Linux 2.2.6 with glibc 2.1 (hardware unknown but probably a PC) dumps core
  1394. when given a "set line /dev/ttyS1" command.  When rebuilt with gcc, it works
  1395. fine.
  1396.  
  1397. 3.3.3. Terminal Emulation in Linux
  1398.  
  1399. Run C-Kermit in the regular console screen, which provides Linux Console
  1400. "emulation" via the "console" termcap entry, or under X-Windows in an xterm
  1401. window, which gives VTxxx emulation.  An xterm that includes color ANSI and
  1402. VT220 emulation is available with Xfree86:
  1403.  
  1404.   http://www.clark.net/pub/dickey/xterm/xterm.faq.html
  1405.  
  1406. Before starting C-Kermit in an xterm window, you might need to tell the xterm
  1407. window's shell to "stty sane".
  1408.  
  1409. To set up your PC console keyboard to send VT220 key sequences when using
  1410. C-Kermit as your communications program in an X terminal window (if it doesn't
  1411. already), create a file somewhere (e.g. in /root/) called .xmodmaprc,
  1412. containing something like the following:
  1413.  
  1414.   keycode 77  = KP_F1       ! Num Lock     => DEC Gold (PF1)
  1415.   keycode 112 = KP_F2       ! Keypad /     => DEC PF1
  1416.   keycode 63  = KP_F3       ! Keypad *     => DEC PF3
  1417.   keycode 82  = KP_F4       ! Keypad -     => DEC PF4
  1418.   keycode 111 = Help        ! Print Screen => DEC Help
  1419.   keycode 78  = F16         ! Scroll Lock  => DEC Do
  1420.   keycode 110 = F16         ! Pause        => DEC Do
  1421.   keycode 106 = Find        ! Insert       => DEC Find
  1422.   keycode 97  = Insert      ! Home         => DEC Insert
  1423.   keycode 99  = 0x1000ff00  ! Page Up      => DEC Remove
  1424.   keycode 107 = Select      ! Delete       => DEC Select
  1425.   keycode 103 = Page_Up     ! End          => DEC Prev Screen
  1426.   keycode 22  = Delete      ! Backspace sends Delete (127)
  1427.  
  1428. Then put "xmodmap <filename>" in your .xinitrc file (in your login
  1429. directory), e.g.
  1430.  
  1431.   xmodmap /root/.xmodmaprc
  1432.  
  1433. Of course you can move things around.  Use the xev program to find
  1434. out key codes.
  1435.  
  1436. Console-mode keys are mapped separately using loadkeys, and different
  1437. keycodes are used.  Find out what they are with showkey.
  1438.  
  1439.  
  1440. 3.3.4. Dates and Times
  1441.  
  1442. If C-Kermit's date-time (e.g. as shown by its DATE command) differs from
  1443. the system's date and time:
  1444.  
  1445.  a. Make sure the libc to which Kermit is linked is set to GMT or is not
  1446.     set to any time zone.  Watch out for mixed libc5/libc6 systems; each
  1447.     must be set indpendently.
  1448.  
  1449.  b. If you have changed your TZ environment variable, make sure it is
  1450.     exported.  This is normally done in /etc/profile or /etc/TZ.
  1451.  
  1452. 3.3.5. Startup Errors
  1453.  
  1454. C-Kermit 7.0 should work on all versions of Linux current through December
  1455. 1999, provided it was built on the same version you have (just get the
  1456. source code and "make linux").  This is no guarantee that binaries built
  1457. for 7.0 release will not stop working at a later date, since Linux tends
  1458. to change out from under its applications, just as it did under C-Kermit 6.0
  1459. (libc/glibc, curses/ncurses, etc).
  1460.  
  1461. Since the Red Hat 5.1 release (circa August 1998), there have been numerous
  1462. reports of prebuilt Linux executables, and particularly the Kermit RPM for
  1463. Red Hat Linux, not working; either it won't start at all, or it gives error
  1464. messages about "terminal type unknown" and refuses to initialize its curses
  1465. support.  The following is from the Kermit newsgroup:
  1466.  
  1467. From: rchandra@hal9000.buf.servtech.com ()
  1468. Newsgroups: comp.protocols.kermit.misc
  1469. Subject: Red Hat Linux/Intel 5.1 and ncurses: suggestions
  1470. Date: 22 Aug 1998 15:54:46 GMT
  1471. Organization: Verio New York
  1472. Keywords: RedHat RPM 5.1
  1473.  
  1474. Several factors can influence whether "linux" is recognized as a
  1475. terminal type on many Linux systems.
  1476.  
  1477. 1.) Your program, or the libraries it linked with (if statically
  1478.   linked), or the libraries it dynamically links with at runtime, are
  1479.   looking for an entry in /etc/termcap that isn't there.  (not likely,
  1480.   but possible...I believe but am not certain that this is a very old
  1481.   practice in very old [n]curses library implementations to use a
  1482.   single file for all terminal descriptions.)
  1483.  
  1484. 2.) Your program, or the libraries...are looking for a terminfo file
  1485.   that just plain isn't there.  (also not so likely, since many people
  1486.   in other recent message threads said that other programs work OK).
  1487.  
  1488. 3.) Your program, or the libraries...are looking for a terminfo file
  1489.   that is stored at a pathname that isn't expected by your program,
  1490.   the libraries--and so on.  I forgot if I read this in the errata Web
  1491.   page or where exactly I discovered this (Netscape install?  Acrobat
  1492.   install?), but it may just be that one libc (let's say for sake of
  1493.   argument, libc5, but I don't know this to be true) expects your
  1494.   terminfo to be in /usr/share/terminfo, and the other (let's say
  1495.   libc6/glibc) expects /usr/lib/terminfo.  I remember that the
  1496.   specific instructions in this bugfix/workaround were to do the
  1497.   following or equivalent:
  1498.  
  1499.       cd /usr/lib
  1500.       ln -s ../share/terminfo ./terminfo
  1501.  
  1502.      - or -
  1503.  
  1504.       ln -s /usr/share/terminfo /usr/lib/terminfo
  1505.  
  1506.   So what this says is that the terminfo database/directory structure
  1507.   can be accessed by either path.  When something goes to reference
  1508.   /usr/lib/terminfo, the symlink redirects it to essentially
  1509.   /usr/share/terminfo, which is where it really resides on your
  1510.   system.  I personally prefer wherever possible to use relative
  1511.   symlinks, because they still hold, more often than break, across
  1512.   mount points, particularly NFS mounts, where the directory structure
  1513.   may be different on the different systems.
  1514.  
  1515. (end quote) Evidently the terminfo file moved between Red Hat 5.0 and 5.1, but
  1516. Red Hat did not include a link to let applications built prior to 5.1 find it.
  1517. Users report that installing the link fixes the problem.
  1518.  
  1519. (3.4) C-KERMIT AND NEXTSTEP
  1520.  
  1521. Run C-Kermit in a Terminal, Stuart, or xterm window, or when logged in
  1522. remotely through a serial port or TELNET connection.  C-Kermit does not work
  1523. correctly when invoked directly from the NeXTSTEP File Viewer or Dock.  This
  1524. is because the terminal-oriented gtty, stty, & ioctl calls don't work on the
  1525. little window that NeXTSTEP pops up for non-NeXTSTEP applications like Kermit.
  1526. CBREAK and No-ECHO settings do not take effect in the command parser --
  1527. commands are parsed strictly line at a time.  "set line /dev/cua" works.
  1528. During CONNECT mode, the console stays in cooked mode, so characters are not
  1529. transmitted until carriage return or linefeed is typed, and you can't escape
  1530. back.  If you want to run Kermit directly from the File Viewer, then launch it
  1531. from a shell script that puts it in the desired kind of window, something like
  1532. this (for "Terminal"):
  1533.  
  1534.   Terminal -Lines 24 -Columns 80 -WinLocX 100 -WinLocY 100 $FONT $FONTSIZE \
  1535.   -SourceDotLogin -Shell /usr/local/bin/kermit &
  1536.  
  1537. C-Kermit does not work correctly on a NeXT with NeXTSTEP 3.0 to which you have
  1538. established an rlogin connection, due to a bug in NeXTSTEP 3.0, which has been
  1539. reported to NeXT.
  1540.  
  1541. The SET CARRIER command has no effect on the NeXT -- this is a limitation of
  1542. the tty device drivers.
  1543.  
  1544. Hardware flow control on the NeXT is selected not by "set flow rts/cts" in
  1545. Kermit (since NeXTSTEP offers no API for this), but rather, by using a
  1546. specially-named driver for the serial device: /dev/cufa instead /dev/cua;
  1547. /dev/cufb instead of /dev/cub.  This is available only on 68040-based NeXT
  1548. models (the situation for Intel NeXTSTEP implementations is unknown).
  1549.  
  1550. NeXT-built 68030 and 68040 models have different kinds of serial interfaces;
  1551. the 68030 has a Macintosh-like RS-422 interface, which lacks RTS and CTS
  1552. signals; the 68040 has an RS-423 (RS-232 compatible) interface, which
  1553. supports the commonly-used modem signals.  WARNING: the connectors look
  1554. exactly the same, but the pins are used in completely DIFFERENT ways --
  1555. different cables are required for the two kinds of interfaces.
  1556.  
  1557.   IF YOU GET LOTS OF RETRANSMISSIONS during file transfer, even when
  1558.   using a /dev/cuf* device and the modem is correctly configured for
  1559.   RTS/CTS flow control, YOU PROBABLY HAVE THE WRONG KIND OF CABLE.
  1560.  
  1561. On the NeXT, Kermit reportedly (by TimeMon) causes the kernel to use a lot of
  1562. CPU time when using a "set line" connection.  That's because there is no DMA
  1563. channel for the NeXT serial port, so the port must interrupt the kernel for
  1564. each character in or out.
  1565.  
  1566. One user reported trouble running C-Kermit on a NeXT from within NeXT's
  1567. Subprocess class under NeXTstep 3.0, and/or when rlogin'd from one NeXT to
  1568. another: Error opening /dev/tty:, congm: No such device or address.
  1569. Diagnosis: Bug in NeXTSTEP 3.0, cure unknown.
  1570.  
  1571. (3.5) C-KERMIT AND QNX
  1572.  
  1573. See also: The comp.os.qnx newsgroup.
  1574.  
  1575. Support for QNX 4.x was added in C-Kermit 5A(190).  This is a full-function
  1576. implementation, thoroughly tested on QNX 4.21 and later, and verified to work
  1577. in both 16-bit and 32-bit versions.  The 16-bit version was dropped in
  1578. C-Kermit 7.0 since it can no longer be built successfully (after stripping
  1579. most most features, I succeeded in getting it to compile and link without
  1580. complaint, but the executable just beeps when you run it); for 16-bit QNX
  1581. 4.2x, use C-Kermit 6.0 or earlier.
  1582.  
  1583. The 32-bit version (and the 16-bit version prior to C-Kermit 7.0) support most
  1584. of C-Kermit's advanced features including TCP/IP, high serial speeds, hardware
  1585. flow-control, modem-signal awareness, curses support, etc.
  1586.  
  1587. BUG: In C-Kermit 6.0 and earlier on QNX 4.22 and earlier, the fullscreen file
  1588. transfer display worked fine the first time, but was fractured on subsequent
  1589. file transfers.  Cause and cure unknown.  In C-Kermit 7.0 and QNX 4.25, this
  1590. no longer occurs.  It is not known if it would occur in C-Kermit 7.0 on
  1591. earlier QNX versions.
  1592.  
  1593. Dialout devices are normally /dev/ser1, /dev/ser2, ..., and can be opened
  1594. explicitly with SET LINE.  Reportedly, "/dev/ser" (no unit number) opens the
  1595. first available /dev/ser<n> device.
  1596.  
  1597. Like all other UNIX C-Kermit implementations, QNX C-Kermit does not provide
  1598. any kind of terminal emulation.  Terminal specific functions are provided by
  1599. your terminal, terminal window (e.g. QNX Terminal or xterm), or emulator.
  1600.  
  1601. QNX C-Kermit, as distributed, does not include support for UUCP line-locking;
  1602. the QNX makefile entries (qnx32 and qnx16) include the -DNOUUCP switch.  This
  1603. is because QNX, as distributed, does not include UUCP, and its own
  1604. communications software (e.g. qterm) does not use UUCP line locking.  If you
  1605. have a UUCP product installed on your QNX system, remove the -DNOUUCP switch
  1606. from the makefile entry and rebuild.  Then check to see that Kermit's UUCP
  1607. lockfile conventions are the same as those of your UUCP package; if not, read
  1608. the UUCP lockfile section ckuins.txt and make the necessary changes to the
  1609. makefile entry (e.g. add -DHDBUUCP).
  1610.  
  1611. QNX does, however, allow a program to get the device open count.  This can
  1612. not be a reliable form of locking unless all applications do it, so by
  1613. default, Kermit uses this information only for printing a warning message
  1614. such as:
  1615.  
  1616.   C-Kermit>set line /dev/ser1
  1617.   WARNING - "/dev/ser1" looks busy...
  1618.  
  1619. However, if you want to use it as a lock, you can do so with:
  1620.  
  1621.   SET QNX-PORT-LOCK { ON, OFF }
  1622.  
  1623. This is OFF by default; if you set in ON, C-Kermit will fail to open any
  1624. dialout device when its open count indicates that another process has it
  1625. open.  SHOW COMM (in QNX only) displays the setting, and if you have a port
  1626. open, it also shows the open count.
  1627.  
  1628. (3.6) C-KERMIT AND SCO UNIX, XENIX, ODT, AND OPENSERVER
  1629.  
  1630. See also:
  1631.  
  1632.  . The comp.unix.sco.* newsgroups.
  1633.  . http://www.sco.com/Support/ssl.html
  1634.  . Section 3.10 below for Unixware
  1635.  . The FAQ at ftp://rtfm.mit.edu/pub/usenet/news.answers/sco/newsgroups-faq
  1636.    (which only covers newsgroups and mailing lists).
  1637.  
  1638. There is a general SCO FAQ, but I'm not sure where to find it.  It is posted
  1639. to the newsgroups from time to time.
  1640.  
  1641. Also see general comments on PC-based UNIXes in Section 3.0.
  1642.  
  1643. Old Xenix versions... Did you know: Xenix 3.0 is *older* than Xenix 2.0?
  1644.  
  1645. There is all sorts of confusion among SCO versions, particularly when third-
  1646. party communications boards and drivers are installed, regarding lockfile
  1647. naming conventions, as well as basic functionality.  As far as lockfiles go,
  1648. all bets are off if you are using a third-party multiport board.  At least you
  1649. have the source code.  Hopefully you also have a C compiler :-)
  1650.  
  1651. On the other hand, certain functions that might not (do not) work right or
  1652. at all when using SCO drivers (e.g. high serial speeds, hardware flow control,
  1653. and/or reading of modem signals) might work right when using third-party
  1654. drivers.  (Example: hardware flow control works, reportedly, only on uppercase
  1655. device like tty1A -- not tty1a -- and only when CLOCAL is clear when using the
  1656. SCO sio driver, but there are no such restrictions in, e.g., Digiboard
  1657. drivers).
  1658.  
  1659. SCO OpenServer (all versions up to and included 5.0.5) do not support the
  1660. reading of modem signals.  Thus "show comm" does not list modem signals, and
  1661. C-Kermit does not automatically pop back to its prompt when the modem hangs
  1662. up the connection (drops CD).  The ioctl() call for this is simply not
  1663. implmented, at least not in the standard drivers.
  1664.  
  1665. One user reports that he can't transfer large files with C-Kermit under SCO
  1666. OSR5.0.0 and 5.0.4 -- after the first 5K, everything falls apart.  Same thing
  1667. without Kermit -- e.g. with ftp over a PPP connection.  Later, he said that
  1668. replacing SCO's SIO driver with FAS, an alternative communications driver,
  1669. made the problem go away:
  1670.  
  1671.   ftp://ftp.fu-berlin.de/pub/unix/driver/fas
  1672.  
  1673. Other users often make similar observations regarding Digi and other 3rd
  1674. party drivers.
  1675.  
  1676. With regard to bidirectional serial ports on OpenServer 5.0.4, the following
  1677. advice appeared on an SCO related newsgroup : "No amount of configuration
  1678. information is going to help you on 5.0.4 unless it includes the kludge for
  1679. the primary problem.  With almost every modem, the 5.0.4 getty will barf
  1680. messages and may or may not connect.  There are 2 solutions and only one works
  1681. on 5.0.4.  Get the atdialer binary from a 5.0.0 system and substitute it for
  1682. the native 5.0.4 atdialer.  The other solution is to upgrade to 5.0.5.  And,
  1683. most of all, on any OpenServer products, do NOT run the badly broken Modem
  1684. Manager.  Configure the modems in the time honored way that dates back to
  1685. Xenix."
  1686.  
  1687. Hardware flow control is available in C-Kermit when the underlying SCO version
  1688. supports it.  Note that Xenix 2.3.0 and later claims to support RTSFLOW and
  1689. CTSFLOW, but this is not modern bidirectional hardware flow control; rather it
  1690. implements the original RS-232 meanings of these signals for unidirectional
  1691. half-duplex line access: If both RTSFLOW and CTSFLOW bits are set, Xenix
  1692. asserts RTS when it wants to send data and waits for CTS assertion before it
  1693. actually starts sending data (also, reportedly, even this is broken in Xenix
  1694. 2.3.0 and 2.3.1).
  1695.  
  1696. Use SCO-provided utilities for switching the directionality of a modem line,
  1697. such as "enable" and "disable" commands.  For example, to dial out on tty1a,
  1698. which is normally set up for logins:
  1699.  
  1700.   disable tty1a
  1701.   kermit -l /dev/tty1a
  1702.   enable tty1a
  1703.  
  1704. If a tty device is listed as an ACU in /usr/lib/uucp/Devices and is enabled,
  1705. getty resets the ownership and permissions to uucp.uucp 640 every time the
  1706. device is released.  If you want to use the device only for dialout, and you
  1707. want to specify other owners or permissions, you should disable it in
  1708. /usr/lib/uucp/Devices; this will prevent getty from doing things to it.  You
  1709. should also changes the device's file modes in /etc/conf/node.d/sio by
  1710. changing fields 5-7 for the desired device(s); this determines how the devices
  1711. are set if you relink the kernel.
  1712.  
  1713. SCO systems tend to use different names (i.e. drivers) for the same device.
  1714. In Xenix, /dev/tty1a refers to a terminal device that has no modem control;
  1715. open, read, write, and close operations do not depend on carrier.  On the
  1716. other hand, /dev/tty1A (same name, but with final letter upper case), is the
  1717. same device with modem control, in which carrier is required (the SET LINE
  1718. command does not complete until carrier appears, read/write operations fail if
  1719. there is no carrier, etc).  In the SCO case, C-Kermit always uses the
  1720. lowercase name when creating the UUCP lockfile (this is, according to SCO
  1721. experts, the proper behavior, but reportedly not all other communications
  1722. applications found on SCO systems follow this rule).
  1723.  
  1724. In SCO Xenix, you must use SET CARRIER ON *and* use the upper-case tty device
  1725. name in order to have carrier detection.  SET CARRIER OFF should work with
  1726. either upper or lowercase tty devices.  SET CARRIER AUTO is the same as OFF.
  1727.  
  1728. One SCO user of C-Kermit 5A(190) reported that only one copy of Kermit can run
  1729. at a time when a Stallion Technologies multiport boards are installed.  Cause,
  1730. cure, and present status unknown (see Section 14 of this file for more info
  1731. regarding Stallion).
  1732.  
  1733. Prior to SCO OpenServer 5.0.4, the highest serial port speed supported by SCO
  1734. was 38400.  However, in some SCO versions (e.g. OSR5) it is possible to map
  1735. rarely-used lower speeds (like 600 and 1800) to higher ones like 57600 and
  1736. 115200.  To find out how, go to http://www.sco.com/ and search for "115200".
  1737. In OSR5.0.4, serial speeds up to 921600 are supported through the POSIX
  1738. interface; C-Kermit 6.1.193 or later, when built for OSR5.0.4, supports these
  1739. speeds, but you might be able to run this binary on earlier releases to get
  1740. the high serial speeds, depending on various factors, described by Bela Lubkin
  1741. of SCO:
  1742.  
  1743.   Serial speeds under SCO Unix / Open Desktop / OpenServer
  1744.   ========================================================
  1745.   Third party drivers (intelligent serial boards) may provide any speeds
  1746.   they desire; most support up to 115.2Kbps.
  1747.  
  1748.   SCO's "sio" driver, which is used to drive standard serial ports with
  1749.   8250/16450/16550 and similar UARTs, was limited to 38400bps in older
  1750.   releases.  Support for rates through 115.2Kbps was added in the
  1751.   following releases:
  1752.  
  1753.     SCO OpenServer Release 5.0.0 (requires supplement "rs40b")
  1754.     SCO OpenServer Release 5.0.2 (requires supplement "rs40a" or "rs40b")
  1755.     SCO OpenServer Release 5.0.4 or later
  1756.     SCO Internet FastStart Release 1.0.0 or later
  1757.  
  1758.     SCO supplements are at ftp://ftp.sco.com/; the "rs40" series are
  1759.     under directory /Supplements/internet
  1760.  
  1761. (end quote)
  1762.  
  1763. Reportedly, if you have a script that makes a TCP/IP SET HOST (e.g. Telnet)
  1764. connection to SCO 3.2v4.2 with TCP/IP 1.2.1, and then does the following:
  1765.  
  1766.   script $ exit
  1767.   hangup
  1768.  
  1769. this causes a pseudoterminal (pty) to be consumed on the SCO system; if you do
  1770. it enough times, it will run out of ptys.  An "exit" command is being sent to
  1771. the SCO shell, and a HANGUP command is executed locally, so the chances are
  1772. good that both sides are trying to close the connection at once, perhaps
  1773. inducing a race condition in which the remote pty is not released.  It was
  1774. speculated that this would be fixed by applying SLS net382e, but it did not.
  1775. Meanwhile, the workaround is to insert a "pause" between the SCRIPT and HANGUP
  1776. commands.  (The situation with later SCO releases is not known.)
  1777.  
  1778. SCO UNIX and OpenServer allow their console and/or terminal drivers to be
  1779. configured to translate character sets for you.  DON'T DO THIS WHEN USING
  1780. KERMIT!  First of all, you don't need it -- Kermit itself already does this
  1781. for you.  And second, it will (a) probably ruin the formatting of your screens
  1782. (depending on which emulation you are using); and (b) interfere with all sorts
  1783. of other things -- legibility of non-ASCII text on the terminal screen, file
  1784. transfer, etc.  Use:
  1785.  
  1786.   mapchan -n
  1787.  
  1788. to turn off this feature.
  1789.  
  1790. Note that there is a multitude of SCO entries in the makefile, many of them
  1791. exhibiting an unusually large number of compiler options.  Some people
  1792. actually understand all of this.  Reportedly, things are settling down with
  1793. SCO OpenServer 5.x and Unixware 7 -- the SCO UDK compiler is said to generate
  1794. binaries that will run on either platform, by default, automatically.  When
  1795. using gcc or egcs, on the other hand, differences persist, plus issues
  1796. regarding the type of binary that is generated (COFF, ELF, etc), and where
  1797. and how it can run.  All of this could stand further clarification by SCO
  1798. experts.
  1799.  
  1800. (3.7) C-KERMIT AND SOLARIS
  1801.  
  1802. See also:
  1803.   The comp.unix.solaris newsgroup
  1804.   http://access1.sun.com/
  1805.   http://docs.sun.com/
  1806.   http://www.sunhelp.com/
  1807.   http://www.wins.uva.nl/pub/solaris/solaris2/
  1808.   http://www.wins.uva.nl/cgi-bin/sfaq.cgi
  1809.   ftp://ftp.wins.uva.nl/pub/solaris
  1810.  
  1811. And about serial communications in particular, see "Celeste's Tutorial on
  1812. Solaris 2.x Modems and Terminals":
  1813.  
  1814.   http://www.stokely.com/
  1815.  
  1816. In particular:
  1817.  
  1818.   http://www.stokely.com/unix.sysadm.resources/faqs.sun.html
  1819.  
  1820. For PC-based Solaris, also see general comments on PC-based UNIXes in
  1821. Section 3.0.  Don't expect Solaris or any other kind of UNIX to work right
  1822. on a PC until you resolve all interrupt conflicts.  Don't expect to be able
  1823. to use COM3 or COM4 (or even COM2) until you have configured their addresses
  1824. and interrupts.
  1825.  
  1826. Even then your serial port can't be used -- or at least won't work right --
  1827. until it is enabled in Solaris.  For example, you get a message like "SERIAL:
  1828. Operation would block" when attempting to dial.  This probably indicates that
  1829. the serial port has not been enabled for use with modems.  You'll need to
  1830. follow the instructions in your system setup or management manual, such as
  1831. (e.g.) the Desktop SPARC Sun System & Network Manager's Guide, which should
  1832. contain a section "Setting up Modem Software"; read it and follow the
  1833. instructions.  These might (or might not) include running a program called
  1834. "eeprom", editing some system configuration file (such as, for example:
  1835.  
  1836.   /platform/i86pc/kernel/drv/asy.conf
  1837.  
  1838. and then doing a configuration reboot, or running some other programs like
  1839. drvconfig and devlinks.  "man eeprom" for details.
  1840.  
  1841. Also, on certain Sun models like IPC, the serial port hardware might need to
  1842. have a jumper changed to make it an RS-232 port rather than RS-423.
  1843.  
  1844. Some users report difficulties dialing out with C-Kermit on serial port when
  1845. using the /dev/cua/a name -- session seems to become stuck, can't escape back,
  1846. etc -- but when using the /dev/term/a name for the *same* device, everything
  1847. works fine.  Explanation: unknown, but probably due to improper configuration
  1848. of the port; again, see the materials referenced above.
  1849.  
  1850. Reportedly, if you start C-Kermit and "set line" to a port that has a modem
  1851. connected to it that is not turned on, and then "set flow rts/cts", there
  1852. might be some (unspecified) difficulties closing the device (Solaris version
  1853. not specified).
  1854.  
  1855. The built-in SunLink X.25 support for Solaris 2.3/2.4./25 and SunLink 8.01 or
  1856. 9.00 works OK provided the X.25 system has been installed and initialized
  1857. properly.  Packet sizes might need to be reduced to 256, maybe even less,
  1858. depending on the configuration of the X.25 installation.  On one connection
  1859. where C-Kermit 6.0 was tested, very large packets and window sizes could be
  1860. used in one direction, but only very small ones would work in the other.
  1861.  
  1862. In any case, according to Sun, C-Kermit's X.25 support is superfluous with
  1863. SunLink 8.x / Solaris 2.3.  Quoting an anonymous Sun engineer:
  1864.  
  1865.   ... there is now no need to include any X.25 code within kermit.  As of
  1866.   X.25 8.0.1 we support the use of kermit, uucp and similar protocols over
  1867.   devices of type /dev/xty.  This facility was there in 8.0, and should
  1868.   also work on the 8.0 release if patch 101524 is applied, but I'm not 100%
  1869.   sure it will work in all cases, which is why we only claim support from
  1870.   8.0.1 onwards.
  1871.  
  1872.   When configuring X.25, on the "Advanced Configuration->Parameters" screen
  1873.   of the x25tool you can select a number of XTY devices.  If you set this
  1874.   to be > 1, press Apply, and reboot, you will get a number of /dev/xty
  1875.   entries created.
  1876.  
  1877.   Ignore /dev/xty0, it is a special case.  All the others can be used exactly
  1878.   as if they were a serial line (e.g. /dev/tty) connected to a modem, except
  1879.   that instead of using Hayes-style commands, you use PAD commands.
  1880.  
  1881.   From kermit you can do a 'set line' command to, say, /dev/xty1, then set
  1882.   your dialing command to be "CALL 12345678", etc.  All the usual PAD
  1883.   commands will work (SET, PAR, etc).
  1884.  
  1885.   I know of one customer in Australia who is successfully using this, with
  1886.   kermit scripts, to manage some X.25-connected switches. He used standard
  1887.   kermit, compiled for Solaris 2, with X.25 8.0 xty devices.
  1888.  
  1889. C-Kermit can't be compiled successfully under Solaris 2.3 using SUNWspro cc
  1890. 2.0.1 unless at least some of the following patches are applied to cc (it is
  1891. not known which one(s), if any, fix the problem):
  1892.  
  1893.   100935-01 SparcCompiler C 2.0.1: bad code generated when addresses
  1894.     of two double arguments are involved
  1895.   100961-05 SPARCcompilers C 2.0.1: conditional expression with
  1896.     function returning structure gives wrong value
  1897.   100974-01 SparcWorks 2.0.1: dbx jumbo patch
  1898.   101424-01 SPARCworks 2.0.1 maketool SEGV's instantly on Solaris 2.3
  1899.  
  1900. With unpatched cc 2.0.1, the symptom is that certain modules generate
  1901. truncated object files, resulting in many unresolved references at link time.
  1902.  
  1903. Using a Sun workstation keyboard for VT emulation when accessing VMS:
  1904.  
  1905. From: Jerry Leichter <leichter@smarts.com>
  1906. Newsgroups: comp.os.vms
  1907. Subject: Re: VT100 keyboard mapping to Sun X server
  1908. Date: Mon, 19 Aug 1996 12:44:21 -0400
  1909.  
  1910. > I am stuck right now using a Sun keyboard (type 5) on systems running SunOS
  1911. > and Solaris.  I would like to use EVE on an OpenVMS box with display back to
  1912. > the Sun.  Does anyone know of a keyboard mapping (or some other procedure)
  1913. > which will allow the Sun keyboard to approximate a VT100/VT220?
  1914.  
  1915. You can't get it exactly - because the keypad has one fewer key - but
  1916. you can come pretty close.  Here's a set of keydefs I use:
  1917.  
  1918. keycode 101=KP_0
  1919. keycode 119=KP_1
  1920. keycode 120=KP_2
  1921. keycode 121=KP_3
  1922. keycode 98=KP_4
  1923. keycode 99=KP_5
  1924. keycode 100=KP_6
  1925. keycode 75=KP_7
  1926. keycode 76=KP_8
  1927. keycode 77=KP_9
  1928. keycode 52=KP_F1
  1929. keycode 53=KP_F2
  1930. keycode 54=KP_F3
  1931. keycode 57=KP_Decimal
  1932. keycode 28=Left
  1933. keycode 29=Right
  1934. keycode 30=KP_Separator
  1935. keycode 105=KP_F4
  1936. keycode 78=KP_Subtract
  1937. keycode 8=Left
  1938. keycode 10=Right
  1939. keycode 32=Up
  1940. keycode 33=Down
  1941. keycode 97=KP_Enter
  1942.  
  1943. Put this in a file - I use "keydefs" in my home directory and feed it
  1944. into xmodmap:
  1945.  
  1946.   xmodmap - <$HOME/keydefs
  1947.  
  1948. This takes care of the arrow keys and the "calculator" key cluster.  The
  1949. "+" key will play the role of the DEC "," key.    The Sun "-" key will be
  1950. like the DEC "-" key, though it's in a physically different position -
  1951. where the DEC PF4 key is.  The PF4 key is ... damn, I'm not sure where
  1952. "key 105" is.  I *think* it may be on the leftmost key of the group of
  1953. four just above the "calculator" key cluster.
  1954.  
  1955. I also execute the following (this is all in my xinitrc file):
  1956.  
  1957. xmodmap -e 'keysym KP_Decimal = KP_Decimal'
  1958. xmodmap -e 'keysym BackSpace = Delete BackSpace' \
  1959.         -e 'keysym Delete = BackSpace Delete'
  1960. xmodmap -e 'keysym KP_Decimal = Delete Delete KP_Decimal'
  1961. xmodmap -e 'add mod1 = Meta_R'
  1962. xmodmap -e 'add mod1 = Meta_L'
  1963.  
  1964. Beware of one thing about xmodmap:  Keymap changes are applied to the
  1965. *whole workstation*, not just to individual windows.  There is, in fact,
  1966. no way I know of to apply them to individual windows.  These definitions
  1967. *may* confuse some Unix programs (and/or some Unix users).
  1968.  
  1969. If you're using Motif, you may also need to apply bindings at the Motif
  1970. level.  If just using xmodmap doesn't work, I can try and dig that stuff
  1971. up for you.
  1972.  
  1973. (end quote)
  1974.  
  1975.   NOTE: The rest of the problems in this section have to do with bidirectional
  1976.   tty lines and the Solaris Port Monitor.  Hopefully these were all fixed in
  1977.   C-Kermit 6.0.
  1978.  
  1979. Reportedly, "C-Kermit ... causes a SPARCstation running Solaris 2.3
  1980. to panic after the modem connects.  I have tried compiling C-Kermit with Sun's
  1981. unbundled C compiler, with GCC Versions 2.4.5 and 2.5.3, with make targets
  1982. 'sunos51', 'sunos51tcp', 'sunos51gcc', and even 'sys5r4', and each time it
  1983. compiles and starts up cleanly, but without fail, as soon as I dial the number
  1984. and get a 'CONNECT' message from the modem, I get:
  1985.  
  1986.   BAD TRAP
  1987.   kermit: Data fault
  1988.   kernel read fault at addr=0x45c, pme=0x0
  1989.   Sync Error Reg 80 <INVALID>
  1990.   ...
  1991.   panic: Data Fault.
  1992.   ...
  1993.   Rebooting...
  1994.  
  1995. The same modem works fine for UUCP/tip calling."  Also (reportedly), this only
  1996. happens if the dialout port is configured as in/out via admintool.  If it is
  1997. configured as out-only, no problem.  This is the same dialing code that works
  1998. on hundreds of other System-V based UNIX OS's.  Since it should be impossible
  1999. for a user program to crash the operating system, this problem must be chalked
  2000. up to a Solaris bug.  Even if you SET CARRIER OFF, CONNECT, and dial manually
  2001. by typing ATDTnnnnnnn, the system panics as soon as the modem issues its
  2002. CONNECT message.  (Clearly, when you are dialing manually, C-Kermit does not
  2003. know a thing about the CONNECT message, and so the panic is almost certainly
  2004. caused by the transition of the Carrier Detect (CD) line from off to on.)
  2005. This problem was reported by many users, all of whom say that C-Kermit worked
  2006. fine on Solaris 2.1 and 2.2.  If the speculation about CD is true, then a
  2007. possible workaround might be to configure the modem to leave CD on (or off)
  2008. all the time.  Perhaps by the time you read this, a patch will have been
  2009. issued for Solaris 2.3.
  2010.  
  2011. The following is from Karl S. Marsh, Systems & Networks Administrator,
  2012. AMBIX Systems Corp, Rochester, NY (begin quote):
  2013.  
  2014. "Environment:
  2015.   Solaris 2.3 Patch 101318-45
  2016.   C-Kermit 5A(189) (and presumably this applies to 188 and 190 also)
  2017.   eeprom setting:
  2018.     ttya-rts-dtr-off=false
  2019.     ttya-ignore-cd=false
  2020.     ttya-mode=19200,8,n,8,-
  2021.  
  2022. "To use C-Kermit on a bidirectional port in this environment, do not use
  2023. admintool to configure the port.  Use admintool to delete any services running
  2024. on the port and then quit admintool and issue the following command:
  2025.  
  2026.   pmadm -a -p zsmon -s ttyb -i root -fu -v 1 -m "`ttyadm -b -d /dev/term/b \
  2027.   -l conttyH -m ldterm,ttcompat -s /usr/bin/login -S n`"
  2028.  
  2029. [NOTE: This was copied from a fax, so please check it carefully]  where:
  2030.  
  2031.   -a = Add service
  2032.   -p = pmtag (zsmon)
  2033.   -s = service tag (ttyb)
  2034.   -i = id to be associated with service tag (root)
  2035.   -fu = create utmp entry
  2036.   -v = version of ttyadm
  2037.   -m = port monitor-specific portion of the port monitor administrative file
  2038.        entry for the service
  2039.   -b = set up port for bidirectional use
  2040.   -d = full path name of device
  2041.   -l = which ttylabel in the /etc/ttydefs file to use
  2042.   -m = a list of pushable STREAMS modules
  2043.   -s = pathname of service to be invoked when connection request received
  2044.   -S = software carrier detect on or off (n = off)
  2045.  
  2046. "This is exactly how I was able to get Kermit to work on a bi-directional
  2047. port without crashing the system."  (End quote)
  2048.  
  2049. On the Solaris problem, also see SunSolve Bug ID 1150457 ("Using C-Kermit, get
  2050. Bad Trap on receiving prompt from remote system").  Another user reported "So,
  2051. I have communicated with the Sun tech support person that submitted this bug
  2052. report [1150457].  Apparently, this bug was fixed under one of the jumbo
  2053. kernel patches.  It would seem that the fix did not live on into 101318-45, as
  2054. this is EXACTLY the error that I see when I attempt to use kermit on my
  2055. system."
  2056.  
  2057. Later (Aug 94)...  C-Kermit dialout successfully tested on a Sun4m with a
  2058. heavily patched Solaris 2.3.  The patches most likely to have been relevant:
  2059.  
  2060. 101318-50: SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)
  2061. 101720-01: SunOS 5.3: ttymon - prompt not always visible on a modem connection
  2062. 101815-01: SunOS 5.3: Data fault in put() NULL queue passed from
  2063.                       ttycommon_qfull()
  2064. 101328-01: SunOS 5.3: Automation script to properly setup tty ports prior to
  2065.                       PCTS execution
  2066.  
  2067. Still later (Nov 94): another user (Bo Kullmar in Sweden) reports that after
  2068. using C-Kermit to dial out on a bidirectional port, the port might not answer
  2069. subsequent incoming calls, and says "the problem is easy enough to fix with
  2070. the Serial Port Manager; I just delete the service and install it again using
  2071. the graphical interface, which underneath uses commands like sacadm and
  2072. pmadm."  Later Bo reports, "I have found that if I run Kermit with the
  2073. following script then it works.  This script is for /dev/cua/a, -s a is the
  2074. last a in /dev/cua/a
  2075.  
  2076.   #! /bin/sh
  2077.   kermit
  2078.   sleep 2
  2079.   surun pmadm -e -p zsmon -s a
  2080.  
  2081. (end quote)
  2082.  
  2083. (3.8) C-KERMIT AND SUNOS
  2084.  
  2085. For additional information, see "Celeste's Tutorial on SunOS 4.1.3+ Modems
  2086. and Terminals":
  2087.  
  2088.   http://www.stokely.com/
  2089.  
  2090. For FAQs, etc, from Sun, see:
  2091.   http://access1.sun.com/
  2092.  
  2093. Sun SPARCstation users should read the section "Setting up Modem Software" in
  2094. the Desktop SPARC Sun System & Network Manager's Guide.  If you don't set up
  2095. your serial ports correctly, Kermit (and other communications software) won't
  2096. work right.
  2097.  
  2098. Also, on certain Sun models like IPC, the serial port hardware might need to
  2099. have a jumper changed to make it an RS-232 port rather than RS-423.
  2100.  
  2101. Reportedly, C-Kermit does not work correctly on a Sun SPARCstation in an Open
  2102. Windows window with scrolling enabled.  Disable scrolling, or else invoke
  2103. Kermit in a terminal emulation window (xterm, crttool, vttool) under SunView
  2104. (this might be fixed in later SunOS releases).
  2105.  
  2106. On the Sun with Open Windows, an additional symptom has been reported:
  2107. outbound SunLink X.25 connections "magically" translate CR typed at the
  2108. keyboard into LF before transmission to the remote host.  This doesn't happen
  2109. under SunView.
  2110.  
  2111. SET CARRIER ON, when used on the SunOS 4.1 version of C-Kermit (compiled in
  2112. the BSD universe), causes the program to hang uninterruptibly when SET LINE
  2113. is issued for a device that is not asserting carrier.  When Kermit is built
  2114. in the Sys V universe on the same computer, there is no problem (it can be
  2115. interrupted with Ctrl-C).  This is apparently a limitation of the BSD-style
  2116. tty driver.
  2117.  
  2118. SunOS 4.1 C-Kermit has been observed to dump core when running a complicated
  2119. script program under cron.  The dump invariably occurs in ttoc(), while trying
  2120. to output a character to a TCP/IP TELNET connection.  ttoc() contains a
  2121. write() call, and when the system or the network is very busy, the write()
  2122. call can get stuck for long periods of time.  To break out of deadlocks caused
  2123. by stuck write() calls, there is an alarm around the write().  It is possible
  2124. that the core dump occurs when this alarm signal is caught.  (This one has
  2125. not been observed recently -- possibly fixed in edit 190.)
  2126.  
  2127. On Sun computers with SunOS 4.0 or 4.1, SET FLOW RTS/CTS works only if the
  2128. carrier signal is present from the communication device at the time when
  2129. C-Kermit enters packet mode or CONNECT mode.  If carrier is not sensed (e.g.
  2130. when dialing), C-Kermit does not attempt to turn on RTS/CTS flow control.
  2131. This is because the SunOS serial device driver does not allow characters to
  2132. be output if RTS/CTS is set (CRTSCTS) but carrier (and DSR) are not present.
  2133. Workaround (maybe):  SET CARRIER OFF before giving the SET LINE command,
  2134. establish the connection, then SET FLOW RTS/CTS
  2135.  
  2136. It has also been reported that RTS/CTS flow control under SunOS 4.1 through
  2137. 4.1.3 works only on INPUT, not on output, and that there is a patch from Sun
  2138. to correct this problem: Patch-ID# T100513-04, 20 July 1993 (this patch might
  2139. apply only to SunOS 4.1.3).  It might also be necessary to configure the
  2140. eeprom parameters of the serial port; e.g. do the following as root at the
  2141. shell prompt:
  2142.  
  2143.   eeprom  ttya-ignore-cd=false
  2144.   eeprom  ttya-rts-dtr-off=true
  2145.  
  2146. There have been reports of file transfer failures on Sun-3 systems when using
  2147. long packets and/or large window sizes.  One user says that when this happens,
  2148. the console issues many copies of this message:
  2149.  
  2150.   chaos vmunix: zs1: ring buffer overflow
  2151.  
  2152. This means that SunOS is not scheduling Kermit frequently enough to service
  2153. interrupts from the zs serial device (Zilog 8350 SCC serial communication
  2154. port) before its input silo overflows.  Workaround: use smaller packets
  2155. and/or a smaller window size, or use "nice" to increase Kermit's priority.
  2156. Use hardware flow control if available, or remove other active processes
  2157. before running Kermit.
  2158.  
  2159. SunLink X.25 support in C-Kermit 5A(190) has been built and tested
  2160. successfully under SunOS 4.1.3b and SunLink X.25 7.00.
  2161.  
  2162. (3.9) C-KERMIT AND ULTRIX
  2163.  
  2164. See also: The comp.unix.ultrix and comp.sys.dec newsgroups.
  2165.  
  2166. There is no hardware flow control in Ultrix.  That's not a Kermit deficiency,
  2167. but an Ultrix one.
  2168.  
  2169. When sending files to C-Kermit on a Telnet connection to a remote Ultrix
  2170. system, you must SET PREFIXING ALL (or at least prefix more control characters
  2171. than are selected by SET PREFIXING CAUTIOUS).
  2172.  
  2173. Reportedly, DEC ULTRIX 4.3 is immune to C-Kermit's disabling of SIGQUIT,
  2174. which is the signal that is generated when the user types Ctrl-\, which kills
  2175. the current process (i.e. C-Kermit) and dumps core.  Diagnosis and cure
  2176. unknown.  Workaround: before starting C-Kermit -- or for that matter, when you
  2177. first log in because this applies to all processes, not just Kermit -- give
  2178. the following UNIX command:
  2179.  
  2180.   stty quit undef
  2181.  
  2182. Certain operations driven by RS-232 modem signal do not work on DECstations or
  2183. other DEC platforms whose serial interfaces use MMP connectors (DEC version of
  2184. RJ45 telephone jack with offset tab).  These connectors convey only the DSR
  2185. and DTR modem signals, but not carrier (CD), RTS, CTS, or RI.  Use SET CARRIER
  2186. OFF to enable communication, or "hotwire" DSR to CD.
  2187.  
  2188. The maximum serial speed on the DECstation 5000 is normally 19200, but various
  2189. tricks are available (outside Kermit) to enable higher rates.  For example, on
  2190. the 5000/200, 19200 can be remapped (somehow, something to do with "a bit in
  2191. the SIR", whatever that is) to 38400, but in software you must still refer to
  2192. this speed as 19200; you can't have 19200 and 38400 available at the same time.
  2193.  
  2194. 19200, reportedly, is also the highest speed supported by Ultrix, but NetBSD
  2195. reportedly supports speeds up to 57600 on the DECstation, although whether and
  2196. how well this works is another question.
  2197.  
  2198. In any case, given the lack of hardware flow control in Ultrix, high serial
  2199. speeds are problematic at best.
  2200.  
  2201. (3.10) C-KERMIT AND UNIXWARE
  2202.  
  2203. See also:
  2204.   comp.unix.unixware.misc
  2205.   comp.unix.sco.misc
  2206.  
  2207. Also see general comments on PC-based UNIXes in Section 3.0.
  2208.  
  2209. Note that in Unixware 2.0 and later, the preferred serial device names
  2210. (drivers) are /dev/term/00 (etc), rather than /dev/tty00 (etc).
  2211.  
  2212. Also note the following correspondence of device names and driver
  2213. characteristics:
  2214.  
  2215.   New name       Old name     Description
  2216.   /dev/term/00   /dev/tty00   ???
  2217.   /dev/term/00h  /dev/tty00h  Modem signals and hardware flow control
  2218.   /dev/term/00m  /dev/tty00m  Modem signals(?)
  2219.   /dev/term/00s  /dev/tty00s  Modem signals and software flow control
  2220.   /dev/term/00t  /dev/tty00t  ???
  2221.  
  2222. Lockfile names use device inode.major.minor numbers, e.g.:
  2223.  
  2224.   /var/spool/locks/LK.7679.003.005
  2225.  
  2226. The minor number varies according to the device name suffix (none, h, m, s,
  2227. or t).  Only the inode and major number are compared, and thus all of
  2228. the different names for the same physical device (e.g. all of those shown
  2229. in the table above) interlock effectively.
  2230.  
  2231. Prior to UnixWare 7, serial speeds higher than 38400 are not supported.  In
  2232. UnixWare 7, we also support 57600 and 115200, plus some unexpected ones like
  2233. 14400, 28800, and 76800, by virtue of a strange new interface, evidently
  2234. peculiar to UnixWare 7, discovered while digging through the header files:
  2235. tcsetspeed().  Access to this interface is allowed only in POSIX builds, and
  2236. thus the UnixWare 7 version of C-Kermit is POSIX-based, unlike C-Kermit for
  2237. Unixware 1.x and 2.x (since the earlier UnixWare versions did not support high
  2238. serial speeds, period).
  2239.  
  2240. HOWEVER, turning on POSIX features engages all of the "#if (!_POSIX_SOURCE)"
  2241. clauses in the UnixWare header files, which in turn prevent us from having
  2242. modem signals, access to the hardware flow control APIs, select(), etc -- in
  2243. short, all the other things we need in communications software, especially
  2244. when high speeds are used.  Oh the irony.  And so C-Kermit must be shamelessly
  2245. butchered -- as it has been so many times before -- to allow us to have the
  2246. needed features from the POSIX and non-POSIX worlds.  See the UNIXWAREPOSIX
  2247. sections of ckutio.c.
  2248.  
  2249. Meanwhile the tcsetspeed() function allows any number at all (any long, 0 or
  2250. positive) as an argument and succeeds if the number is a legal bit rate for
  2251. the serial device, and fails otherwise.  There is no list anywhere of legal
  2252. speeds.  Thus the SET SPEED keyword table ("set speed ?" to see it) is
  2253. hardwired based on trial and error with all known serial speeds, the maximum
  2254. being 115200.  However, to allow for the possibility that other speeds might
  2255. be allowed in the future (or with different port drivers), the SET SPEED
  2256. command for UnixWare 7 only allows you to specify any number at all; a warning
  2257. is printed if the number is not in the list, but the number is accepted
  2258. anyway; the command succeeds if tcsetspeed() accepts the number, and fails
  2259. otherwise.
  2260.  
  2261. Old business:
  2262.  
  2263. Using C-Kermit 6.0 on the UnixWare 1.1 Application Server, one user reported
  2264. a system panic when the following script program is executed:
  2265.  
  2266.   set line /dev/tty4
  2267.   set speed 9600
  2268.   output \13
  2269.   connect
  2270.  
  2271. The panic does not happen if a PAUSE is inserted:
  2272.  
  2273.   set line /dev/tty4
  2274.   set speed 9600
  2275.   pause 1
  2276.   output \13
  2277.   connect
  2278.  
  2279. This is using a Stallion EasyIO card installed as board 0 on IRQ 12 on
  2280. a Gateway 386 with the Stallion-supplied driver.  The problem was reported
  2281. to Novell and Stallion and (reportedly) is now fixed.
  2282.  
  2283. (3.11) C-KERMIT AND APOLLO SR10
  2284.  
  2285. Reportedly, version 5A(190), when built under Apollo SR10 using "make
  2286. sr10-bsd", compiles, links, and executes OK, but leaves the terminal unusable
  2287. after it exits -- the "cs7" or "cs8" (character size) parameter has become
  2288. cs5.  The terminal must be reset from another terminal.  Cause and cure
  2289. unknown.  Suggested workaround: Wrap Kermit in a shell script something like:
  2290.  
  2291.   kermit @*
  2292.   stty sane
  2293.  
  2294. (3.12) C-KERMIT AND TANDY XENIX 3.0
  2295.  
  2296. C-Kermit 7.0 is too big to be built on Tandy Xenix, even in a minimum
  2297. configuration; version 6.0 is the last one that fits.  In C-Kermit 6.0:
  2298.  
  2299. Reportedly, if you type lots of Ctrl-C's during execution of the
  2300. initialization file, ghost Kermit processes will be created, and will compete
  2301. for the keyboard.  They can only be removed via "kill -9" from another
  2302. terminal, or by rebooting.  Diagnosis -- something strange happening with
  2303. the SIGINT handler while the process is reading the directory (it seems to
  2304. occur during the SET PROMPT [\v(dir)] ... sequence).  Cure: unknown.
  2305. Workaround: don't interrupt C-Kermit while it is executing its init file on
  2306. the Tandy 16/6000.
  2307.  
  2308. (3.13) C-KERMIT AND OSF/1 (DIGITAL UNIX)
  2309.  
  2310. Before you can use a serial port on a new Digital Unix system, you must run
  2311. uucpsetup to enable or configure the port.  Evidently the /dev/tty00 and 01
  2312. devices that appear in the configuration are not usable; uucpsetup turns them
  2313. into /dev/ttyd00 and 01, which are.  Note that uucpsetup and other uucp-family
  2314. programs are quite primitive -- they only know about speeds up to 9600 bps and
  2315. their selection of modems dates from the early 1980s.  None of this affects
  2316. Kermit, though -- with C-Kermit, you can use speeds up to 115200 bps (at least
  2317. in DU4.0 and later) and modern modems with hardware flow control and all the
  2318. rest.
  2319.  
  2320. Reportedly, if a modem is set for &S0 (assert DSR at all times), the system
  2321. resets or drops DTR every 30 seconds; reportedly DEC says to set &S1.
  2322.  
  2323. Digital UNIX 3.2 evidently wants to believe your terminal is one line longer
  2324. than you say it is, e.g. when a "more" or "man" command is given.  This is has
  2325. nothing to do with C-Kermit, but tends to annoy those who use Kermit or other
  2326. terminal emulators to access Digital UNIX systems.  Workaround: tell UNIX
  2327. to "stty rows 23" (or whatever).
  2328.  
  2329. Reportedly, there is some bizarre behavior when trying to use a version of
  2330. C-Kermit built on Digital Unix 4.0 on another, possibly due to differing
  2331. OS or library revision levels; for example, the inability to connect to
  2332. certain TCP/IP hosts.  Solution: rebuild C-Kermit from source code on the
  2333. system where you will be using it.
  2334.  
  2335. Digital UNIX tgetstr() causes a segmentation fault.  C-Kermit 7.0 includes
  2336. #ifdefs to avoid calling this routine in Digital UNIX.  As a result, the
  2337. SCREEN commands always send ANSI escape sequences -- even though curses knows
  2338. your actual terminal type.
  2339.  
  2340. (3.14) C-KERMIT AND SGI IRIX
  2341.  
  2342. See also:
  2343.   The comp.sys.sgi.misc and .admin newsgroups.
  2344.   The SGI FAQ:
  2345.     http://www-viz.tamu.edu/~sgi-faq/
  2346.     ftp://viz.tamu.edu/pub/sgi/faq/
  2347.  
  2348. About IRIX version numbers: "uname -a" tells the "two-digit" version number,
  2349. such as "5.3" or "6.5".  The three-digit form can be seen with "uname -R".
  2350. (this information is unavailable at the simple API level).  Supposedly all
  2351. three-digit versions within the same two-digit version (e.g. 6.5.2, 6.5.3) are
  2352. binary compatible; i.e. a binary built on any one of them should run on all
  2353. others.  The "m" suffix denotes just patches; the "f" suffix indicates that
  2354. features were added.
  2355.  
  2356. SGI did not supply an API for hardware flow control prior to IRIX 5.2.
  2357. C-Kermit 6.1 and higher for IRIX 5.2 and higher supports hardware flow control
  2358. in the normal way, via "set flow rts/cts".
  2359.  
  2360. For hardware flow control on earlier IRIX and/or C-Kermit versions, use the
  2361. ttyf* (modem control AND hardware flow control) devices and not the ttyd*
  2362. (direct) or ttym* (modem control but no hardware flow control) ones, and
  2363. obtain the proper "hardware handshaking" cable from SGI, which is incompatible
  2364. with the ones for the Macintosh and NeXT even though they look the same.  "man
  2365. serial" for further info.
  2366.  
  2367. Serial speeds higher than 38400 are available in IRIX 6.2 and later, on
  2368. O-class machines (e.g. Origin, Octane) only, and are supported by C-Kermit 6.1
  2369. and later.  Commands such as "set speed 115200" may be given on other models
  2370. (e.g. Iris, Indy, Indigo) but will fail because the OS reports an invalid
  2371. speed for the device.
  2372.  
  2373. Experimentation with both IRIX 5.3 and 6.2 shows that when logged in to IRIX
  2374. via Telnet, that remote-mode C-Kermit can't send files if the packet length is
  2375. greater than 4096; the Telnet server evidently has this restriction (or bug),
  2376. since there is no problem sending long packets on serial or rlogin
  2377. connections.  However, it can receive files with no problem if the packet
  2378. length is greater than 4096.  As a workaround, the FAST macro for IRIX
  2379. includes "set send packet-length 4000".  IRIX 6.5.1 does not have this
  2380. problem, so evidently it was fixed some time after IRIX 6.2.  Tests show
  2381. file-transfer speeds are better (not worse) with 8K packets than with 4K
  2382. packets from IRIX 6.5.1.
  2383.  
  2384. Reportedly some Indys have bad serial port hardware.  IRIX 5.2, for example,
  2385. needs patch 151 to work around this; or upgrade to a later release.
  2386. Similarly, IRIX 5.2 has several problems with serial i/o, flow control, etc.
  2387. Again, patch or upgrade.
  2388.  
  2389. Reportedly on Silicon Graphics (SGI) machines with IRIX 4.0, Kermit cannot be
  2390. suspended by typing the suspend ("swtch") character if it was started from
  2391. csh, even though other programs can be suspended this way, and even though the
  2392. Z and SUSPEND commands still work correctly.  This is evidently because IRIX's
  2393. csh does not deliver the SIGTSTP signal to Kermit.  The reason other programs
  2394. can be suspended in the same environment is probably that they do not trap
  2395. SIGTSTP themselves, so the shell is doing the suspending rather than the
  2396. application.
  2397.  
  2398. Also see notes about IRIX 3.x in ckcuins.txt.
  2399.  
  2400. (3.15) C-KERMIT AND THE BEBOX
  2401.  
  2402. See also: The comp.sys.be newsgroup.
  2403.  
  2404. The BeBox has been discontinued and BeOS repositioned for PC platforms.
  2405. The POSIX parts of BeOS are not finished, nor is the sockets library,
  2406. therefore a fully functional version of C-Kermit is not possible.
  2407. In version 6.0 of C-Kermit, written for BeOS DR7, it was possible to:
  2408.  
  2409.   - set line /dev/serial2 (and probably the other serial ports)
  2410.   - set speed 115200 (and at least some of the lower baud rates)
  2411.   - connect
  2412.   - set modem type hayes (and likely others, too)
  2413.   - dial [phone number]
  2414.   - set send packet length 2048 (other lengths for both send and receive)
  2415.   - set receive packet length 2048
  2416.   - set file type binary (text mode works, too)
  2417.     (with remote kermit session in server mode)
  2418.   - put bedrop.jpg
  2419.   - get bedrop.jpg
  2420.   - get bedrop.jpg bedrop.jpg2
  2421.   - finish, bye
  2422.  
  2423. The following do not work:
  2424.   - kermit does not detect modem hangup
  2425.   - !/RUN/PUSH [commandline command]
  2426.   - running kermit in remote mode
  2427.   - using other protocols (x/y/zmodem)
  2428.   - TCP networking interface (Be's TCP/IP API has a ways to go, still)
  2429.  
  2430. C-Kermit does not work on BeOS DR8 because of changes in the underlying APIs.
  2431. Unfortunately not enough changes were made to allow the regular POSIX-based
  2432. C-Kermit to work either.  Note: the lack of a fork() service requires the
  2433. select()-based CONNECT module, but there is no select().  There is a select()
  2434. in DR8, but it doesn't work.
  2435.  
  2436. C-Kermit 7.0 has been built for BeOS 4.5 and it works in remote mode.
  2437. It does not include networking support since the APIs are still not there.
  2438. It is not known if dialing out works, but probably not.
  2439.  
  2440. (3.16) C-KERMIT AND DG/UX
  2441.  
  2442. Somebody downloaded the C-Kermit 6.0 binary built under DG/UX 5.40 and ran it
  2443. under DG/UX 5.4R3.10 -- it worked OK except that file dates for incoming files
  2444. were all written as 1 Jan 1970.  Cause and cure unknown.  Workaround: SET
  2445. ATTRIBUTE DATE OFF.  Better: Use a version of C-Kermit built under and for
  2446. DG/UX 5.4R3.10.
  2447.  
  2448. (3.17) C-KERMIT AND SEQUENT DYNIX
  2449.  
  2450. Reportedly, when coming into a Sequent UNIX (DYNIX) system through an X.25
  2451. connection, Kermit doesn't work right because the Sequent's FIONREAD ioctl
  2452. returns incorrect data.  To work around, use the 1-character-at-a-time version
  2453. of myread() in ckutio.c (i.e. undefine MYREAD in ckutio.c and rebuild the
  2454. program).  This is unsatisfying because two versions of the program would be
  2455. needed -- one for use over X.25, and the other for serial and TCP/IP
  2456. connections.
  2457.  
  2458. (3.18) C-KERMIT AND {FREE,OPEN,NET}BSD
  2459.  
  2460. Some NebBSD users have reported difficulty escaping back from CONNECT mode,
  2461. usually when running NetBSD on non-PC hardware.  Probably a keyboard issue.
  2462.  
  2463. NetBSD users have also reported that C-Kermit doesn't pop back to the prompt
  2464. if the modem drops carrier.  This needs to be checked out & fixed if possible.
  2465.  
  2466. (All of this seems to work properly in C-Kermit 7.0.)
  2467.  
  2468. (4) GENERAL UNIX-SPECIFIC HINTS, LIMITATIONS, AND BUGS
  2469.  
  2470. In version 6.0, the default C-Kermit prompt includes your current (working)
  2471. directory; for example:
  2472.  
  2473.   [/usr/olga] C-Kermit>
  2474.  
  2475. If that directory is on an NFS-mounted disk, and NFS stops working or the
  2476. disk becomes unavailable, C-Kermit will hang waiting for NFS and/or the disk
  2477. to come back.  Whether you can interrupt C-Kermit when it is hung this way
  2478. depends on the specific OS.  Kermit has called the operating systems's
  2479. getcwd() function, and is waiting for it to return.  Some versions of UNIX
  2480. (e.g. HP-UX 9.x) allow this function to be interrupted with SIGINT (Ctrl-C),
  2481. others (such as HP-UX 8.x) do not.  To avoid this effect, you can always
  2482. use SET PROMPT change your prompt to something that does not involve calling
  2483. getcwd(), but if NFS is not responding, C-Kermit will still hang any time you
  2484. give a command that refers to an NFS-mounted directory.  Also note that in some
  2485. cases, the uninterruptibility of NFS-dependent system or library calls is
  2486. considered a bug, and sometimes there are patches.  For HP-UX, for example:
  2487.  
  2488.                                                         replaced by:
  2489.   HP-UX 10.20     libc    PHCO_8764                     PHCO_14891/PHCO_16723
  2490.   HP-UX 10.10     libc    PHCO_8763                     PHCO_14254/PHCO_16722
  2491.   HP-UX 9.x       libc    PHCO_7747       S700          PHCO_13095
  2492.   HP-UX 9.x       libc    PHCO_6779       S800          PHCO_11162
  2493.  
  2494. You might have reason to make C-Kermit the login shell for a specific user,
  2495. by entering the pathname of Kermit (possibly with command-line switches, such
  2496. as -x to put it in server mode) into the shell field of the /etc/passwd file.
  2497. This works pretty well.  In some cases, for "ultimate security", you might
  2498. want to use a version built with -DNOPUSH (see ckccfg.txt) for this, but even
  2499. if you don't, then PUSHing or shelling out from C-Kermit just brings up a
  2500. new copy of C-Kermit (but warning: this does not prevent the user from
  2501. explicitly running a shell; e.g. "run /bin/sh"; use NOPUSH to prevent this).
  2502.  
  2503. C-Kermit will not work as expected on a remote UNIX system, when used through
  2504. the "splitvt" or GNU "screen" programs.  In this case, terminal connections to
  2505. the remote UNIX system work, but attempts to transfer files fail because the
  2506. screen optimization (or at least, line wrapping, control-character absorption)
  2507. done by this package interferes with Kermit's packets.
  2508.  
  2509. The same can apply to any other environment in which the user's session is
  2510. captured, monitored, recorded, or manipulated.  Examples include the 'script'
  2511. program (for making a typescript of a session), the Computronics PEEK package
  2512. and pksh (at least versions of it prior to 1.9K), and so on.
  2513.  
  2514. You might try the following -- what we call "doomsday Kermit" -- settings to
  2515. push packets through even the densest and most obstructive connections, such
  2516. as "screen" and "splitvt" (and certain kinds of 3270 protocol emulators):
  2517. Give these commands to BOTH Kermit programs:
  2518.  
  2519.   SET FLOW NONE
  2520.   SET CONTROL PREFIX ALL
  2521.   SET RECEIVE PACKET-LENGTH 70
  2522.   SET RECEIVE START 62
  2523.   SET SEND START 62
  2524.   SET SEND PAUSE 100
  2525.   SET BLOCK B
  2526.  
  2527. If it works, it will be slow.
  2528.  
  2529. On UNIX workstations equipped with DOS emulators like SoftPC, watch out for
  2530. what these emulators do to the serial port drivers.  After using a DOS
  2531. emulator, particularly if you use it to run DOS communications software, you
  2532. might have to reconfigure the serial ports for use by UNIX.
  2533.  
  2534. On AT&T 7300 (3B1) machines, you might have to "stty nl1" before starting
  2535. C-Kermit.  Do this if characters are lost during communications operations.
  2536.  
  2537. Under the bash shell (versions prior to 1.07 from CWRU), "pushing" to an
  2538. inferior shell and then exiting back to Kermit leaves Kermit in the background
  2539. such that it must be explicitly fg'd.  This is reportedly fixed in version
  2540. 1.07 of bash.
  2541.  
  2542. Interruption by Ctrl-Z makes UNIX C-Kermit try to suspend itself with
  2543. kill(0,SIGSTOP), but only on systems that support job control, as determined
  2544. by whether the symbol SIGTSTP is defined (or on POSIX or SVR4 systems, if
  2545. syconf(_SC_JOB_CONTROL) or _POSIX_JOB_CONTROL in addition to SIGTSTP).
  2546. However, if Kermit is running under a login shell (such as the original Bourne
  2547. shell) that does not support job control, the user's session hangs and must be
  2548. logged out from another terminal, or hung up on.  There is no way Kermit can
  2549. defend itself against this.  If you use a non-job control shell on a computer
  2550. that supports job control, give a command like "stty susp undef" to fix it so
  2551. the suspend signal is not attached to any particular key, or give the command
  2552. SET SUSPEND OFF to C-Kermit, or build C-Kermit with -DNOJC.
  2553.  
  2554. Reportedly, the UNIX C-Kermit server, under some conditions, on certain
  2555. particular systems, fails to log out its login session upon receipt of a
  2556. BYE command.  Before relying on the BYE command working, test it a few times
  2557. to make sure it works on your system: there might be system configuration or
  2558. security mechanisms to prevent an inferior process (like Kermit) from
  2559. killing a superior one (like the login shell).
  2560.  
  2561. (5) INITIALIZATION AND COMMAND FILES
  2562.  
  2563. C-Kermit's initialization file for UNIX is .kermrc (lowercase, starts with
  2564. period) in your home directory, unless Kermit was built with the system-wide
  2565. initialization-file option (see ckuins.txt).
  2566.  
  2567. C-Kermit identifies your home directory based on the environment variable,
  2568. HOME.  Most UNIX systems set this variable automatically when you log in.  If
  2569. C-Kermit can't find your initialization file, check your HOME variable:
  2570.  
  2571.   echo $HOME      (at the UNIX prompt)
  2572.  
  2573. or:
  2574.  
  2575.   echo \$(HOME)   (at the C-Kermit prompt)
  2576.  
  2577. If HOME is not defined, or is defined incorrectly, add the appropriate
  2578. definition to your UNIX .profile or .login file, depending on your shell:
  2579.  
  2580.   setenv HOME full-pathname-of-your-home-directory  (C-Shell, .login file)
  2581. or:
  2582.   HOME=full-pathname-of-your-home-directory         (sh, ksh, .profile file)
  2583.   export HOME
  2584.  
  2585. NOTE: Various other operations depend on the correct definition of HOME.
  2586. These include the "tilde-expansion" feature, which allows you to refer to
  2587. your home directory as "~" in filenames used in C-Kermit commands, e.g.
  2588.  
  2589.   send ~/.kermrc
  2590.  
  2591. as well as the \v(home) variable.
  2592.  
  2593. Prior to version 5A(190), C-Kermit would look for its initialization file in
  2594. the current directory if it was not found in the home directory.  This feature
  2595. was removed from 5A(190) because it was a security risk.  Some people, however,
  2596. liked this behavior and had .kermrc files in all their directories that would
  2597. set up things appropriately for the files therein.  If you want this behavior,
  2598. you can accomplish it in various ways, for example:
  2599.  
  2600.  . Create a shell alias, for example:
  2601.    alias kd="kermit -Y ./.kermrc"
  2602.  
  2603.  . Create a .kermrc file in your home directory, whose contents are:
  2604.    take ./.kermrc
  2605.  
  2606. The TAKE command does not search your UNIX PATH for command files.  If a
  2607. command file is not in the current directory, you must give a full path
  2608. specification for it.  This poses a problem for TAKE commands that are
  2609. themselves in TAKE files.  See the trick used in CKETEST.INI...
  2610.  
  2611. Suppose you need to pass a password from the UNIX command line to a C-Kermit
  2612. script program, in such a way that it does not show up in "ps" or "w" listings.
  2613. Here is a method (not guaranteed to be 100% secure, but definitely more secure
  2614. than the more obvious methods):
  2615.  
  2616.   echo mypassword | kermit myscript
  2617.  
  2618. The "myscript" file contains all the commands that need to be executed during
  2619. the Kermit session, up to and including EXIT, and also includes an ASK or ASKQ
  2620. command to read the password from standard input, which has been piped in from
  2621. the UNIX 'echo' command, but it must not include a CONNECT command.  Only
  2622. "kermit myscript" shows up in the ps listing.
  2623.  
  2624. (6) COMMUNICATION SPEED SELECTION
  2625.  
  2626. Version-7 based UNIX implementations, including 4.3 BSD and earlier and UNIX
  2627. systems based upon BSD, use a 4-bit field to record a serial device's terminal
  2628. speed.  This leaves room for 16 speeds, of which the first 14 are normally:
  2629.  
  2630.   0, 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 4800, and 9600
  2631.  
  2632. The remaining two are usually called EXTA and EXTB, and are defined by the
  2633. particular UNIX implementation.  C-Kermit determines which speeds are
  2634. available on your system based on whether symbols for them are defined in your
  2635. terminal device header files.  EXTA is generally assumed to be 19200 and EXTB
  2636. 38400, but these assumptions might be wrong, or they might not apply to a
  2637. particular device that does not support these speeds.  Presumably, if you try
  2638. to set a speed that is not legal on a particular device, the driver will
  2639. return an error, but this can not be guaranteed.
  2640.  
  2641. On these systems, it is usually not possible to select a speed of 14400 bps
  2642. for use with V.32bis modems.  In that case, use 19200 or 38400 bps, configure
  2643. your modem to lock its interface speed and to use RTS/CTS flow control, and
  2644. tell C-Kermit to SET FLOW RTS/CTS and SET DIAL SPEED-MATCHING OFF.
  2645.  
  2646. The situation is similar, but different, in System V.  SVID Third Edition
  2647. lists the same speeds, 0 through 38400.
  2648.  
  2649. Some versions of UNIX, and/or terminal device drivers that come with
  2650. certain third-party add-in high-speed serial communication interfaces, use the
  2651. low "baud rates" to stand for higher ones.  For example, SET SPEED 50 gets you
  2652. 57600 bps; SET SPEED 75 gets you 76800; SET SPEED 110 gets 115200.
  2653.  
  2654. SCO ODT 3.0 is an example where a "baud-rate-table patch" can be applied that
  2655. can rotate the tty driver baud rate table such that 600=57600 and 1800=115k
  2656. baud.   Similarly for Digiboard multiport/portservers, which have a
  2657. "fastbaud" setting that does this.  Linux has a "setserial" command that can
  2658. do it, etc.
  2659.  
  2660. More modern UNIXes support POSIX-based speed setting, in which the selection
  2661. of speeds is not limited by a 4-bit field.  C-Kermit 6.1 incorporates a new
  2662. mechanism for finding out (at compile time) which serial speeds are supported
  2663. by the operating system that does not involve editing of source code by hand;
  2664. on systems like Solaris 5.1, IRIX 6.2, and SCO OSR5.0.4, "set speed ?" will
  2665. list speeds up to 460800 or 921600.  In C-Kermit 7.0:
  2666.  
  2667.  1. If a symbol for a particular speed (say B230400 for 230400 bps) appears
  2668.     in whatever header file defines acceptable serial speeds (e.g. <termbits.h>
  2669.     or <sys/termios.h> or <sys/ttydev.h>, etc), the corresponding speed will
  2670.     appear in C-Kermit's "set speed ?" list.
  2671.  
  2672.  2. The fact that a given speed is listed in the header files and appears in
  2673.     C-Kermit's list does not mean the driver will accept it.  For example,
  2674.     a computer might have some standard serial ports plus some add-on ones
  2675.     with different drivers that accept a different repertoire of speeds.
  2676.  
  2677.  3. The fact that a given speed is accepted by the driver does not guarantee
  2678.     the underlying hardware can accept it.
  2679.  
  2680. When Kermit is given a "set speed" command for a particular device, the
  2681. underlying system service is called to set the speed; its return code is
  2682. checked and the SET SPEED command fails if the return code indicates failure.
  2683. Regardless of the system service return status, the device's speed is then
  2684. read back and if it does not match the speed that was requested, an error
  2685. message is printed and the command fails.
  2686.  
  2687. Even when the command succeeds, this does not guarantee successful operation
  2688. at a particular speed, especially a high one.  That depends on electricity,
  2689. information theory, etc.  How long is the cable, what is its capacitance, how
  2690. well is it shielded, etc, not to mention that every connection has two ends
  2691. and its success depends on both of them.  (With the obvious caveats about
  2692. internal modems, is the cable really connected, interrupt conflicts, etc etc
  2693. etc).
  2694.  
  2695. Note, in particular, that there is a certain threshold above which modems can
  2696. not "autobaud" -- i.e. detect the serial interface speed when you type AT (or
  2697. whatever else the modem's recognition sequence might be).  Such modems need to
  2698. be engaged at a lower speed (say 2400 or 9600 or even 115200 -- any speed
  2699. below their autobaud threshold) and then must be given a modem-specific
  2700. command (which can be found in the modem manual) to change their interface
  2701. speed to the desired higher speed, and then the software must also be told to
  2702. change to the new, higher speed.
  2703.  
  2704. For additional information, read the section TERMINAL SPEEDS in ckuins.txt,
  2705. plus any platform-specific notes in Section (3) above.
  2706.  
  2707. (7) COMMUNICATIONS AND DIALING
  2708.  
  2709. If you SET LINE to a serial port modem-control device that has nothing plugged
  2710. in to it, or has a modem connected that is powered off, and you have not given
  2711. a prior SET MODEM TYPE or SET CARRIER-WATCH OFF command, the SET LINE command
  2712. is likely to hang.  In most cases, you can Ctrl-C out.  If not, you'll have to
  2713. kill C-Kermit from another terminal.
  2714.  
  2715. Similarly, if you give a SET MODEM TYPE HAYES (or USR, or any other modem type
  2716. besides DIRECT, NONE, or UNKNOWN) and then SET LINE to an empty port, the
  2717. subsequent close (implicit or explicit) is liable to hang or even crash
  2718. (through no fault of Kermit's -- the hanging or crashing is inside a system
  2719. call such as cfsetospeed() or close()).
  2720.  
  2721. The SET CARRIER-WATCH command works as advertised only if the underlying
  2722. operating system and device drivers support this feature; in particular only
  2723. if a read() operation returns immediately with an error code if the carrier
  2724. signal goes away or, failing that, if C-Kermit can obtain the modem signals
  2725. from the device driver (you can tell by giving a "set line" command to a
  2726. serial device, and then a "show communications" command -- if modem signals
  2727. are not listed, C-Kermit won't be able to detect carrier loss, the WAIT
  2728. command will not work, etc).  Of course, the device itself (e.g. modem) must
  2729. be configured appropriately and the cables convey the carrier and other needed
  2730. signals, etc.
  2731.  
  2732. If you dial out from UNIX system, but then notice a lot of weird character
  2733. strings being stuck into your session at random times (especially if they look
  2734. like +++ATQ0H0 or login banners or prompts), that means that getty is also
  2735. trying to control the same device.  You'll need to dial out on a device that
  2736. is not waiting for a login, or else disable getty on the device.
  2737.  
  2738. In version 7.0, C-Kermit makes a lot of explicit checks for the Carrier Detect
  2739. signal, and so catches hung-up connections much better than 6.0 and earlier.
  2740. However, it still can not be guaranteed to catch every ever CD on-to-off
  2741. transition.  For example, when the HP-UX version of C-Kermit is in CONNECT
  2742. mode on a dialed connection and CARRIER-WATCH ON or AUTO, and you turn off
  2743. the modem, HP-UX is stuck in a read() that never returns.  (C-Kermit does not
  2744. pop back to its prompt automatically, but you can still escape back.)
  2745.  
  2746. If, on the other hand, you log out from the remote system, and it hangs up,
  2747. and CD drops on the local modem, C-Kermit detects this and pops back to the
  2748. prompt as it should.  (Evidently there can be a difference between CD and DSR
  2749. turning off at the same time, versus CD turning off while DSR stays on;
  2750. experimentation with &S0/&S1/&S2 on your modem might produce the desired
  2751. results).
  2752.  
  2753. When UNIX C-Kermit exits, it closes (and must close) the communications
  2754. device.  If you were dialed out, this will most likely hang up the connection.
  2755. If you want to get out of Kermit and still use Kermit's communication device,
  2756. you have several choices:
  2757.  
  2758.  1. Shell out from Kermit or suspend Kermit, and refer to the device literally
  2759.     (as in "term -blah -blah < /dev/cua > /dev/cua").
  2760.  
  2761.  2. Shell out from Kermit and use the device's file descriptor which Kermit
  2762.     makes available to you in the \v(ttyfd) variable.
  2763.  
  2764.  3. Use C-Kermit's REDIRECT command.  See the ckermit2.txt file about this.
  2765.  
  2766.  4. Use C-Kermit new EXEC /REDIRECT command, also described in ckermit2.txt.
  2767.  
  2768. If you are having trouble dialing:
  2769.  
  2770.  1. Make sure the dialout line is configured correctly.  More
  2771.     about this below.
  2772.  
  2773.  2. Make sure all necessary patches are installed for your operating
  2774.     system.
  2775.  
  2776.  3. If you can't dial on a "bidirectional" line, then configure it for
  2777.     outbound-only (remove the getty) and try again.  (The mechanisms -- if
  2778.     any -- for grabbing bidirectional lines for dialout vary wildly
  2779.     among UNIX implementations and releases, and C-Kermit -- which runs on
  2780.     well over 300 different UNIX variations -- makes no effort to keep up
  2781.     with them; the recommended method for coping with this situation is to
  2782.     wrap C-Kermit in a shell script that takes the appropriate actions.)
  2783.  
  2784.  4. Make sure C-Kermit's SET DIAL and SET MODEM parameters agree with the
  2785.     modem you are actually using -- pay particular attention to SET DIAL
  2786.     SPEED-MATCHING.
  2787.  
  2788.  5. Try SET DIAL HANGUP OFF before the DIAL command.  Also, SET DIAL DISPLAY
  2789.     ON to watch what's happening.  See section 8 of ckuins.txt.
  2790.  
  2791.  6. Read pages 50-67 of "Using C-Kermit".
  2792.  
  2793.  7. As a last resort, don't use the DIAL command at all; SET CARRIER OFF and
  2794.     CONNECT to the modem and dial interactively, or write a script program to
  2795.     dial the modem.
  2796.  
  2797. Make sure your dialout line is correctly configured for dialing out (as
  2798. opposed to login).  The method for doing this is different for each kind of
  2799. UNIX system.  Consult your system documentation for configuring lines for
  2800. dialing out (for example, SUN SparcStation IPC users should read the section
  2801. "Setting up Modem Software" in the Desktop SPARC Sun System & Network
  2802. Manager's Guide; HP-9000 workstation users should consult the manual
  2803. "Configuring HP-UX for Peripherals", etc).
  2804.  
  2805. Symptom: DIAL works, but a subsequent CONNECT command does not.  Diagnosis:
  2806. the modem is not asserting Carrier Detect (CD) after the connection is made,
  2807. or the cable does not convey the CD signal.  Cure: Reconfigure the modem,
  2808. replace the cable.  Workaround: SET CARRIER OFF (at least in System-V based
  2809. UNIX versions).
  2810.  
  2811. C-Kermit tries to use the 8th bit for data when parity is NONE, and this
  2812. generally works on real UNIX terminal (tty) devices, but it often does not
  2813. work when the UNIX system is accessed over a network via telnet or rlogin
  2814. protocols, including (in many cases) through terminal servers.  For example,
  2815. an Encore computer with Annex terminal servers only gives a 7-bit path if
  2816. the rlogin protocol is selected in the terminal server but it gives the full
  2817. 8 bits if the proprietary RDP protocol is used.
  2818.  
  2819. If file transfer does not work through a host to which you have rlogin'd,
  2820. use "rlogin -8" rather than "rlogin".  If that doesn't work, tell both Kermit
  2821. programs to "set parity space".
  2822.  
  2823. The Encore TELNET server does not allow long bursts of input.  When you have
  2824. a TELNET connection to an Encore, tell C-Kermit on the Encore to SET RECEIVE
  2825. PACKET-LENGTH 200 or thereabouts.
  2826.  
  2827. For Berkeley-UNIX-based systems (4.3BSD and earlier), Kermit includes code to
  2828. use LPASS8 mode when parity is none, which is supposed to allow 8-bit data and
  2829. Xon/Xoff flow control at the same time.  However, as of edit 174, this code is
  2830. entirely disabled because it is unreliable: even though the host operating
  2831. system might (or might not) support LPASS8 mode correctly, the host access
  2832. protocols (terminal servers, telnet, rlogin, etc) generally have no way of
  2833. finding out about it and therefore render it ineffective, causing file
  2834. transfer failures.  So as of edit 174, Kermit once again uses rawmode for
  2835. 8-bit data, and so there is no Xon/Xoff flow control during file transfer or
  2836. terminal emulation in the Berkeley-based versions (4.3 and earlier, not 4.4).
  2837.  
  2838. Also on Berkeley-based systems (4.3 and earlier), there is apparently no way
  2839. to configure a dialout line for proper carrier handling, i.e. ignore carrier
  2840. during dialing, require carrier thereafter, get a fatal error on any attempt
  2841. to read from the device after carrier drops (this is handled nicely in System
  2842. V by manipulation of the CLOCAL flag).  The symptom is that carrier loss does
  2843. not make C-Kermit pop back to the prompt automatically.  This is evident on
  2844. the NeXT, for example, but not on SunOS, which supports the CLOCAL flag.  This
  2845. is not a Kermit problem, but a limitation of the underlying operating system.
  2846. For example, the cu program on the NeXT doesn't notice carrier loss either,
  2847. whereas cu on the Sun does.
  2848.  
  2849. On certain AT&T UNIX systems equipped with AT&T modems, DIAL and HANGUP don't
  2850. work right.  Workarounds: (1) SET DIAL HANGUP OFF before attempting to dial;
  2851. (2) If HANGUP doesn't work, SET LINE, and then SET LINE <device> to totally
  2852. close and reopen the device.  If all else fails, SET CARRIER OFF.
  2853.  
  2854. C-Kermit does not contain any particular support for AT&T DataKit devices.
  2855. You can use Kermit software to dial in to a DataKit line, but C-Kermit does
  2856. not contain the specialized code required to dial out from a DataKit line.  If
  2857. the UNIX system is connected to DataKit via serial ports, dialout should work
  2858. normally (e.g. set line /dev/ttym1, set speed 19200, connect, and then see the
  2859. DESTINATION: prompt, from which you can connect to another computer on the
  2860. DataKit network or to an outgoing modem pool, etc).  But if the UNIX system
  2861. is connected to the DataKit network through the special DataKit interface
  2862. board, then SET LINE to a DataKit pseudodevice (such as /dev/dk031t) will not
  2863. work (you must use the DataKit "dk" or "dkcu" program instead).
  2864.  
  2865. In some BSD-based UNIX C-Kermit versions, SET LINE to a port that has nothing
  2866. plugged in to it with SET CARRIER ON will hang the program (as it should), but
  2867. it can't be interrupted with Ctrl-C.  The interrupt trap is correctly armed,
  2868. but apparently the UNIX open() call cannot be interrupted in this case.  When
  2869. SET CARRIER is OFF or AUTO, the SET LINE will eventually return, but then the
  2870. program hangs (uninterruptibly) when the EXIT or QUIT command (or, presumably,
  2871. another SET LINE command) is given.  The latter is probably because of the
  2872. attempt to hang up the modem.  (In edit 169, a timeout alarm was placed around
  2873. this operation.)
  2874.  
  2875. With SET DIAL HANGUP OFF in effect, the DIAL command might work only once,
  2876. but not again on the same device.  In that case, give a SET LINE command
  2877. with no arguments to close the device, and then another SET LINE command for
  2878. the desired device.  Or rebuild your version of Kermit with the -DCLSOPN
  2879. compile-time switch (see ckuins.txt).
  2880.  
  2881. The DIAL command says "To cancel: Type your interrupt character (normally
  2882. Ctrl-C)."  This is just one example of where program messages and
  2883. documentation assume your interrupt character is Ctrl-C.  But it might be
  2884. something else.  In most (but not necessarily all) cases, the character
  2885. referred to is the one that generates the SIGINT signal.  If Ctrl-C doesn't
  2886. act as an interrupt character for you, type the Unix command "stty -a" or
  2887. "stty all" or "stty everything" to see what your interrupt character is.
  2888. (Kermit could be made to find out what the interrupt character is, but this
  2889. would require a lot of system-dependent coding and #ifdefs, and a new routine
  2890. and interface between the system-dependent and system-independent parts of the
  2891. program.)
  2892.  
  2893. In general, the hangup operation on a serial communication device is prone
  2894. to failure.  C-Kermit tries to support many, many different kinds of
  2895. computers, and there seems to be no portable method for hanging up a modem
  2896. connection (i.e. turning off the RS-232 DTR signal and then turning it back on
  2897. again).  If HANGUP, DIAL, and/or Ctrl-\H do not work for you, and you are a
  2898. programmer, look at the tthang() function in ckutio.c and see if you can add
  2899. code to make it work correctly for your system, and send the code to the
  2900. address above.  (NOTE: This problem has been largely sidestepped as of edit
  2901. 188, in which Kermit first attempts to hang up the modem by "escaping back"
  2902. via +++ and then giving the modem's hangup command, e.g. ATH0, when DIAL
  2903. MODEM-HANGUP is ON, which is the default setting.)
  2904.  
  2905. Even when Kermit's modem-control software is configured correctly for your
  2906. computer, it can only work right if your modem is also configured to assert
  2907. the CD signal when it is connected to the remote modem and to hang up the
  2908. connection when your computer drops the DTR signal.  So before deciding Kermit
  2909. doesn't work with your modem, check your modem configuration AND the cable (if
  2910. any) connecting your modem to the computer -- it should be a straight-through
  2911. modem cable conducting the signals FG, SG, TD, RD, RTS, CTS, DSR, DTR, CD,
  2912. and RI.
  2913.  
  2914. Many UNIX systems keep aliases for dialout devices; for example, /dev/acu
  2915. might be an alias for /dev/tty00.  But most of these UNIX systems also use
  2916. UUCP lockfile conventions that do not take this aliasing into account, so if
  2917. one user assigns (e.g.) /dev/acu, then another user can still assign the same
  2918. device by referring to its other name.  This is not a Kermit problem --
  2919. Kermit must follow the lockfile conventions used by the vendor-supplied
  2920. software (cu, tip, uucp).
  2921.  
  2922. The SET FLOW-CONTROL KEEP option should be given *before* any communication
  2923. (dialing, terminal emulation, file transfer, INPUT/OUTPUT/TRANSMIT, etc) is
  2924. attempted, if you want C-Kermit to use all of the device's preexisting
  2925. flow-control related settings.  The default flow-control setting is XON/XOFF,
  2926. and it will take effect when the first communication-related command is given,
  2927. and a subsequent SET FLOW KEEP command will not necessarily know how to
  2928. restore *all* of the device's original flow-control settings.
  2929.  
  2930. (8) HARDWARE FLOW CONTROL
  2931.  
  2932. SET FLOW RTS/CTS is available in UNIX C-Kermit only when the underlying
  2933. operating system provides an Application Program Interface (API) for turning
  2934. this feature on and off under program control, which turns out to be a rather
  2935. rare feature among UNIX systems.  To see if your UNIX C-Kermit version
  2936. supports hardware flow control, type "set flow ?" at the C-Kermit prompt, and
  2937. look for "rts/cts" among the options.  Other common situations include:
  2938.  
  2939.  1. The API is available, so "set flow rts/cts" appears as a valid C-Kermit
  2940.     command, but it doesn't do anything because the device driver (part of
  2941.     the operating system) was never coded to do hardware flow control.  This
  2942.     is common among System V R4 implementations (details below).
  2943.  
  2944.  2. The API is not available, so "set flow rts/cts" does NOT appear as a valid
  2945.     C-Kermit command, but you can still get RTS/CTS flow control by selecting
  2946.     a specially named device in your SET LINE command.  Examples:
  2947.  
  2948.       NeXTSTEP: /dev/cufa instead of /dev/cua, /dev/cufb instead of /dev/cub
  2949.       (68040 only; "man zs" for further info).
  2950.  
  2951.       IRIX: /dev/ttyf2 instead of /dev/ttyd2 or /dev/ttym2 ("man 7 serial").
  2952.  
  2953.  3. The API is available, doesn't work, but a workaround as in (2) can be used.
  2954.  
  2955.  4. The API is available, but Kermit doesn't know about it.  In these cases,
  2956.     you can usually use an stty command to enable RTS/CTS on the device, e.g.
  2957.     "stty crtscts" or "stty ctsflow", "stty rtsflow", before starting Kermit,
  2958.     and then tell Kermit to SET FLOW KEEP.
  2959.  
  2960.  5. No API and no special device drivers.  Hardware flow control is completely
  2961.     unavailable.
  2962.  
  2963. System V R4 based UNIXes are supposed to supply a <termiox.h> file, which
  2964. gives Kermit the necessary interface to command the terminal driver to
  2965. enable/disable hardware flow control.  Unfortunately, but predictably, many
  2966. implementations of SVR4 whimsically place this file in /usr/include/sys rather
  2967. than /usr/include (where SVID clearly specifies it should be; see SVID, Third
  2968. Edition, V1, termiox(BA_DEV).  Thus if you build C-Kermit with any of the
  2969. makefile entries that contain -DTERMIOX or -DSTERMIOX (the latter to select
  2970. <sys/termiox.h>), C-Kermit will have "set flow rts/cts" and possibly other
  2971. hardware flow-control related commands.  BUT...  That does not necessarily
  2972. mean that they will work.  In some cases, the underlying functions are simply
  2973. not coded into the operating system.
  2974.  
  2975. (9) TERMINAL CONNECTION AND KEY MAPPING
  2976.  
  2977. UNIX C-Kermit is not a terminal emulator.  Refer to page 147 of "Using
  2978. C-Kermit", 2nd Edition: "Most versions of C-Kermit -- UNIX, VMS, AOS/VS, VOS,
  2979. etc -- provide terminal connection without emulation.  These versions act as a
  2980. 'semitransparent pipe' between the remote computer and your terminal, terminal
  2981. emulator, console driver, or window, which in turn emulates (or is) a specific
  2982. kind of terminal."  The environment in which you run C-Kermit is up to you.
  2983.  
  2984. If you are an X Windows user, you should be aware of an alternative to xterm
  2985. that supports VT220 emulation, from Thomas E. Dickey:
  2986.  
  2987.   http://www.clark.net/pub/dickey/xterm/xterm.faq.html
  2988.  
  2989. UNIX C-Kermit's SET KEY command currently can not be used with keys that
  2990. generate "wide" scan codes or multibyte sequences, such as workstation
  2991. function or arrow keys, because UNIX C-Kermit does not have direct access to
  2992. the keyboard.
  2993.  
  2994. However, many UNIX workstations and/or console drivers provide their own key
  2995. mapping feature.  With xterm, for example, you can use 'xmodmap' ("man
  2996. xmodmap" for details); here is an xterm mapping to map the Sun keyboard to DEC
  2997. VT200 values for use with VT-terminal oriented applications like VMS EVE:
  2998.  
  2999.   keycode 101=KP_0
  3000.   keycode 119=KP_1
  3001.   keycode 120=KP_2
  3002.   keycode 121=KP_3
  3003.   keycode 98=KP_4
  3004.   keycode 99=KP_5
  3005.   keycode 100=KP_6
  3006.   keycode 75=KP_7
  3007.   keycode 76=KP_8
  3008.   keycode 77=KP_9
  3009.   keycode 52=KP_F1
  3010.   keycode 53=KP_F2
  3011.   keycode 54=KP_F3
  3012.   keycode 57=KP_Decimal
  3013.   keycode 28=Left
  3014.   keycode 29=Right
  3015.   keycode 30=KP_Separator
  3016.   keycode 105=KP_F4
  3017.   keycode 78=KP_Subtract
  3018.   keycode 8=Left
  3019.   keycode 10=Right
  3020.   keycode 32=Up
  3021.   keycode 33=Down
  3022.   keycode 97=KP_Enter
  3023.  
  3024. Users of Linux consoles can use loadkeys ("man dumpkeys loadkeys keytables"
  3025. for details.  The format used by loadkeys is compatible with that used by
  3026. Xmodmap, although it is not definitely certain that the keycodes are
  3027. compatible for different keyboard types (e.g. Sun vs HP vs PC, etc).
  3028.  
  3029. (10) FILE TRANSFER
  3030.  
  3031. Suppose you start C-Kermit with a command-line argument to send or receive a
  3032. file (e.g. "kermit -r") and then type Ctrl-\c immediately afterwards to escape
  3033. back and initiate the other end of the transfer, BUT your local Kermit's
  3034. escape character is not Ctrl-\.  In this case, the local Kermit passes the
  3035. Ctrl-\ to the remote system, and if this is UNIX, Ctrl-\ is likely to be its
  3036. SIGQUIT character, which causes the current program to halt and dump core.
  3037. Well, just about the first thing C-Kermit does when it starts is to disable
  3038. the SIGQUIT signal.  However, it is still possible for SIGQUIT to cause Kermit
  3039. to quit and dump core if it is delivered while Kermit is being loaded or
  3040. started, before the signal can be disabled.  There's nothing Kermit itself can
  3041. do about this, but you can prevent it from happening by disabling SIGQUIT in
  3042. your UNIX session.  The command is usually something like:
  3043.  
  3044.   stty quit undef
  3045.  
  3046. UNIX C-Kermit does not reject incoming files on the basis of size.  There
  3047. appears to be no good (reliable, portable) way to determine in advance how
  3048. much disk space is available, either on the device, or (when quotas or other
  3049. limits are involved) to the user.
  3050.  
  3051. File transfer can fail if the incoming file is bigger than your "ulimit".
  3052. Use the UNIX ulimit command to examine or change your ulimit (the number is
  3053. in 512-byte blocks, i.e. 0.5K).  The exact effect of the ulimit depends on
  3054. the particular UNIX version, and to some extent probably also on the shell.
  3055. "man ulimit" for details, or read the man page for the shell you are using.
  3056.  
  3057. UNIX C-Kermit discards all carriage returns from incoming files when in text
  3058. mode.
  3059.  
  3060. If C-Kermit has problems creating files in writable directories when it is
  3061. installed setuid or setgid on BSD-based versions of UNIX such as NeXTSTEP 3.0,
  3062. it probably needs to be rebuilt with the -DSW_ACC_ID compilation switch (see
  3063. ckuins.txt).
  3064.  
  3065. If C-Kermit is receiving a file on a dialup connection and the connection
  3066. hangs up, the SIGHUP signal is delivered to the top-level shell, which kills
  3067. all processes (including Kermit and any of its subforks) and closes all open
  3068. files, including the file that was being received.  Even if you have told
  3069. Kermit to SET FILE INCOMPLETE DISCARD, the partially received file is kept.
  3070. See comments in ckutio.c (search for SIGHUP) for details.
  3071.  
  3072. If you SET FILE DISPLAY FULLSCREEN, and C-Kermit complains "Sorry, terminal
  3073. type not supported", it means that the terminal library (termcap or termlib)
  3074. that C-Kermit was built with does not know about a terminal whose name is the
  3075. current value of your TERM environment variable.  If this happens, but you
  3076. want to have the fullscreen file transfer display, EXIT from C-Kermit and set
  3077. a UNIX terminal type from among the supported values that is also supported by
  3078. your terminal emulator, or else have an entry for your terminal type added to
  3079. the system termcap and/or terminfo database.
  3080.  
  3081. If you attempt to suspend C-Kermit during local-mode file transfer and then
  3082. continue it in the background (via bg), it will block for "tty output" if
  3083. you are using the FULLSCREEN file transfer display.  This is apparently
  3084. a problem with curses.  Moving a local-mode file transfer back and forth
  3085. between foreground and background works correctly, however, with the SERIAL,
  3086. CRT, BRIEF, or NONE file transfer displays.
  3087.  
  3088. If C-Kermit's command parser no longer echoes, or otherwise acts strangely,
  3089. after returning from a file transfer with the fullscreen (curses) display, and
  3090. the curses library for your version of UNIX includes the newterm() function,
  3091. then try rebuilding your version of C-Kermit with -DCK_NEWTERM.  Similarly if
  3092. it echoes doubly, which might even happen during a subsequent CONNECT session.
  3093. If rebuilding with -DCK_NEWTERM doesn't fix it, then there is something very
  3094. strange about your system's curses library, and you should probably not use
  3095. it.  Tell C-Kermit to SET FILE DISPLAY CRT or anything else other than
  3096. FULLSCREEN, and/or rebuild without -DCK_CURSES, and without linking with
  3097. (termlib and) curses.  Note: In C-Kermit 7.0 this problem seems to have
  3098. escalated, and -DCK_NEWTERM had to be added to many builds that previously
  3099. worked without it: Linux, AIX 4.1, DG/UX, etc.  In the Linux case, it is
  3100. obviously because of changes in the (n)curses library; the cause in the other
  3101. cases is not known.
  3102.  
  3103. Reportedly, when using "MSEND *" from a 14-character filename UNIX system to
  3104. another system (e.g. BSD) that allows longer names, with SET FILE NAMES
  3105. LITERAL, any files with 14-character names will have a space added to the end
  3106. of the name on the receiving machine (this *should* be fixed in 6.0).
  3107.  
  3108. C-Kermit creates backup-file names (such as "oofa.txt.~1~") based on its
  3109. knowledge of the maximum filename length on the platform where it is running,
  3110. which is learned at compile time, based on MAXNAMLEN or equivalent symbols
  3111. from the system header files.  But suppose C-Kermit is receiving files on a
  3112. UNIX platform that supports long filenames, but the incoming files are being
  3113. stored on an NFS-mounted file system that supports only short names.  NFS maps
  3114. the external system to the local APIs, so C-Kermit has no way of knowing that
  3115. long names will be truncated.  Or that C-Kermit is running on a version of
  3116. UNIX that supports both long-name and short-name file systems simultaneously
  3117. (such as HP-UX 7.00).  This can cause unexpected behavior when creating backup
  3118. files, or worse.  For example, you are sending a group of files whose names
  3119. are differentiated only by characters past the point at which they would be
  3120. truncated, each file will overwrite the previous one upon arrival.
  3121.  
  3122. Optimum file transfer performance is a matter of tuning parameters like packet
  3123. length, window size, control-character unprefixing, and on serial connections,
  3124. ensuring there is an effective flow control method, preferably hardware (such
  3125. as RTS/CTS).
  3126.  
  3127. However, a fully-configured C-Kermit program can be slower than a minimally
  3128. configured one simply because of its size.  A command-line-only version that
  3129. is stripped of every conceivable feature not affecting file transfer (such as
  3130. "sunos41m" for the Sun or "dellsys5r4m" for Dell) can move files faster than a
  3131. full-featured one.  Thus, it might make sense to keep a minimal version
  3132. available as well as a full-featured one.  See the files ckuins.txt and
  3133. ckccfg.txt as well as the makefile for how to do this.
  3134.  
  3135. A fairly substantial reduction in size and a noticeable improvement in speed
  3136. can be obtained simply by rebuilding C-Kermit without the debugging feature:
  3137.  
  3138.   make <entryname> KFLAGS=-DNODEBUG
  3139.  
  3140. See ckccfg.txt for more detailed information about configuration.
  3141.  
  3142. (11) EXTERNAL FILE TRANSFER PROTOCOLS
  3143.  
  3144. UNIX C-Kermit can be used in conjunction with other communications software
  3145. in various ways.  C-Kermit can be invoked from another communications program
  3146. as an "external protocol", and C-Kermit can also invoke other communication
  3147. software to perform external protocols.
  3148.  
  3149. This sort of operation makes sense only when you are dialing out from your
  3150. UNIX system.  If the UNIX system is the one you have dialed in to, you don't
  3151. need any of these tricks.  Just run the desired software on your UNIX system
  3152. instead of Kermit.  When dialing out from a UNIX system, the difficulty is
  3153. getting two programs to share the same communication device in spite of the
  3154. UNIX UUCP lockfile mechanism, which would normally prevent any sharing, and
  3155. preventing the external protocol from closing (and therefore hanging up) the
  3156. device when it exits back to the program that invoked it.
  3157.  
  3158. (This section deleted; see "Using C-Kermit", 2nd Ed, Chapter 14.)
  3159.  
  3160. "pcomm" is a general-purpose terminal program that provides file transfer
  3161. capabilities itself (X- and YMODEM variations) and the ability to call on
  3162. external programs to do file transfers (ZMODEM and Kermit, for example).  You
  3163. can tell pcomm the command to send or receive a file with an external
  3164. protocol:
  3165.             send                receive
  3166.     ZMODEM        sz <filename>            rz
  3167.     Kermit        kermit -s <filename>        kermit -r
  3168.  
  3169. pcomm runs external programs for file transfer by making stdin and stdout
  3170. point to the modem port, and then exec-ing "/bin/sh -c xxx" (where xxx is the
  3171. appropriate command).  However, C-Kermit does not treat stdin and stdout as
  3172. the communication device unless you instruct it:
  3173.  
  3174.             send                receive
  3175.     Kermit        kermit -l 0 -s <filename>    kermit -l 0 -r
  3176.  
  3177. The "-l 0" option means to use file descriptor 0 for the communication device.
  3178.  
  3179. In general, any program can pass any open file descriptor to C-Kermit for the
  3180. communication device in the "-l" command-line option.  When Kermit is given
  3181. a number as the argument to the "-l" option, it simply uses it as a file
  3182. descriptor, and it does not attempt to close it upon exit.
  3183.  
  3184. Here's another example, for Seyon (a Linux communication program).  First try
  3185. the technique above.  If that works, fine; otherwise...  If Seyon does not
  3186. give you a way to access and pass along the file descriptor, but it starts up
  3187. the Kermit program with its standard i/o redirected to its (Seyon's)
  3188. communications file descriptor, you can also experiment with the following
  3189. method, which worked here in brief tests on SunOS.  Instead of having Seyon
  3190. use "kermit -r" or "kermit -s filename" as its Kermit protocol commands, use
  3191. something like this (examples assume C-Kermit 6.0):
  3192.  
  3193.   For serial connections:
  3194.  
  3195.     kermit -YqQl 0 -r                     <-- to receive
  3196.     kermit -YqQl 0 -s filename(s)         <-- to send one or more files
  3197.  
  3198.   For Telnet connections:
  3199.  
  3200.     kermit -YqQF 0 -r                     <-- to receive
  3201.     kermit -YqQF 0 -s filename(s)         <-- to send one or more files
  3202.  
  3203. Command line options:
  3204.  
  3205.   Y    - skip executing the init file
  3206.   Q    - use fast file transfer settings
  3207.   l 0  - transfer files using file descriptor 0 for a serial connection
  3208.   F 0  - transfer files using file descriptor 0 for a Telnet connection
  3209.   q    - quiet - no messages
  3210.   r    - receive
  3211.   s    - send
  3212.  
  3213. (11.2) INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
  3214.  
  3215.    (This section is obsolete, but not totally useless.
  3216.     See Chapter 14 of "Using C-Kermit", 2nd Edition).
  3217.  
  3218. After you have opened a communication link with C-Kermit's SET LINE (SET PORT)
  3219. or SET HOST (TELNET) command, C-Kermit makes its file descriptor available to
  3220. you in the \v(ttyfd) variable so you can make it available to other programs
  3221. that you RUN from C-Kermit.  Here, for example, C-Kermit runs itself as an
  3222. external protocol:
  3223.  
  3224.   C-Kermit>set modem type hayes
  3225.   C-Kermit>set line /dev/acu
  3226.   C-Kermit>set speed 2400
  3227.   C-Kermit>dial 7654321
  3228.    Call complete.
  3229.   C-Kermit>echo \v(ttyfd)
  3230.    3
  3231.   C-Kermit>run kermit -l \v(ttyfd)
  3232.  
  3233. Other programs that accept open file descriptors on the command line can be
  3234. started in the same way.
  3235.  
  3236. You can also use your shell's i/o redirection facilities to assign C-Kermit's
  3237. open file descriptor (ttyfd) to stdin or stdout.  For example, old versions of
  3238. the UNIX ZMODEM programs, sz and rz, when invoked as external protocols,
  3239. expect to find the communication device assigned to stdin and stdout with no
  3240. option for specifying any other file descriptor on the sz or rz command line.
  3241. However, you can still invoke sz and rz as exterior protocols from C-Kermit if
  3242. your current shell ($SHELL variable) is ksh (the Korn shell) or bash (the
  3243. Bourne-Again shell), which allows assignment of arbitrary file descriptors to
  3244. stdin and stdout:
  3245.  
  3246.   C-Kermit> run rz <&\v(ttyfd) >&\v(ttyfd)
  3247.  
  3248. or:
  3249.  
  3250.   C-Kermit> run sz oofa.zip <&\v(ttyfd) >&\v(ttyfd)
  3251.  
  3252. In version 5A(190) and later, you can use C-Kermit's REDIRECT command, if it
  3253. is available in your version of C-Kermit, to accomplish the same thing without
  3254. going through the shell:
  3255.  
  3256.   C-Kermit> redirect rz
  3257.  
  3258. or:
  3259.  
  3260.   C-Kermit> redirect sz oofa.zip
  3261.  
  3262. A complete set of rz,sz,rb,sb,rx,sx macros for UNIX C-Kermit is defined in
  3263. the file ckurzsz.ini.  It automatically chooses the best redirection method.
  3264.  
  3265. (11.3) USING C-KERMIT WITH TERM
  3266.  
  3267.   Note: the following section dates from circa 1994.  Since then,
  3268.   evidently, "slirp" has supplanted "term", and reportedly, unlike
  3269.   term, slirp can be used transparently to the application:
  3270.     http://blitzen.canberra.edu.au/resources
  3271.  
  3272. The "term" program provides an error-corrected, multiplexed connection
  3273. between two UNIX systems, allowing you to run multiple applications over a
  3274. single connection, for example several terminal windows and a file transfer
  3275. simultaneously.  Term depends on a communications application (such as
  3276. C-Kermit) to make the connection and then redirect it to term's standard i/o.
  3277. The advantages of using C-Kermit rather than other communication programs for
  3278. this include:
  3279.  
  3280.  . C-Kermit's script language lets you automate the entire process.
  3281.  
  3282.  . With C-Kermit's REDIRECT command, term sessions are not limited to serial
  3283.    connections, but can work over network connections (TCP/IP, X.25) too.
  3284.  
  3285. Here is an example showing how to set up a term session between two UNIX
  3286. systems with C-Kermit (assuming the connection has already been made by
  3287. C-Kermit, e.g. by dialing up):
  3288.  
  3289.   C-Kermit> connect
  3290.   login: xxx
  3291.   Password: xxx
  3292.   $ exec term -r -s 38400 -A
  3293.   ^\c (escape back)
  3294.   C-Kermit>redirect term -s 38400 -A &
  3295.   C-Kermit>push  ; or "suspend"
  3296.   $
  3297.  
  3298. Now you can run term clients such as trsh and tupload at the local shell
  3299. prompt.
  3300.  
  3301. (12) SECURITY
  3302.  
  3303. We receive constant requests for versions of C-Kermit that use all sorts of
  3304. security mechanisms: SOCKS, SSL, SSH, SSLeay, TSL, PCT, SRP, etc etc.  Well...
  3305.  
  3306.  (a) C-Kermit can be linked with a SOCKS library if you have one; see
  3307.      ckccfg.txt, section 8.1.1.
  3308.  
  3309.  (b) Most of the others require export or import licenses, carry source-code
  3310.      restrictions, and/or are patented.
  3311.  
  3312. HOWEVER...
  3313.  
  3314.  (c) C-Kermit 7.0 includes support for Kerberos; see kerberos.txt for details.
  3315.  
  3316.  (d) It also has a new feature to let it be used "over" secure clients like
  3317.      SSL Telnet, SRP Telnet, etc.  See ckermit2.txt Sections 2.7 and 2.14
  3318.      for details.
  3319.  
  3320.  
  3321. (13) MISCELLANEOUS USER REPORTS
  3322.  
  3323. Date: Thu, 12 Mar 92 1:59:25 MEZ
  3324. From: Walter Mecky <walter@rent-a-guru.de>
  3325. Subject: Help.Unix.sw
  3326. To: svr4@pcsbst.pcs.com, source@usl.com
  3327.  
  3328. PRODUCT:    Unix
  3329. RELEASE:    Dell SVR4 V2.1 (is USL V3.0)
  3330. MACHINE:    AT-386
  3331. PATHNAME:    /usr/lib/libc.so.1
  3332.         /usr/ccs/lib/libc.a
  3333. ABSTRACT:    Function ttyname() does not close its file descriptor
  3334. DESCRIPTION:
  3335.     ttyname(3C) opens /dev but never closes it. So if it is called
  3336.     often enough the open(2) in ttyname() fails. Because the broken
  3337.     ttyname() is in the shared lib too all programs using it can
  3338.     fail if they call it often enough. One important program is
  3339.     uucico which calls ttyname for every file it transfers.
  3340.  
  3341. Here is a little test program if your system has the bug:
  3342.  
  3343. #include <stdlib.h>
  3344. #include <stdio.h>
  3345. main() {
  3346.     int i = 0;
  3347.     while (ttyname(0) != NULL)
  3348.       i++;
  3349.     perror("ttyname");
  3350.     printf("i=%d\n", i);
  3351. }
  3352.  
  3353. If this program runs longer than some seconds you don't have the bug.
  3354.  
  3355. WORKAROUND:
  3356.     None
  3357. FIX:
  3358.     Very easy if you have source code.
  3359.  
  3360. Another user reports some more explicit symptoms and recoveries:
  3361.  
  3362. > What happens is when invoking ckermit we get one of the following
  3363. > error messages:
  3364. >   You must set line
  3365. >   Not a tty
  3366. >   No more processes.
  3367. > One of the following three actions clears the peoblem:
  3368. >   shutdown -y -g0 -i6
  3369. >   kill -9 the ttymon with the highest PID
  3370. >   Invoke sysadm and disable then enable the line you want to use.
  3371. > Turning off respawn of sac -t 300 and going to getty's and uugetty's
  3372. > does not help.
  3373. >
  3374. > Also C-Kermit reports "?timed out closing /dev/ttyxx".
  3375. > If this happens all is well.
  3376.  
  3377. ------------------------------
  3378.  
  3379. (Note: the following problem also occurs on SGI and probably many other
  3380. UNIX systems):
  3381.  
  3382. From: James Spath <spath@jhunix.hcf.jhu.edu>
  3383. To: Info-Kermit-Request@cunixf.cc.columbia.edu
  3384. Date: Wed, 9 Sep 1992 20:20:28 -0400
  3385. Subject: C-Kermit vs uugetty (or init) on Sperry 5000
  3386.  
  3387. We have successfully compiled the above release on a Unisys/Sperry 5000/95.  We
  3388. used the sys5r3 option, rather than sys5r2 since we have VR3 running on our
  3389. system.  In order to allow dialout access to non-superusers, we had to do
  3390. "chmod 666 /dev/tty###", where it had been -rw--w--w- (owned by uucp), and to
  3391. do "chmod +w /usr/spool/locks".  We have done text and binary file transfers
  3392. through local and remote connections.
  3393.  
  3394. The problem concerning uucp ownership and permissions is worse than I thought
  3395. at first.  Apparently init or uugetty changes the file permissions after each
  3396. session.  So I wrote the following C program to open a set of requested tty
  3397. lines.  I run this for any required outgoing line prior to a Kermit session.
  3398.  
  3399.    ------ cut here -------
  3400. /* opentty.c -- force allow read on tty lines for modem i/o */
  3401. /* idea from: restrict.c -- System 5 Admin book Thomas/Farrow p. 605 */
  3402. /* /jes jim spath {spath@jhunix.hcj.jhu.edu } */
  3403. /* 08-Sep-92 NO COPYRIGHT. */
  3404. /* this must be suid to open other tty lines */
  3405.  
  3406. /* #define DEBUG */
  3407. #define TTY "/dev/tty"
  3408. #define LOK "/usr/spool/locks/LCK..tty"
  3409. #include <stdio.h>
  3410.  
  3411. /* allowable lines: */
  3412. #define TOTAL_LINES 3
  3413. static char allowable[TOTAL_LINES][4] = { "200", "201", "300" };
  3414. static int total=TOTAL_LINES;
  3415. int allow;
  3416.  
  3417. /* states: */
  3418. #define TTY_UNDEF 0
  3419. #define TTY_LOCK  1
  3420. #define TTY_OKAY  2
  3421.  
  3422. main(argc, argv)
  3423. int argc; char *argv[]; {
  3424.     char device[512];
  3425.     char lockdev[512];
  3426.     int i;
  3427.     if (argc == 1) {
  3428.     fprintf(stderr, "usage: open 200 [...]\n");
  3429.     }
  3430.     while (--argc > 0 && (*++argv) != NULL ) {
  3431. #ifdef DEBUG
  3432.     fprintf(stderr, "TRYING: %s%s\n", TTY, *argv);
  3433. #endif
  3434.     sprintf(device, "%s%s", TTY, *argv);
  3435.     sprintf(lockdev, "%s%s", LOK, *argv);
  3436.     allow = TTY_UNDEF; i = 0;
  3437.     while (i <= total) { /* look at all defined lines */
  3438. #ifdef DEBUG
  3439.         fprintf(stderr, "LOCKFILE? %s?\n", lockdev);
  3440. #endif
  3441.         if (access(lockdev, 00) == 0) {
  3442.         allow=TTY_LOCK;
  3443.         break;
  3444.         }
  3445. #ifdef DEBUG
  3446.         fprintf(stderr, "DOES:%s==%s?\n", allowable[i], *argv);
  3447. #endif
  3448.         if (strcmp(allowable[i], *argv) == 0)
  3449.           allow=TTY_OKAY;
  3450.         i++;
  3451.     }
  3452. #ifdef DEBUG
  3453.     fprintf(stderr, "allow=%d\n", allow);
  3454. #endif
  3455.     switch (allow) {
  3456.       case TTY_UNDEF:
  3457.         fprintf (stderr, "open: not allowed on %s\n", *argv);
  3458.         break;
  3459.       case TTY_LOCK:
  3460.         fprintf (stderr, "open: device locked: %s\n", lockdev);
  3461.         break;
  3462.       case TTY_OKAY:
  3463.         /* attempt to change mode on device */
  3464.         if (chmod (device, 00666) < 0)
  3465.           fprintf (stderr, "open: cannot chmod on %s\n", device);
  3466.         break;
  3467.       default:
  3468.         fprintf (stderr, "open: FAULT\n");
  3469.     }
  3470.     }
  3471.     exit (0);
  3472. }
  3473.  
  3474. ------------------------------
  3475.  
  3476. (14) THIRD-PARTY DRIVERS
  3477.  
  3478. UNIX versions, especially those for PCs (SCO, Unixware, etc) might be
  3479. augmented by third-party communication-board drivers from Digiboard, Stallion,
  3480. etc.  These can sometimes complicate matters for Kermit considerably since
  3481. Kermit has no way of knowing that it is going through a possibly nonstandard
  3482. driver.  Various examples are listed in the earlier sections of this file;
  3483. search for Stallion, Digiboard, etc.  Additionally:
  3484.  
  3485.  . The Stallion Technologies EasyConnection serial board driver does not
  3486.    always report the state of DSR as low.  From Stallion (October 1997):
  3487.    "Unfortunately, this is a bug in our driver. We have implemented all of the
  3488.    other TIOMC functions, eg DTR, DCD, RTS and CTS, but not DSR. Our driver
  3489.    should report the actual state of DSR on those of our cards that have a DSR
  3490.    signal. That the driver always reports DSR as not asserted (0), is a bug in
  3491.    the driver. The driver should be either reporting the state of DSR
  3492.    correctly on those cards that support DSR or as always asserted (1) on
  3493.    those cards that do not have a DSR signal. This will be fixed in a future
  3494.    version of our drivers; at this time I cannot say when this will be."  And
  3495.    later, "As far as I can tell, we don't support the termios/termiox ioctls
  3496.    that relate specifically to DSR and RI; all the rest are supported.  This
  3497.    will, as I mentioned earlier, be fixed in the next release of our ATA
  3498.    software."  - World Wide Escalation Support, Stallion Technologies,
  3499.    Toowong QLD, support@stallion.oz.au.
  3500.  
  3501. Later (December 1997, from the same source):
  3502.  
  3503.  . We have now released a new version of the ATA software, version 5.4.0.
  3504.    This version fixes the problem with the states of the DSR and RI
  3505.    signals and how they were being reported by the driver. This is the
  3506.    problem that you reported in October. The DSR signal is reported
  3507.    correctly on those cards that support the DSR signal, such as the early
  3508.    revision of the EasyIO card and the EasyConnection 8D4 panel, and as
  3509.    always asserted on those cards that do not support the DSR signal in
  3510.    the hardware.   The new driver is available from our Web site,
  3511.    www.stallion.com, in the  /drivers/ata5/UnixWare directory.
  3512.  
  3513. (End of CKUBWR.TXT)
  3514.