Date: Tue, 10 Sep 1996 14:35:44 -0600 From: Sean Kelly <kelly@fsl.noaa.gov> To: edward.ing@utoronto.ca Cc: questions@FreeBSD.org Subject: Re: stty, printcap, ixon, Postscript printer Message-ID: <199609102035.UAA24117@gatekeeper.fsl.noaa.gov> In-Reply-To: <Pine.SOL.3.91.960909105349.18376A-100000@log3> (edward.ing@utoronto.ca)
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> edward ing <edward.ing@utoronto.ca> writes: > I have determined that I need to use software flow control to get my > Postcript printer to work properly. Thus I wish to set the ixon flag > terminal setting for port. Sounds good to me. I use software flow control for my PostScript printer, too. > 1. There are printer capability flags in printcap which can be set > for the l-flags and the c-flags. What I wish to know is whether > there is a capability to set the i-flags in printcap file. Actually, it depends on what version of FreeBSD you have. For 2.1.5 and earlier, you're not setting termios l-flags and c-flags at all, but instead the sgtty flags. Use the settings defined in /usr/include/sys/ioctl_compat.h. You'll want the TANDEM flag, and probably the ANYP, LITOUT, FLUSHO, and PASS8 flags. Try these settings in your /etc/printcap. :fs#0x82000c1:xs#0x820: Now, if you're using FreeBSD-current, then you've got a much more friendly interface that even uses the termios settings: :ms=cs8,-cstopb,-parenb,ixon,ixoff,cread,clocal,-opost,-echo,-echonl: > 2. Not knowing how to set the ixon flag in the printcap, I tried to > set it using the stty command. I enter the following "stty -f > /dev/cuaa0 ixon". However when I tried to list the settings( stty > -f /dev/cuaa0) it did not indicate any change. Which is correct. A tty retains its settings only while it's open. The "stty -f /dev/cuaa0 ixon" command opens the tty, sets the flag, then closes it, at which point it reverts to its initial-state settings. What you want to do is use "stty -f /dev/cuaia0" which sets the ixon flag for the initial-state of the device. There's also a lock-state entry, /dev/cuala0 which prevents a certain bit from being set or cleared by other software. Type "man 4 sio" for more information. You usually put commands like "stty -f /dev/cuaia0 ixon" in the file /etc/rc.serial, which is read and executed at bootup. However, I'd prefer using the /etc/printcap solution. When you move a printer from one computer to another and someone tries to use that serial port, there'll be less confusion if the port doesn't have certain flags already set or locked-in. So many options! That's Unix for you. -- Sean Kelly NOAA Forecast Systems Laboratory kelly@fsl.noaa.gov Boulder Colorado USA http://www-sdd.fsl.noaa.gov/~kelly/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609102035.UAA24117>