[comp.unix.sysv386] SVR4: postio filter and /dev/lp---Does it work?

witr@rwwa.COM (Robert Withrow) (04/20/91)

Has anyone gotten the SVR4 postscript lp stuff to work with parallel
printers (.e.g. /dev/lp)?  Or is this just another SVR4 bug?

On my system ``postio'' seems to hang causing ``printer fault'' mail
saying something about ``printer setup''..???  I've read the printed
FM, and get no help there.

[[[Also, I know by using strings that postio has 13 options, but I
can't find any documentation.. Does anyone have a man page for postio?]]]

What I have tried:

 1) ``cat foo.ps >/dev/lp'' --- works fine.

 2) ``cat foo.simple | /usr/lib/lp/postscript/postprint >/dev/lp'' ---
works fine.

 3) Modifying interface ``standard'' to delete the
``/usr/lib/lp/postscript/postio part'' of the pipeline used for the
banner.  Now when I do ``lp -T simple foo.simple'' I get a banner, but
then postio hangs when it tries to print the rest of the job.

 4) 3 + modifying filter ``postio'' and changing the command to
/usr/bin/cat.  Now, I get a good banner, but the next page (supposted
to be what I got in 1 and 2) is blank.  After that (until I reset
printer) I get blank pages.

 5) 3 + deleting filter ``download'' and modifying filter ``postio''
and changing Command: to be /usr/bin/cat and Input types: to be
postscript.  I get the same results as in 4.  This realy stumps me
cause I think this should produce about the same results as 2.

Any ideas?
-- 
---
 Robert Withrow, R.W. Withrow Associates, Swampscott MA 01907 USA
 Tel: +1 617 598 4480, Fax: +1 617 598 4430, Net: witr@rwwa.COM

witr@rwwa.COM (Robert Withrow) (04/21/91)

In article <1991Apr19.210815.8136@rwwa.COM> I wrote:
|On my system ``postio'' seems to hang causing ``printer fault'' mail
|saying something about ``printer setup''..???  I've read the printed
|FM, and get no help there.

Has *anyone* gotten *any* postscript printer to work with SVR4?

I doubt it as this seems to be a fertile area for bugs on Intel SVR4
V2.  In fiddling with this I found the following rather obvious bug:

In the documentation for lp(7) it states that the /dev/lpx port
operates as documented in termio(7).  This is a FIB, however, since no
one got around to telling the autopush(1) utility to push the terminal
line discipline module onto this device.  If you want the lp(7) driver
to operate as documented you want to add a line like this to your
/etc/ap/chan.ap file:

# major minor   lastminor       modules
    7     -1       0            ldterm ttcompat

Changing that doesn't make postio work though...It complains about
getting an error ``reading stdout''.  Reading from /dev/lp????
Ho.ho.ho.ho.

So, I moved the printer over to a serial port and tried again.  With a
break-out box inline, I can see the printer and postio talking, but
they don't seem to be saying much.  I printed a 500 byte postscript
file and they have been talking like that for *HOURS*.  I thought the
CompuTune man said that ``computers don't like to engage in
smalltalk!'' 

So, if anyone has gotten a postscript printer to work on their SVR4
system, please tell me what magic you used......Please.....

Also, if anyone knows what postio does that is so important, I'd like
to hear about it.





-- 
---
 Robert Withrow, R.W. Withrow Associates, Swampscott MA 01907 USA
 Tel: +1 617 598 4480, Fax: +1 617 598 4430, Net: witr@rwwa.COM

lee@mport.COM (Lee Crocker) (04/23/91)

witr@rwwa.COM (Robert Withrow) writes:

>Has *anyone* gotten *any* postscript printer to work with SVR4?

We at Microport use an Apple Laserwriter with our SVR4.  It is on a 9600
bps serial connection, and I used the following setup procedure:

(su to root)
$ lpadmin -p apple -v /dev/tty00 -I PS -T PS
$ lpfilter -f postio -l >temp

The file "temp" should contain a line that starts "Command: /usr...".  Edit
this to read:

Command: /usr/lib/lp/postscript/postio -l/dev/tty00 -b9600

Then continue:

$ lpfilter -f postio -F temp
$ rm temp
$ accept apple
$ enable apple
$ lpadmin -d apple

Now, to print a plain text file, just "lp <filename>".  To print a PostScript
program file, use "lp -Tpostscript <filename>".

You can verify that postio can communicate with your printer by running it
in interactive mode:

