Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lpd-daemon 3.4 & LaserWriter Select 310

5 views
Skip to first unread message

Paul Girgensohn

unread,
Apr 17, 1995, 3:00:00 AM4/17/95
to
I'm trying to set up the lpd-daemon 3.4 (by Casper Boon, posted to the
Umich archive in util/printing) with the Laserwriter Select 310 and get
some strange effects. The best result so far is getting the printer to
print ONE page well, and ignore the rest. That seldom happens, though :(
It usually doesn't print anything; it's receiving diod flashes for
some time and then just stops without anything being printed.

When printing with the lpd-daemon in debug mode, it does't say a beep
about errors. It just reports sending a HUGE amount of data to the
printer (something like 2,8xx,xxx,xxx bytes). Since it's sometimes
prints one side, maybe it's a handshaking problem?

I've tried setting the baud rate to different values (2400, 38400,
57600, etc...) with little or no effect. I've also tried different
Postscript files, generated by Mac and Unix (freeBSD) programs.

Here are my settings for the printer:

PRINTER pslaser SERIAL ".aout" 9600 10 N 8 POSTSCRIPT

I think the problem lies with the printer; it's a non-AppleTalk
Postscript printer, which is not very usual. Also, since I began
experimenting with lpd-daemon the printer sometimes reacts with
"Postscript Error" when printing from normal word processors
(lpd-daemon wasn't even installed). Maybe I need an upgrade?

BTW, what's the name of the serial driver for the _printer_ port? I've
tried ".bout", but that crashed the program.

Any idea?

Regards,
Paul Girgensohn, gir...@e.kth.se
--
Palle Girgensohn
gir...@e.kth.se

Brian Cole

unread,
Apr 20, 1995, 3:00:00 AM4/20/95
to
gir...@elixir.e.kth.se (Paul Girgensohn) writes:
]
] I'm trying to set up the lpd-daemon 3.4 (by Casper Boon, posted to the

] Umich archive in util/printing) with the Laserwriter Select 310 and get
] some strange effects. The best result so far is getting the printer to
] print ONE page well, and ignore the rest. That seldom happens, though :(

] Here are my settings for the printer:


]
] PRINTER pslaser SERIAL ".aout" 9600 10 N 8 POSTSCRIPT

I think this is where your problems start. The 310's default
communication parameters are a little on the strange side.
Here's some info I was eventually able to cull from some
Apple documents (in DocViewer format) that I found somewhere.

% Table 3-1 Default settings for the serial communication channel parameters
% Parameter Default settings Other settings
%
% Data bits 8 7
% Parity None None
% Stop bits One P
% Flow control DTR XON/XOFF
% Baud rate 57600 Any baud rate that divides into
% 115200 with a quotient of two or more
% Protocol Binary Simple

That "binary" protocol is kind of strange, you may want to configure the
printer not to use it. The binary protocol escapes certian characters
that shouldn't be in a "regular" PostScript printer, and does not excapes
ones that should be. (I'll append a fairly long description of the binary
protocol at the end of this posting.)

% The LaserWriter Select 310 printer comes from the factory with its serial
% port configured for option 68: 8-bit data, no parity, DTR flow control,
% with 57600 baud. If you need to set up the printer for XON/XOFF
% communication at 19200 baud, send the following routine to the printer
% from the host, using either the parallel port, or the serial port at
% 57600 baud.
%
% serverdict begin 0 exitserver
% statusdict begin
% 9sccbatch 0 eq exch 19200 eq and not
% {9 19200 0 setsccbatch} if
% end stop
%
% This routine tests the current values of the sccbatch parameters (see
% Chapter 2), and if they are not set for 19200 baud and option 0, it
% sets these values using setsccbatch.
%
% Note
% These changes are not permanently stored, since the LaserWriter Select
% 310 printer has no EEROM. They will not persist across power cycles.
% You should send this sequence each time the printer is turned on or
% whenever the serial communication parameters have been changed.

Of course, you probably don't want 19200 XON/XOFF, so here's something
about how to construct the desired parameter for 'setsccbatch':

% Table 3-3 SCC compatibility operators options byte values
% Bit position Field Setting Decimal value Field value
%
% Bit 7 Stop bits 1 stop bit 0 0
% 2 stop bits 128 1
%
% Bits 6 Number of Standard 0 0
% and 5 data bits 7 bits 32 1
% 8 bits 64 2
% Undefined 96 3
%
% Bits 4-2 Flow control XON/XOFF 0 0
% DTR 4 1
% Undefined 8,12,16,29, 2,3,4,5,6,7
% 24,28
%
% Bits 1 Parity Space 0 0
% and 0 Odd 1 1
% Even 2 2
% Mark 3 3


