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



on 12/6/08 13:00, Johnny Billquist at bqt%softjar.se@localhost wrote:

> I haven't really been following this, but maybe I should try and help.
> 
> What exactly is the problem, what have you done, and how do your
> printcap look like?

Thank you!

The exact problem is actually quite the mystery.  I'm attempting to connect
a vintage DEC daisy wheel printer (Diablo Hytyper II from an old DECmate I)
to the DEC 3000 / 700 server running NetBSD 4.0

First off, I've had the printer connected to a VT-102 for more than a year.
The printer works.  The cable has also been confirmed as working -- It was
also used to connect the terminal to ttyB0 -- also the port I'm trying to
reassign as the line printer.

The system console is connected to ttyB1. That's determined by the hardware
/ firmware.  The hardware is fairly stable, it's been running since 2003
under a variety of NetBSD releases without a glitch.  The system is
connected to a household network using a Linksys wireless game adapter.  The
network connection is also stable -- I run Lynx, the FTP client, and Telnet
just fine.  To answer Torsten, localhost resolves OK.  The system is
currently on the internet (for telnet only) at imac.paleoferrosaurus.com. If
anybody wants to play with a "guest" account, the userid is Guest and the
password is Password.

What have I done?

Well, I made the physical connection from the computer to the printer.

Then, I tested connectivity using the following:

# cu -s 9600 -l /dev/ttyB0
Connected

Characters typed on the console are transmitted to the printer.  I believe
that this confirms that the port, cable, and printer are all functional.

Now things get a little weird...

#lptest 75 5 > /dev/ttyB0

Does absolutely nothing.

# cat Test.Substances > /dev/ttyB0

Tries to print the file, it generates the "stairstep" effect that an lp
filter should correct.  When the printer buffer gets full, everything stops.
Subsequent output is lost.

Okay, following the NetBSD guide, I start the lpd daemon:

# sh /etc/rc.d/lpd start

I can confirm that lpd is running:

# ps ax | grep lpd
 307 ?     Is   0:00.02 /usr/sbin/lpd -s
#

Again, following the instructions in the NetBSD guide, I setup my printcap
file as follows:

#       $NetBSD: printcap,v 1.13 2006/10/08 15:28:49 elad Exp $
#       from: @(#)printcap      8.1 (Berkeley) 6/9/93

lp|local line printer:\
        :sh:lp=/dev/ttyB0:br#9600:tr=\f:of=/usr/libexec/lpr/lpfilter\
        :sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:

This entry is based on the "decwriter over a tty line" entry.  I understand
that some tty flags may have to be set or cleared to allow operation without
full modem control.  I've experimented with a number of settings without
any success, so those entries are currently removed.

The directory has been created and chmod'd as follows:

# cd /var/spool/lpd
# ls -l
total 4
drwxrwx---  2 daemon  daemon  512 Nov 28 09:43 lp
#

Okay, finally I used the filter lpfilter as described in the NetBSD guide:

#!/bin/sh
# Treat LF as CR+LF
printf "\033&k2G" && cat && exit 0
exit 2

And made it into an executable script.

That's where I am at the moment.  Any and all help is appreciated!

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






Home | Main Index | Thread Index | Old Index