$ /usr/lib/lp/postscript/postio -l/dev/tty00 -i

After it comes up, type "executive" and press return.  You will not see the
word as you type it, but you will see a banner, and then the printer will
start echoing what you type.  From here, you can send interactive commands
to the printer.  Try "FontDirectory { pop == } forall".  EOF (Ctrl-D) quits.
-- 
Lee Daniel Crocker
lee@mport.com (Microport)
...!uunet!mport!lee
73407.2030@compuserve.com

andyc@bucky.intel.com (Andy Crump) (04/26/91)

witr@rwwa.COM (Robert Withrow) writes:

>Has *anyone* gotten *any* postscript printer to work with SVR4?

Yep.  Here's the info you need.  There is certainly missing info in
the SVR4 documentation and some bugs still lurking.  This info works
on an Apple laserwriter, QMS PS-810, and HP laserjetII with postscript
cartidge for sure.  Your mileage may vary with other postscript
printers.

Here's the scoop (do all this as root):

0) Be sure that your printer is connect to a SERIAL line and not a
parallel one.

1) Configure the printer queue as such:
	
	a) lpadmin -p {name of queue} -v /dev/tty01 -T PS -I PS
                                           ^ name of serial port you are using.
	b) lpadmin -d {name of queue} [optional, make this the default printer]

2) Create a text file (/tmp/foo) that looks like this:

Input types: postdown
Output types: PS
Printer types: PS
Printers: any
Filter type: fast
Command: /usr/lib/lp/postscript/postio -q
Options: PRINTER * = -L/dev/null

3) type the command : 
	lpfilter -f postio -F /tmp/foo

4) Enable and accept the printer:

	accept {name of queue}
	enable {name of queue}

5) just to be sure:

	lpshut
	/usr/lib/lpsched

6) To print a ascii file:

	lp -d {name of queue} filename  

  Try: lp /etc/passwd

7) To print a postscript file:

	lp -d {name of queue} -Tpostscript filename  

8) to print a troff file (via /usr/ucb/troff):

	lp -d {name of queue} -Ttroff file

This works fine for us.  Let me know if you have any problems.
--

    -- Andy Crump

    ...!tektronix!reed!littlei!andyc | andyc@littlei.intel.com
    ...!uunet!littlei!andyc          | andyc@littlei.uu.net

Disclaimer: Any opinions expressed here are my own and 
            not representive of Intel Corportation.

duc@mport.COM (Richard Ducoty) (04/30/91)

lee@mport.COM (Lee Crocker) writes:

>witr@rwwa.COM (Robert Withrow) writes:

>>Has *anyone* gotten *any* postscript printer to work with SVR4?

>We at Microport use an Apple Laserwriter with our SVR4.  It is on a 9600
>bps serial connection, and I used the following setup procedure:
============================================

You have to use a serial connection if you want to use Postscript on
SVR4, using the lp system that is!

You can cat the file, pipe it through the proper filter (postprint, dpost,
etc) and redirect it to /dev/lp - if you have a parallel setup.  I have
a Postscript cartridge in a HP LaserJet II with a parallel connection -
it works alright.  I do have to send ^D to the printer between jobs
or else it prints blank pages.  I wrote a little script - I think it
goes like the following ( it's at home and I'm here)

echo \004 > /dev/lp0

Richard


Richard Ducoty		        \\\\\\\				
Microport Inc.		          (.)(.) 			root@mport.com
voice=> (408) 438-8649	             >	 		  	duc@mport.com
fax=>   (408) 438-7560		    -				uunet!mport!duc
                          " militiae species amor est "

richard@pegasus.com (Richard Foulk) (05/02/91)

>You can cat the file, pipe it through the proper filter (postprint, dpost,
>etc) and redirect it to /dev/lp - if you have a parallel setup.  I have
>a Postscript cartridge in a HP LaserJet II with a parallel connection -
>it works alright.  I do have to send ^D to the printer between jobs
>or else it prints blank pages.  I wrote a little script - I think it
>goes like the following ( it's at home and I'm here)
>
>echo \004 > /dev/lp0
>

Be sure you suppress the cr/lf on that echo or the printer will think
you've started a new job.  The control-D needs to be the very last
character of the job stream.

If you're using Adobe's ehandler.ps to make up for the lack of a return
path for error reports this is important.  Incomplete jobs elicit a timeout
error from PostScript.


-- 
Richard Foulk		richard@pegasus.com