[net.micro.mac] LaserWriter+ <--> IBM-PC

phcalamai@water.UUCP (Paul H. Calamai) (10/07/86)

Can anyone out there give me the pinouts for
connecting an IBM-pc to the LaserWriter+.
According to DVILASER/PS installation Instructions
that accompany Textset's PostScript Printer Driver
for IBM computers the required cable is NOT a standard
printer cable with pins 2 and 3 crossed. They don't, however,
give much more help on this matter!

Please email replies directly to me at one of the following
addresses:

CSNET: phcalamai%water%waterloo.csnet
UUCP:  ... decvax!watmath!phcalamai
ARPA:  calamai@anl-mcs  or  na.calamai@su-score

Thanks.

mdf0@bunny.UUCP (Mark Feblowitz) (10/08/86)

> Can anyone out there give me the pinouts for
> connecting an IBM-pc to the LaserWriter+.
> According to DVILASER/PS installation Instructions
> that accompany Textset's PostScript Printer Driver
> for IBM computers the required cable is NOT a standard
> printer cable with pins 2 and 3 crossed. They don't, however,
> give much more help on this matter!
> 
My Apple dealer gave me the following pinouts, which still don't
seem to solve a problem that I've had with Laserwriter buffer overruns.

   PC          LaserWriter
  DB-9           DB-25

   1               4
   2               2
   3               3
   4              5&6
   5               7
  6&8             20
   7               8

Let me know if you find a better mapping.

Mark Feblowitz
GTE Laboratories, Inc
40 Sylvan Road
Waltham, MA 02254
(617) 466-2947

CSNET: Feblowitz@GTE-Labs.CSNET
UUCP:  Feblowitz@bunny.UUCP
old uucp: !seizmo!harvard!bunny!mdf0

tj@utcs.UUCP (10/09/86)

Alright... time to put in my 2 cents worth.

There are two ways to drive an Apple LaserWriter from a PC.

1) through any comm cable via null modem with Xon/Xoff. 8 bits no parity at
9600 baud. This is the factory default setting on the 9600 setting on the
apple laserWriter. Use a spooler like AST superspl to handle the Xon/Xoff
if your software won't do it. (There are PD versions for XOn/Xoff but I don't
have any, contributions please...)

2) Use DTR signals (this is the best cause in the Xon/Xoff mode sometimes the
Apple LaserWriter gets confused and forgets to Xon!) via tha cable as
below (from some program I got...)
IBM   ALW
1      1
2      3
3      2
4      5
5      4
6     20 
7      7
20     6
 BUT the catch is that the ALW normally doesn't work with DTR enabled
as it comes from the factory. The way to tell it to do this is to
send it a magic postscript file to set the 25 pin port to DTR enabled.
this is as follows:
serverdict begin
0 exitserver %replace 0 with exitserver password if changed!
statusdict begin
25 9600 4 setsccbatch
end %statusdict

Note that you need not end the serverdict begin because of the exitserver.
The way I send this to the printer is to use a COMM package and talk to the
ALW. First type
executive
and the thing should talk to you if all parity etc match. You are then
talking to an interactive timesharing printer (scarey!). then send the
above program (one line at a time in lower case) and you should
find that it is friendly and talks to you until you type the exitserver
command. Then it no longer is friendly and it doesn't echo so type carefully.
You can really make a mess here if you type something wrong. The best way
is to edit a file with the commands and "send" the file with the COMM package.

To set it back to factory setting use the above with 25 9600 0 setsccbatch

SOme old laserWriters DO NOT support the DTR option. You will get an
error message with 25 9600 x setsccbatch if x is higher than 3!
25 is the port (25 pin connector)
9600 is the baud (19200 works they tell me)
x is the comm parms as follows
0 ignore high order bit of each 8 bit char w/Xon/Xoff
1 odd parity w/Xon/Xoff
2 even parity w/Xon/Xoff
3 No parity all 8 bits are data w/Xon/Xoff
4 as per 0 but DTR
5 as per 1 but DTR
6 as per 2 but DTR
7 as per 3 but DTR

When you really bun out your ALW by typeing things wrong then set the switch to
the 1200 position which is ALWAYS 1200 baud parity ignored Xon/Xoff and correct.

For those of you who really want to get into it get the Addison Wesley Postscript
Language reference manual w/ALW programming info ISBN 0-201-10174-2 AND
the supplement for the Apple LaserWriter and Apple LaserWriter PLUS revision 2
which as far as I know is only from ADOBE SYSTEMS Inc. 

