Advice needed interfacing a printer
Brent L. Bates TAD/TAB ms294 x42854
blbates at AERO4.LARC.NASA.GOV
Fri Jul 7 22:51:29 AEST 1989
I have used several printers on our 3130 with out too much problem.
(That is after I got everything working.) I have conneted a HP ThinkJet,
a Seiko CH-5201 color hardcopy unit, a Tandy 24-pin dot matrix printer,
and a Tektronix 4693D printer to our 3130 through the serial ports
/dev/ttyf2 and /dev/ttyf3. I had to use a serial to parallel converter
for the last three and some extra hardware to get the Seiko to work.
Follow the directions in section 7.9, pages 7-21 through 7-24 in the
IRIS Series 3000 Owner's Guide V3.0 or Appendix C, pages C-21 through
C-23 in the V2.0 Owner's Guide. However, before doing so put the
appropriate filter into /usr/spool/lp/model. Right now I use a Tektronix
4693D connected to the parallel port and two remote printers.
It has been long time since I used the serial ports for printers, I think
the interfaces still work. I think one of the key things in getting the
interfaces to work was to use the timing functions of stty instead of null
character padding.
I am enclosing the interfaces I used on these devices, I used the same
interface for the Thinkjet and Tandy printers:
-----------------------------Cut Here--------------------------------------
# lp interface for thinkjet printer
#
# SCCS @(#)thinkjet 1.1
# @(#)$Header: /ws/2.0/2.0src/usr/src/usr.bin/lp/model/RCS/dumb,v 1.2 85/03/15 15:19:59 bob Exp $
# $Log: thinkjet,v $
# Revision 1.2 85/03/15 15:19:59 bob
# Revisized 8801.27 Brent L. Bates
# Added initial blank line (for csh) and what
#
log=/usr/spool/lp/etc/log/thinkjet-log
seqid=$1
echo "Start $seqid - `date`" >> $log
stty 9600 ixon ixany ixoff -ofill cr0 nl0 tab0 bs0 ff1 vt0 0<&1
copies=$4
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
for file in $files
do
cat "$file" 2>&1
echo "\014"
done
i=`expr $i + 1`
done
echo "End $seqid - `date`" >> $log
exit 0
-----------------------------Cut Here--------------------------------------
# serial lp interface for seiko & Tektronix 4693D printers
#
# SCCS @(#)thinkjet 1.1
# @(#)$Header: /ws/2.0/2.0src/usr/src/usr.bin/lp/model/RCS/dumb,v 1.2 85/03/15 15:19:59 bob Exp $
# $Log: thinkjet,v $
# Revision 1.2 85/03/15 15:19:59 bob
# Revisized 8807.01 Brent L. Bates
# Added initial blank line (for csh) and what
#
log=/usr/spool/lp/etc/log/thinkjet-log
seqid=$1
echo "Start $seqid - `date`" >> $log
stty raw cs8 19200 -cstopb cread -clocal ixon ixany ixoff -ofill cr3 nl1 tab2 bs1 ff1 vt1 0<&1
copies=$4
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
for file in $files
do
cat "$file" 2>&1
echo "\0"
done
i=`expr $i + 1`
done
echo "End $seqid - `date`" >> $log
exit 0
-----------------------------Cut Here--------------------------------------
I hope this helpful.
--
Brent L. Bates
NASA-Langley Research Center
M.S. 294
Hampton, Virginia 23665-5225
(804) 864-2854
E-mail: blbates at aero4.larc.nasa.gov or blbates at aero2.larc.nasa.gov
More information about the Comp.sys.sgi
mailing list