Port-alpha archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Configuring Serial Printer - DEC 3000 Model 700 / NetBSD V4.0



---- "Greg A. Woods; Planix wrote:

> I've got a set of patches from way back that try to address some of  
> the problems.  I've only ever used my hacked version to print over  
> parallel and network ports.  (I haven't used a serial printer since  
> the SysV days on a 3b2)  I could post some working sources and see if  
> they help any if you're interested.....

I'm not much of a programmer, sadly. But I'm always interested in seeing how 
somebody else solved a problem.  Working through the existing source for lpd 
isn't proving very helpful to me, but I attribute that to my own lack of 
understanding.

> > #lptest 75 5 > /dev/ttyB0
> >
> > Does absolutely nothing.
> 
> I don't think that should even work without a wrapper setting proper  
> tty modes....

Understood, but that's what the NetBSD guide recommended.

> Something like this might work, with the dots replaced by all the  
> necessary mode flags:
> 
>       ( stty .....; lptest 75 5 ) < /dev/ttyB0 > /dev/ttyB0
> 
> (the trick here is that the subshell must have its stdout _and_ stdin  
> connected to the tty so that the stty command will set the necessary  
> flags and then the lptest command will use the same file descriptor to  
> write to the tty, otherwise the tty will be closed between commands  
> and the flags set by stty will revert to the defaults before the  
> lptest command reopens the tty; stdin is needed because that's what  
> stty operates on by default)

Very interesting.  Thanks for the tip.

> According to your printcap that should be:  /var/spool/output/lpd

Fixed.  Thanks for spotting that.

-- 
Micheal H. McCabe
mhmccabe%alltel.net@localhost




Home | Main Index | Thread Index | Old Index