SUMMARY: Changing tty parameters

From: Alan Emtage (bajan@opus.cs.mcgill.ca)
Date: Wed Sep 26 1990 - 00:05:53 CDT


Hi,
        It's been a while since I first asked for this so I'll include
the original question:

> I'm currently in the process of installing a printer on the ttyb
>port of an SLC (which of course, should have been out of the door last
>week). After fighting with the printer for a while it was determined that
>the configuration of the printer and port weren't agreeing. The port is
>set up as 7 bits even parity etc, and the printer wants 8 bits no parity
>etc. However the seemingly simple fix of sending an stty with output
>directed to the port has no effect. Even a small program with the
>appropriate ioctl's seems only to change the setting for the time that
>the file descriptor for that port is still open. Once closed, the
>settings revert to their old values. I can get things to work down that
>fd when things have been set so I know I have the correct values.The
>intial pass through the appropriate files (/etc/ttytab in particular) and
>the docmentation don't seem to resolve this problem. Since I am sure that
>other people have encountered this problem before (it would seem to be
>fairly common to want to change these kinds of things) I'd like to hear
>from anybody who has done it (assuming it can be done). The SLC is
>running 4.1 and the printer is an HP LaserJet IIP.
>to me and I'll summarize.

Well, as it turns out, this wasn't the problem at all (of course). The
reason that the printer was getting upset was because of the header page
that lpd was inserting down the wire. As it turns out, the header is
automatically added to the stream "down the wire" as it were, in
striaight ASCII. Since the printer expected PostScript, it barfed on this
unsolicted help from lpd. Now, this is something that I should have been
aware of but to be honest, this is the first time that I've seen this
behavior (although the "lpr" man page) says to use the "-h" option to
suppress the header page. And I've installed a couple of printers albeit
on 3.x not 4.x systems. It makes me wonder if this is new to 4.1. I'm
not sure if to just feel dumb or be mad for this "help" from lpd. The
"ms" parameter work fine from printcap.
        I have to say that the HP is very, very finiky in what it will
accept and I still have a couple of unexplained problems along the way,
concerning file locking and the configuration of the ports on the SLC
(and a bitch about the use of one RS-232 serial port as two but ....).

Remeber to send the ^D after the file. The easiest way to do this is via
the /usr/5bin/echo with "\004" for the ^D.

The line discipline is

-parend,cs8,onlcr,opost

Thanks to all those who helped (my sincere apologies to anyone I've
missed):

auspex!guy@uunet.UU.NET (Guy Harris)
convex!datri@uxc.cso.uiuc.edu ("Anthony A. Datri")
fmbutt@mrbt.sw.stratus.com (Farooq Butt)
Dan Williams <dan@ufcia.health.ufl.edu>
halstern@Sun.COM (Hal Stern)
fabrice@yosemite.atmos.ucla.edu (fabrice cuq)
mrwallen@UCSD.EDU (Mark R. Wallen)
kevin@jtsv16.jts.com (kevin brighton)
ang@theory.lcs.mit.edu (William S. Ang)
conway@tais.telecom.com.au
mark%eecs.ee.pdx.edu@RELAY.CS.NET
Nigel Titley <ntitley@axion.bt.co.uk>
sid%ingres.com%mtxinu.UUCP (Sid Shapiro)
Hans Varkevisser <hans@let.vu.nl>
bob@MorningStar.Com
Todd Ferguson <melvin%ecrc.de%uunet.UUCP>
Neil Gorsuch <uninet!neil%zardoz.uucp@ICS.UCI.EDU>
tessi!joey@nosun.West.Sun.COM (Joe Pruett)
Kurt Spanier <zrnsk01@printserv.zdv.uni-tuebingen.de>
well!shiva@apple.com (Kenneth Porter)

-Alan



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:05:58 CDT