sun3/60 w/ apple laserwriter IInt
kolb at nisc.nyser.net
kolb at nisc.nyser.net
Wed Jun 14 00:19:53 AEST 1989
i am trying to attach an apple laserwriter IInt to the b serial port
(ttyb) on a sun 3/60 running sun os 3.5. needless to say, it doesn't
work. also, i am using transcript.
the laserwriter is configured for 9600bps over rs232. it is attached to
the sun via a "straight through" rs232 cable with a null modem adapter on
one end. this is plugged into port b.
the following is from the printcap file...
ps|PS|PostScript|NISC LaserWriter:\
:lp=/dev/ttyb:\
:sd=/usr/spool/lpq/ps:\
:br#9600:\
:fc#0000374:fs#0000003:\
:xc#0:xs#0040040:\
:mx#0:\
:rw:sb:sf:\
:af=/usr/adm/ps.acct:\
:cf=/usr/local/lib/ps/pscf:\
:df=/usr/local/lib/ps/psdf:\
:gf=/usr/local/lib/ps/psgf:\
:lf=/usr/adm/ps-log:\
:if=/usr/local/lib/ps/psif:\
:nf=/usr/local/lib/ps/psnf:\
:of=/usr/local/lib/ps/psof:\
:rf=/usr/local/lib/ps/psrf:\
:tf=/usr/local/lib/ps/pstf:\
:vf=/usr/local/lib/ps/psvf:
the zs0 device is configured as follows...
device zs0 at obio ? csr 0x20000 flags 0x3 priority 3
the ttyb device looks like this...
crw--w--w- 1 root 12, 1 Jun 9 16:38 /dev/ttyb
here's what happens. i use lpr (like normal). the job gets spooled like
normal. it then just sits there forever. the green light on the
laserwriter never blinks (the one that means that the printer is in use).
then i cat a file to the ttyb device. i get the message back that ttyb is
a busy device.
i then remove the first file from the spooler and cat another file to
ttyb. i get my csh prompt back with no diagnostic messages and the light
starts blinking... and blinking... and blinking... for a very long time.
then it stops. no output, no nothing.
so i try cat'ing a file to ttyb as follows thinking that there may be
a speed mismatch...
(stty 9600; cat /etc/motd) > /dev/ttyb
the same thing happens. blinking w/o printing. i see from a previous sun
spots article (and the laserwriter manual) that the laserwriter is
configured to use xon/xoff as the default for handshaking. to switch to
dsr/dtr, one has to send the following postscript program to the
laserwriter...
statusdict begin 25 sccbatch exch pop
4 eq {stop} if
serverdict begin 0 exitserver
statusdict begin 25 9600 4 setsccbatch
i do this by creating a file with the above contents and cat it to ttyb.
then i cat a normal file, and got nothing except for the blinking. i then
send the next postscript program (as seen in the laserwriter manual) to
view a oarticular option...
/Helvetica findfont 14 scalefont setfont
30 500 moveto
4 show
statusdict begin 25 sccbatch 10 string cvs show
this did nothing but make the light blink again. so finally i cat the
last postscript program in the manual to the laserwriter. it is below...
/Helvetica findfont 14 scalefont setfont
/cr{show 182 currentpoint 20 sub exch pop moveto}def
/tb{show 300 currentpoint exch pop moveto}def
/Which{5 -1 roll 4 exch sub -1 roll cr 3{pop}repeat}def
statusdict begin 25 sccbatch end 182 650 moveto
exch (Baud :)tb 10 string cvs cr
(Parity:)tb dup 30 bitshift -30 bitshift
(none-space)(odd)(even)(none-mark) Which
(Handshake:)tb dup 27 bitshift -29 bitshift
(XON/XOFF)(DSR/DTR)(ETX/ACK)(bad value) Which
(Data bits:)tb dup 25 bitshoft -30 bitshift
(standard)(7)(8)(bad value) Which
(Stop bits:)tb -7 bitshift 0 eq{(1)}{(2)}ifelse
show showpage
and once again, all that i get is more blinking.
doing the following will get the printer to cough up a blank
page...
(stty 9600; echo "showpage") > /dev/ttyb
looking at my breakout box, i see that dsr/dtr/dcd/rts are all high. on
my working laserwriter here (attached to an alm2) the high signals are
rts/dtr/dcd.
anybody out there have any bright ideas? any clues? hmmm... any help
will be greatly appreciated.
-----
christopher kolb
nysernet inc.
kolb at nisc.nyser.net
More information about the Comp.sys.sun
mailing list