P.S. You can tell if your ALW is revision 2 by looking at the lower left of the
power on test page line graph. Look for a 2.0!

Terry Jones
416-978-4924
utcs!tj   uucp
tj@utoronto  bitnet

tim@j.cc.purdue.edu (Timothy Lange) (10/10/86)

Unless you change the LaserWriter to not use Xon/Xoff, you will have
problems with buffer overflow when connected to an IBM PC.  This of
course assumes that you are NOT using any software that is suppose to
handle Xon/Xoff flow control signals from a serial printer.

What I am saying is that the LaserWriter defaults to Xon/Xoff flow
control and the IBM PC test for Data Terminal Ready (DTR ??).  You gotta
get both machines using the same flow control.

-- 
Timothy Lange
Purdue University Computing Center
West Lafayette, IN
317-494-1787 extension 260
tim@j.cc.purdue.edu

joel@gould9.UUCP (Joel West) (10/10/86)

In article <591@bunny.UUCP>, mdf0@bunny.UUCP (Mark Feblowitz) writes:
> My Apple dealer gave me the following pinouts, which still don't
> seem to solve a problem that I've had with Laserwriter buffer overruns.

The LW uses X-on/X-off.  A standard unadorned IBM PC BIOS serial driver,
I believe, ignores X-off.  At least, this is the way the problem was
explained to me.
-- 
	Joel West			     MCI Mail: 282-8879
	Western Software Technology, POB 2733, Vista, CA  92083
	{cbosgd, ihnp4, pyramid, sdcsvax, ucla-cs} !gould9!joel
	joel%gould9.uucp@NOSC.ARPA

cramer@kontron.UUCP (Clayton Cramer) (10/13/86)

> In article <591@bunny.UUCP>, mdf0@bunny.UUCP (Mark Feblowitz) writes:
> > My Apple dealer gave me the following pinouts, which still don't
> > seem to solve a problem that I've had with Laserwriter buffer overruns.
> 
> The LW uses X-on/X-off.  A standard unadorned IBM PC BIOS serial driver,
> I believe, ignores X-off.  At least, this is the way the problem was
> explained to me.
> -- 
> 	Joel West			     MCI Mail: 282-8879

LaserWriter release 2.0 and all LaserWriter Plus systems default to
XON/XOFF.  You can run them with RTS/CTS, which will solve the buffer
overrun problem with your PC.  The following piece of code comes from
Matt Foley at Adobe Systems (the authors of PostScript).

] To switch to DTR flow control, you must give a special instruction 
] to the printer.  This instruction must be given ONCE.  It writes into 
] an EEPROM, and thus its effect remains over power cycles.
] 
] The easiest thing is to create a small text file containing the
] following code:
] 
] 	serverdict begin  0 exitserver
] 	statusdict begin
] 	25 9600 4 setsccbatch
] 	end
] 	^D
] 
] Comments:
] The '0' before 'exitserver' is a password.  This may be changed by the
] system manager, but 0 is the default.
] The verb 'setsccbatch' requires three arguments.  The first may be 9 or
] 25, indicating which hardware port you are using.  The second may be
] any of a broad selection of reasonable baud rates, including 9600,
] 19200, and 57600.  The third is an option parameter.  0-3 use XON/XOFF
] flow control, 4-7 use DTR flow control.  0 or 4 are 8-bit words, 7 bits
] data, parity bit ignored; 1 or 5 are odd parity; 2 or 6 are even
] parity; 3 or 7 are 8-bit valid data, no parity.
] (The 3 or 7 options do NOT give a fully transparent channel, as
] ^D,^C,^T,CR,LF and [with XON/XOFF] ^S,^Q remain "special characters"
] that are trapped by the serial driver.)
] 
] The ^D at the end of the file is very important, as, having used
] 'exitserver', you must restart the printer's server loop by terminating
] the current job.  You can terminate the job either by sending a CTRL-D
] (hex 04) to the printer, or by waiting 30+ seconds for a timeout to
] occur.
] 
] Finally, the changes will not take effect until the next time you
] power-cycle the printer.
] 
] Since this PS program is very short, you will have no difficulty
] sending it to the printer with the DOS print command.
] 
] All this and more are in the "PostScript Language Update for the Apple
] LaserWriter Revision 2 and LaserWriter Plus".  This adds to the info in
] "PostScript Language Supplement for the Apple LaserWriter", and should
] be in current versions of Apple's "Inside LaserWriter".  At any rate,
] it is available from Apple.
] 

Hope this cross-fertilization of groups helps.

Clayton E. Cramer