Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!aryeh From: aryeh@eddie.MIT.EDU (Aryeh M. Weiss) Newsgroups: comp.unix.xenix Subject: Re: serials printers with Xenix 2.3.2 Summary: Hardware Handshaking Keywords: DTR RTS serial stty Message-ID: <12422@eddie.MIT.EDU> Date: 13 Aug 89 14:42:24 GMT References: <234@bahamut.fsc.com> Reply-To: aryeh@eddie.MIT.EDU (Aryeh M. Weiss) Distribution: na Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Lines: 48 In article <234@bahamut.fsc.com> jim@bahamut.fsc.com (James O'Connor) writes: >Is there a special stty setting that must be turned on (or off) to get a >serial port to use DTR handshaking with a serial printer? Should I use >/dev/tty1G instead of /dev/tty1g? > >In the absence of DTR handshaking, what is the best way to set a serial >printer up to do XON/XOFF handshaking? With the way I have it set now, with a >line like: > >stty 9600 opost ixon 0<&1 > [rest of article deleted] Use the upper case letters if you want hardware handshaking (modem control). That's what the manual says at least, use the one that works. The following assumes that your serial drivers support hardware handshaking. I assume the drivers built into Xenix do. Drivers supplied by board manufacturers might not. SCO Xenix supports RTS and CTS handshaking. These are enabled via stty ctsflow rtsflow On the standard DB25 DTE connector CTS is pin 5. If your printer uses DTR (pin 20) as its busy signal you must cross-connect printer pin 20 to your host pin 5. Also tie host pin 20 to host pin 6. Pin 20 (DTR) is asserted while the port is open and this will insure that 6 (DSR) sees a high signal. Xenix will not open a port if DSR is low and will disconnect the port if DSR goes low. You should read your printer manual carefully to verify that your printer supports DTR handshaking. Also an RS232 mini-tester is quite useful. That way you can see the status change and Xenix stop/start transmission. Now a warning: I have seen a lot of bugs with so-called "smart" cards that contain a large on-board memory and a processor. The problem is that a file gets dumped into the card's buffer. When the end of the file is reached, Xenix closes the port, yet there is still data in the card's memory being transmitted to the printer. If handshaking is being done in the driver code, it is discontinued, since interupts are usually disabled by a driver's close routine. This applies whether you use hardware or software handshaking. If you find that your files are being truncated this is probably happening to you. A quick fix is to run a backround process that simply keeps the port open all the time. I have DigiBoard Com/8i's and I wrote my own drivers so I know what they do.-- aryeh@eddie.mit.edu mit-eddie!lees-rif!aryeh