Printer Connection Problem

Jaap Bril jaap at kunivv1.sci.kun.nl
Wed Aug 10 19:44:40 AEST 1988


We encountered a similar problem connecting a (non-postscript) printer to
a VAX with 4.2BSD.

It turned out that the ioctl-calls lpr did were faulty.
#
a5010c| ACCOUNTED printer :\
	:lp=/dev/a5010c:\
	:sd=/usr/spool/a5010c:\
	:st=/usr/adm/a5010c/status:\
	:af=/usr/adm/a5010c/acc:\
	:if=/usr/adm/a5010c/filter:\
	:lf=/usr/adm/a5016t/log:\
	:xs#0000040:\
	:pl#66:\
	:py#67:\
	:pw#96:\
	:px#96:\
	:tr=:br#9600:\
	:sc:\
	:sh:
#
We patched by putting in a driver (converter) wich did a setline:

#ifdef 4.2BSD
#include <sgtty.h>

/* these really should be in lpd */

setline()
{
	struct sgttyb tty_sg;	/* needed for an */
	short int tty_local;	/* 8 bit interface with xonn/xoff */

	ioctl(1,TIOCGETP,&tty_sg);
	ioctl(1,TIOCLGET,&tty_local);
	ioctl(1,TIOCSETP,&tty_sg);
	ioctl(1,TIOCLSET,&tty_local);
	ioctl(1,TIOCSETP,&tty_sg);
}
#endif

MAybe this works for SUN too.
-- 
*Jaap Bril                                 * mcvax!kunivv1!jaap               * 
*computer&communicatie zaken               *                                  *
*faculteit wiskunde en natuurwetenschappen *                                  *
*KU Nijmegen, The Netherlands              *                                  *



More information about the Comp.unix.questions mailing list