CK9KER.BWR "Beware File" for C-Kermit Version 5A -*- text -*- OS-9/68000 VERSION Applies to 5A(188) Last update: Tue Dec 1 10:04:37 1992 Author: Christian Hemsing, Technical University of Aachen, Germany. E-Mail: chris@lfm.rwth-aachen.de Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use this software as long as it is not sold for profit. This copyright notice must be retained. This software may not be included in commercial products without written permission of Columbia University. Report problems, suggestions, fixes, etc, to Frank da Cruz: Internet: fdc@watsun.cc.columbia.edu (or) fdc@columbia.edu BITNET/EARN: FDCCU@CUVMA Columbia University Center for Computing Activities 612 West 115th Street, New York, NY 10025 USA DOCUMENTATION C-Kermit 5A is documented in the book "Using C-Kermit" by Frank da Cruz and Christine M. Gianone, Digital Press, Burlington, MA, USA. Digital Press ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3. Price: US $34.95. In USA, call DECdirect at 1-800-344-4825, refer to order number EY-J896E-DP. Available: January 1993. KNOWN BUGS AND LIMITATIONS OS-9 C-Kermit has not yet been tested with OS-9000. It is expected that some work will be necessary to make it run there (particularly on non-680x0 processors), if for no other reason than that the program depends on a small 68000 assembly-language module (ck9asm.a) for items like signals, alarms, and sending BREAK. SET FILE DISPLAY FULLSCREEN only works for VT100 and compatible terminals, emulators, and/or console drivers. If it doesn't work for you, please use one of the other FILE DISPLAY styles, such as CRT. During text-mode file transfer, linefeed characters are converted to carriage returns. Unlike UNIX, OS-9/68000 has a built-in method to gain exclusive access to devices, so no lock files are needed. The user will be told if the device is already in use. 1) Setting the speed of the communications line: With OS-9 there are two different ways to set the line speed which need a little discussion. a) Assumption: you have a properly implemented driver for your teminal lines. This means that with any SS_Open and SS_Opt call to the driver will check whether the speed has changed and will re-program the hardware accordingly. In this case everything is fine and kermit will only have to do an _ss_opt call and the speed will be changed. This is what tmode does. b) Assumption (more likely): your driver does not check the speed change. You could try to change the speed with the xmode command, close the path currently open on it and reopen it again (xmode only modifies the device descriptor in memory; NOT any currently existing path descriptors). But this won't help you much if your line was iniz'ed before, because the driver's init routine will NOT be called again and since the poorly implemented driver does not check the speed with an SS_Open call the actual speed is not changed. The only way is to have the device not iniz'ed. But this again might cause some problems: again, a poorly implemented driver does not wait till output buffer (the drivers!, not to be mixed up with the buffer e.g. setbuf(), works on) is empty, before the termination routine runs. So, when the device was not iniz'ed and therefore the termination routine is called everytime the last existing open path closes, characters might get lost (e.g. a list file.name >/t3 on a previously not iniz'ed device often will not show all characters on /t3 if the drivers termination routine does not wait). The best solution is to deiniz the device till there are no interrupts running any more (with OS-9 V 2.3 and later use irqs) then use xmode and iniz the device again. How to find out: let kermit change the speed (using _ss_opt) and see wether the change worked. Otherwise use the method mentioned above. I included the xmode version in kermit (which only works on non-iniz'd line, but its use is strongly discouraged. You can include the -dXMODE option in the makefile to have this method used by kermit. Another problem could arise on a system with an installed memory protection unit: if the device descriptor does not have public write access, xmode cannot change the device descriptor unless you are privileged. In that case changing the speed with xmode from within kermit will not work. The _ss_opt (tmode) method works also with an installed memory protection unit, because it acts only on the path descriptor (not on the device descriptor) which is owned by the current user. The best solution is: already have or get or write a decent driver. 2) Setting raw mode on line: Again a remark: If you change XON/XOFF to 0 with _ss_opt, the driver should wait until the output buffer is empty, because if there is pending output the driver might receive an XOFF which will result in an output halt. Next time you change the mode with XON set to 0, and the driver will never start output again, because there is no XON character anymore. This might happen when you type the CONNECT command. In this case kermit says something like "Connection thru blabla" and then puts the terminal line in raw mode. But your terminal might have sent an XOFF (and shortly later an XON again), but the XON might be lost. The only way to circumvent this (unfortunately OS-9 currently offers no way to find out whether the driver's output buffer is empty; there are many situations when one would like to know that) is to wait. If this happens to you, edit ck9con.c to wait after the message. 3) Kermit now does an open with initial file size. This prevents reception of a long file to fail at the end because either the file has become too fragmented or disk space is used up. 4) You can make the module (and its data requirements) a lot smaller by adding certain compiler switches to the makefile like -dNODEBUG. For the possible switches, read the file ckccfg.doc. 5) Sending a BREAK on a line is again a matter of the driver. There is a setstat call SS_Break, but again many carelessly implemented driver do not support the call. If there is no support, kermit will try to switch to a lower speed for the BREAK, but again this may not work (see above). Things would be much easier, if drivers were written more carefully. One known device driver takes 5 hours (!) to return from the send-BREAK code. (End of CK9KER.BWR)