Thanks to all who resonded, especially Michael Sullivan who pinpointed my
problem.
It turns out that my printer requires a delay after control characters.
I've included Mike's reply which shows a simple script to determine if this
is the problem. Now that I've identified the problem, which is usually
hardware or printer configuration I'm researching how to modify my printers
configuration. THanks again.
----My original question: I've connected a Bull PR-88 Line Printer via a centronics port on an etherlite port expander for use on the sun system. I've done the same thing with a Printronix PR-90 printer and have had no problems. We have no documentation at all on the Bull PR-88 printer. I've experimented with all the settings however the best results from cat file >> /dev/sts/lpn28 (printer) prints the lines with extra linefeeds and the start of the line is different for each line - looks like:
This is the first line This may be the second line
The 3rd is here
end of 4th line.
Parity is set at none for the printer and for the /dev/sts/lpn28.
I researched the FAQ's and found a suggestion to modify /etc/lp/interfaces/printer to cat through unix2dos. When I've tried this it doesn't line feed at all. I then changed a printer setting to LF on CR and then it would double space and still print every 3rd or 4th line at a wrong starting position.
This may not be the correct forum for this question but if anyone has had any experience with setting up an OLD line printer to print from the sun I'd really appreciate some help.
I'm defining this printer on a SUN UE 4000 running Solaris 2.6 with all the current recommended patches.
Thanks in advance, I will summerize.
Laura A. Bishop Naval Safety Center, Norfolk, VA (757)444-3520 x7023 lbishop@safecen.navy.mil
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
-- Replies I don't know anything about your model of printer, but I recall that once upon a time it was common for printers to require a delay after control characters that involved movement such as line feed, carriage return, tab, etc. to give the printer a chance to finish moving before it was safe to send more printable characters.
The serial driver still has the ability to create such delays by inserting fill characters (typically nulls) after such movement-related control characters; this feature is controlled by the stty modes cr1, cr2, cr3, nl1, tab1, tab2, tab3, etc. Unfortunately, I doubt that there is similar support in parallel port drivers since printers normally use the parallel port's handshaking mechanism for flow control to prevent the computer from sending characters until the printer is ready for them. I suppose it is possible that your printer is trying to do this, but some misconfiguration or hardware fault is preventing the hardware handshaking from working properly.
You should be able to test whether timing is the problem by repeating your simple experiment mentioned above with cat replaced by a simple script that delays between lines, e.g.:
#!/bin/ksh crdelay=2 nldelay=2 while read line do print -n -r "$line" print -n '\r' sleep $crdelay print sleep $nldelay done
Of course, these delays are probably very excessive. Note that this script only reads from standard input; it doesn't take a file name argument so you must run it like: delaycat < file > /dev/sts/lpn28 -- Michael T. Sullivan | e-mail: mike@trdlnk.com TradeLink L.L.C. | voice: +1 312 408 2599 175 W. Jackson, Suite A1235 | fax: +1 312 939 2531 Chicago, Illinois 60604 USA |
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:48 CDT