I hope some of this helps.

brian
--
~~~~~~~~~~~~~~~~~~~ _______ _____ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Brian A. Cole |_ _ | | ___| visit Brian's Repository
U. Wisconsin | | | |__| |___ of Macintosh Information
t...@cs.wisc.edu |_| |__________| http://www.cs.wisc.edu/~tuc/mac/


% Binary Communication Protocol
%
% As an alternate to the simple protocol, the LaserWriter Select 310
% printer supports binary protocol for both the serial and parallel
% channels. Binary protocol allows all character codes to be transmitted
% as data, but also allows certain characters to be used for specifying
% control functions, which may be handled asynchronously by the
% communications driver. These functions include status requests, aborting
% of jobs, end-of-job markers, and flow control for the serial channel.
%
% Since any character code can be transmitted as data with this protocol,
% it can be used for sending PostScript language jobs that contain binary
% images. Binary protocol is set by default when the LaserWriter Select 310
% printer is powered on. It may also be selected by setting softwareiomode
% to 100.
%
% This protocol requires that a quoting character be inserted at certain
% places in the data stream and that the character codes for certain
% characters be altered. Therefore, the host computer must filter binary
% data before sending it to the printer. When the protocol is enabled, it
% is used for transmission in both directions. The host should therefore
% filter any data it receives from the printer. Filtering may be done by
% an application program or within the operating system of the host. In
% the case of the LaserWriter Select 310 printer, the Apple LaserWriter
% driver does this filtering. Table 3-5 lists the control characters for
% the binary serial protocol.
%
% Table 3-5 Control characters in binary serial protocol
% Hex value ASCII name ASCII keyboard Control function
%
% 01 SOH CTL-A Quote data byte
% 03 ETX CTL-C Abort job and flush to end of file
% 04 EOT CTL-D End-of-job marker
% 05 ENQ CTL-E None
% 11 DC1 CTL-Q XON in XON/XOFF flow control
% 13 DC3 CTL-S XOFF in XON/XOFF flow control
% 14 DC4 CTL-T Request printer status
% 1C FS CTL-\ None
%
% To transmit the control characters as data, the characters must be quoted.
% This means that the character being sent is replaced by a two-character
% sequence consisting of control character CTL-A, which indicates a quoted
% data byte, followed by the character itself XORed with 40 hex. For example,
% if the host wants to send a request for printer status (hex value 14), it
% sends 01 hex-54.
%
% This method of quoting means that whenever one of the eight special
% characters is received, the control function is intended, regardless of
% whether or not the preceding character is CTL-A. Asynchronous control
% characters may therefore be generated and processed at a lower level
% than the data stream may be generated and consumed. On a host machine,
% the user program may implement the CTL-A quoting convention, while the
% operating system is independently performing XON/XOFF processing.
%
% Note
% All byte values other than those of the eight special
% characters are transmitted by simply sending the value.
%
% After CTL-A is received, the next character received that is not one of
% the special characters must be the result of XORing one of the special
% characters with 40 hex. If any other character is received, it is
% considered to be an input error. Any number of special characters may
% appear between CTL-A and the XORed character, with the exception of
% special characters CTRL-D and CTRL-A, which are handled asynchronously.
% If either of these characters is received between CTL-A and the XORed
% character, it is considered to be an error condition.
%
% If a special character arrives unquoted and it specifies no control
% function for the channel, the character is simply discarded. For example,
% if XON or XOFF is received and XON/XOFF flow control is not in use, it
% is discarded.
%
% IMPORTANT
% CTL-E and CTL-\ currently specify no control functions and should
% not be sent to the LaserWriter Select 310 printer. They are included
% in the list of quoted characters in case new control functions are
% added in the future.
%
% In contrast to simple protocol, with binary protocol there is no mapping
% between end-of-line conventions. The end-of-line characters (<CR>, <LF>,
% or <CR><LF>) sent by the host are exactly what is received by the
% interpreter in the printer. The PostScript scanner handles the different
% end-of-line conventions in a uniform way, but a program that reads data
% from the channel directly (via read or readstring) receives whatever
% characters are sent by the host. Similarly, output is generated by a
% PostScript program (via print or =) is sent unchanged.
%
% Note
% In this connection, the standard end-of-line in the PostScript
% language (\n in a PostScript language string) is <LF>.


0 new messages