Article View: comp.protocols.appletalk
Article #6179Re: Imagewriter Print via CAP (Long !)
From: Ian Harries
Date: Thu, 15 Feb 1990 17:29
Date: Thu, 15 Feb 1990 17:29
129 lines
7689 bytes
7689 bytes
In article <1990Feb13.184421.18741@kaukau.comp.vuw.ac.nz> thetroll@rata.vuw.ac.nz (The Troll) writes:
>We are preparing to network our student Mac labs and are hoping to resolve
>the problem of cheap printing using dot matrix printers and CAP.
>
>What we have are a number of dot matrix Imagewriter clones (the Panasonic
>KX1081) that cannot have appletalk boards installed. However the CAP
>distribution has in samples/ a sample Imagewriter driver and code for
>setting up a spooled imagewriter service in much the same way as the
>standard laserwriter spooling software works (we will connect the
>imagewriters via serial lines to our UN*X box).
>
>What we would like to know is if anyone else has tried this and what the
>results were, is the code robust? Are there alternative solutions (we
>aren't interested in putting Laser printers in the labs as the capital
>cost is a bit high -- but we're willing to listen to reason).
>
>How are others handling printing in student labs?
>
>
>Alex Heatley Computing Services Centre
>Domain: alex@rata.vuw.ac.nz Victoria University of Wellington
>Path: I don't support bang paths. P.O Box 600, New Zealand.
>Trolls can often be found under bridges ... or in Computing Departments.
This is probably of general interest, so I am posting a reply.
Here at Imperial DoC we have a lab of 35 Mac Pluses connected to Ethernet via a
Webster MultiGate. We have four Apple ImageWriter IIs which have proven
woefully incapable of providing a robust printing service for some hundreds of
student users.
We have the CAP software installed on a Sun 3/280. We use isrv to spool to
one ImageWriter II, directly connected to the Sun.
There is a problem with spooling to non-ImageWriter II printers, which I
imagine includes the clones and Grappler-type interfaces. The AppleTalk
ImageWriter driver generates control sequences specific to the ImageWriter II.
This would not matter if only ImageWriter IIs could be networked. However,
using isrv, or similar, any direct-connect ImageWriter I or clone can be
spooled to on a Unix host via a KIP gateway. These printers fail to interpret
the extra control sequences and so pass on any parameter bytes to be printed.
A fragment of AppleTalk ImageWriter driver output is informative -
(LightSpeed Pascal source, draft output selected)
0000000 cr esc H 1 5 8 4 esc o esc r esc T 7 6 nl
^^^^^^^^^^^^^^^^^^^^^^^
0000020 esc f esc T 1 8 nl esc T 1 8 esc r nl esc f
0000040 nl esc K 0 esc < esc f esc T 5 4 nl esc N esc
^^^^^^^^^^^
0000060 F 0 0 3 0 esc E si esc ! esc Y 1 4 / 0
0000100 8 / 8 9 esc N esc F 0 1 1 1 esc E si esc
0000120 ! esc Y 1 1 : 2 1 esc N esc K 0 esc N esc
0000140 F 0 4 8 1 esc E si esc ! esc Y F i n d
0000160 K e y esc N esc F 0 5 5 3 esc E si esc !
0000200 esc Y p r o g esc N esc K 0 esc N esc F 0
0000220 9 8 7 esc E si esc ! esc Y P a g e esc N
0000240 esc F 1 0 3 2 esc E si esc ! esc Y 1 esc N
0000260 esc K 0 esc < esc f esc T 6 0 nl esc N esc F
0000300 0 0 3 0 esc E si esc ! esc Y p r o g r
0000320 a m esc N esc K 0 esc N esc F 0 1 0 0 esc
0000340 E si esc " esc Y F i n d K e y esc N esc
0000360 F 0 1 5 6 esc E si esc " esc Y ( i n p
0000400 u t , esc N esc F 0 2 1 2 esc E si esc "
0000420 esc Y o u t p u t ) ; esc N esc K 0 esc
0000440 < esc f esc T 6 0 nl esc N esc F 0 0 3 0
0000460 esc E si esc " esc Y { I m p l e m e n
...
The esc H 1584 tells the printer to set form length to 11" (computer paper).
The esc H is not recognised by non-ImageWriter IIs, so 1584 gets printed at
the top of the first page of output.
esc K 0 tells the printer to set the current printing colour to Black. Again,
the esc K is not recognised by non-ImageWriter IIs, so a 0 gets printed.
The current printing colour is reset practically every time the font is
changed (esc N -> Pica, esc E -> Elite), so a lot of spurious 0s are going
to turn up. In anything other than draft mode, The printout is sent as a
bitmap. Each printed line takes two passes (top & bottom half), so each
line will begin and end with two 0s, one on top of the other !
The way to get round this, since the ImageWriter II-specific control sequences
are in fact superfluous, is to put in a little backend filter after isrv to
strip them out. In fact ...
We have another isrv, modified to be of device type "LinePrinter" which enables
printing to departmental lineprinters and some Epson MX100s in the lab, again
directly connected to the Sun. These are accessed via a hacked AppleTalk
ImageWriter (LinePrinter) driver, allowing only draft output. This output is
passed through an additional filter that translates/removes the ImageWriter
control codes. While not brilliant, this is adequate for program listings, our
major requirement. It would be perfectly possible to write a complete software
emulation of an ImageWriter II for Epsons and compatibles, to run behind isrv.
How about someone doing it ?
One drawback is that we have not found how to get the node ID of the submitter
of the print job. This would enable us to put the Chooser Name at that node ID
(obtained with ATlook) on the banner printed with the job. At the moment,
we advise users to put there name in a comment at the top of their files !
Helpful suggestions on this point canvassed and welcomed. Using the LaserWriter
driver would provide this information, of course, but PostScript output is
more difficult to map onto a dot-matrix printer, never mind the fact that you
can't always tell which way round the pages are coming !
As regards robustness, isrv seems fine. The manual page talks about it being
slow, but who cares ?
One other point - we had the usual fun and games with handshaking. The Sun
uses RTS/CTS (if you can persuade it to do hardware handshaking at all). The
Epson serial interface cards we have (these are MXs, remember) use DSR/DTR
(no XON/XOFF).
Sun Epson
--- -----
2 ------------------------------ 3
3 ------------------------------ 2
5 ----------------------------- 20
6,8,20 ------------------------------ 6,8
7 ------------------------------ 7
Ian Harries Department of Computing
MicroComputer Support Officer Imperial College
180 Queen's Gate
Janet: ih@uk.ac.ic.doc London SW7 2BZ
DARPA: ih%doc.ic.ac.uk United Kingdom
Uucp: ih@icdoc.UUCP, ukc!icdoc!ih Tel: +44 1 589 5111 x5052
Technical Details
Message-ID:
<1600@gould.doc.ic.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!ihReferences:
<1990Feb13.184421.18741@kaukau.comp.vuw.ac.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!ih From: ih@doc.ic.ac.uk (Ian Harries) Newsgroups: comp.protocols.appletalk Subject: Re: Imagewriter Print via CAP (Long !) Message-ID: <1600@gould.doc.ic.ac.uk> Date: 15 Feb 90 17:29:19 GMT References: <1990Feb13.184421.18741@kaukau.comp.vuw.ac.nz> Reply-To: ih@doc.ic.ac.uk (Ian Harries) Organization: Dept. of Computing, Imperial College, London, UK. Lines: 129