samlb@well.UUCP (Samuel B. Bassett) (10/17/88)
I've got a problem: At work we have a Sun 3/260, running Sun OS 3.2 (4.2BSD), pushing Postscript down a 9600 baud serial cable to a DataProducts LZR2665 Laser Printer. The cable ends at the back of the 2665 at the 9-pin interface (TxD, RxD, DTR and ground connected). The Sun kernel is configured to respond to XON/XOFF handshaking, not DTR/DSR. The problem is that we I can only send about one page per minute down the cable without the 2665 upchucking and dumping the file. This is _not_ a problem with a PC which is hooked to the 25-pin interface on the back of the 2665. (The 2665 is smart enough to watch both ports, and take files only from the one which becomes active first, telling the other to wait -- the two don't seem to interfere with one another.) I set up a spooler using "lpr" -- separate spool directory, printcap configuration, and all. It seems to work reasonably well, except that it does not seem to recognize XON/XOFF, and overruns its buffer, leaving heaps of: Calls to Sun and various known gurus get me the run-around. Can anybody help? Is it something in 'printcap'? Do I have to reconfigure the kernel for DTR/DSR handshaking? Is there any way around putting a 'sleep 60 (120, 180,...)' in the shell file that drives the thing? HAAALP! { Please reply to this newsgroup or the address in the .signature below -- I'm a guest at this machine } adTHANKSvance -- Sam'l Bassett -- Semantic Engineering for fun & profit. 34 Oakland Ave., San Anselmo CA 94960; DDD: (415) 454-7282 UUCP: {hplabs,pacbell,lll-crg}!well!samlb; Internet: samlb@well.uucp Compuserve: 71735,1776; WU Easylink ESL 6284-3034; MCI SBassett
awm@doc.ic.ac.uk (Aled Morris) (10/19/88)
In message <7398@well.UUCP> samlb@well.UUCP (Samuel B. Bassett) writes: >I've got a problem: [description of problem with hardware flow control on Sun-3 deleted] I picked this off the sun-spots digest (comp.sys.sun in news) recently, perhaps it could be of use? It talks of making changes to the source of your program, which means lpr in your case (or maybe your printer filter, if you use one). If you don't have source you could write a wrapper program to do the ioctls described, or you could replace the supplied lpr with the PLP (Portable Line Printer) software that was recently posted (comp.sources.unix, I think). ------------------------------ >Date: Mon, 03 Oct 88 12:30:03 +1000 >From: Craig Bishop <munnari!lupus.cc.deakin.oz.au!craig@uunet.uu.net> >Subject: Re: Serial line H/W flow control under 3.5 and 4.0 This is mail I just sent to a colleage in New Zealand, I think it will go part way to solving your problems. We tried the MDMBUF stuff but it never seemed to work right in SunOS 4.0. Craig ------- Forwarded Message From: Craig Bishop <craig> Firstly we made the same mistake you have the standard sun ports are not RS232 they are RS432 (I think, I'd have to check with our engineer to be positive about the number). Yes it can be done, and it took a bit of heart ache. We didn't however use DTR we used RTS CTS. To do the following you will need source to the printer software you are using. And also be using SunOS 4.0. Sorry if this is not help. You have to change the all the IOCTL's to use termio instead of sgttys. Once you have done that, add to the termios (note the "s" in termio, there is a new termio structure termios) the flag CRTSCTS, this enables RTS CTS handshaking on the line. Note also that the line is NOT configured as a modem port. Finally if you don't want the printer to be a bit bucket when it is turned off, the following wiring should be used, 3/60 +-------+ | 2 | -------------------------- Data +-------+ | 5 | ---------*---------------- Hardware flow control +-------+ | | 7 | ---------|---------------- Ground +-------+ / | 8 | ---+ \ +-------+ | / 4.7 K Resistor | 20 | ---+ \ +-------+ | | 25 |----------+ +-------+ Lots of luck. Craig Bishop ARPA: craig%lupus.cc.deakin.oz.au@uunet.uu.net UUCP: ...!uunet!munnari!lupus.cc.deakin.oz!craig ------- End of Forwarded Message ------------------------------ Best wishes Aled Morris systems programmer mail: awm@doc.ic.ac.uk | Department of Computing uucp: ..!ukc!icdoc!awm | Imperial College talk: 01-589-5111x5085 | 180 Queens Gate, London SW7 2BZ
guy@auspex.UUCP (Guy Harris) (10/25/88)
>It talks of making changes to the source of your program, which means >lpr in your case (or maybe your printer filter, if you use one). If >you don't have source you could write a wrapper program to do the ioctls >described, If you don't have the source, then since you're running on SunOS 4.0 (if you weren't, you wouldn't have CRTSCTS) you can set the CRTSCTS bit on the port by including "crtscts" in the list of tty settings in the "ms" capability in the "printcap" file. You don't have to hack the source up just to turn CRTSCTS on....
awm@gould.stars.flab.Fujitsu.JUNET (Aled Morris) (10/26/88)
>If you don't have the source, then since you're running on SunOS 4.0 (if >you weren't, you wouldn't have CRTSCTS) you can set the CRTSCTS bit on >the port by including "crtscts" in the list of tty settings in the "ms" >capability in the "printcap" file. You don't have to hack the source up >just to turn CRTSCTS on.... Ooops....there it is, in printcap(5): "Thus, to set the terminal port to which the printer is attached to even parity, tab expansion, no newline to carriage return/line- feed translation, and RTS/CTS flow control enabled, do: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :ms=evenp,-tabs,nl,crtscts:" (All together now, R-T-F-M !) Aled Morris systems programmer mail: awm@doc.ic.ac.uk | Department of Computing uucp: ..!ukc!icdoc!awm | Imperial College talk: 01-589-5111x5085 | 180 Queens Gate, London SW7 2BZ