LaserWriter II baud rate question

Richard Tobin richard%aiai.edinburgh.ac.uk at nss.cs.ucl.ac.uk
Sat Apr 22 05:41:37 AEST 1989


> There was one major problem with changing the printer speed.  We could not
> get our Sun 3/50 (OS 3.5) print server to communicate with a 38.4K printer
> (rats!).  We tried tweeking /etc/gettytab and ttys to reference the new
> speed, but nothing seem to work.

I just tried this for our new laser printer.  The way it's supposed to
work is that you change the "br" entry in /etc/printcap to 38400, and
restart the daemon (actually I think it should happen for the next job
anyway).

Well, it didn't work.  Stty revealed that the speed was still 9600.
Speeds of 1200 and 19200 worked however.  An ugly suspicion crossed my
mind...

Yes, the baud rate variable is declared as a short.  (Actually, it would
probably not matter if it didn't explicitly check for the variable being
greater than zero.)

I don't have Sun sources (I was looking at 4.2 sources on a Vax - it still
appears to be a short in 4.3), so rather than hope that the Vax sources
would work I patched the binary.

The table looks like this:

struct bauds {
        int     baud;
        int     speed;
} bauds[] = {
        50,     B50,
	...
        19200,  EXTA,
        38400,  EXTB,
        0,      0
};

Since the binary is stripped (boo! hiss!) you'll need a good text editor.
EXTB is defined to be 15, so look for the string \0 \0 \226 \0 \0 \0 \0
\017.  I changed it to \0 \0 \0 \046 \0 \0 \0 \0 \017, so that setting a
baud rate of 38 in /etc/printcap will do the trick.

BTW, this speeded up printing a 256x256 bitmap from 2:41 to 1:48.

-- Richard



More information about the Comp.sys.sun mailing list