SUMMARY: Serial printer, DTR/DSR (hardware handshaking), switch box

From: Joel L. Seber ... CH210 (JLS2013@tntech.edu)
Date: Sat May 29 1993 - 03:58:22 CDT


Thanks to the efforts of several people including some local technicians,
everything works. If you are ever going to share a printer between sun4c's
and PCs through an automatic switch box, this post will be a keeper.

My original query:

>System: Sparcstation 1, 16MB, 200MB hard drive
>Printer: HP Laserjet III
>OS: SUNOS 4.1.1b
>
>I have RTFMs, the FAQ, reference texts, and went to WAIS to look at previous
>summaries for sun-managers before posting this. If I missed something
>obvious, please forgive me.
>
>I have a Laserjet III connected to two PC clones and a Sparc 1 via an
>'intelligent' switch box (not buffered), which requires me to use hardware
>handshaking to talk to the printer instead of XON/XOFF, which worked fine
>with our manual switch box before. BTW, the PCs work fine with the new box.
>I cannot find any example or much talk about connecting a printer to a
>Sparcstation via hardware handshaking. If anyone can help, please do so.
>'printcap' entries and any insights welcome. BTW (again), our computer
>center installed the wiring. I looked at it, and it looks good for
>DTR/DSR-type communications.
>
>As always, I will summarize.

And here is the summary:

The box in questions is an MS-401 4-to-1 Automatic Switch Box, which is a
DCE (Data Communications Equipment) box. In order to
to make the Sun speak to it correctly, several things have to happen:

1) have the correct cable. This works for me:

      SUN MS-401
       2----------------------2
       3----------------------3
       7----------------------7
       5----------------------6

This is not a misprint, and apparently this is all you need cable-wise...

2) You MUST use port A unless you go into your kernal files and patch port B
   be equivalent to A's setup. Look in the System and Admin manual for more
   details. B is apparently set up to be connected to a modem and handles
   some key signals differently. Too much to reproduce here.

3) The correct options in /etc/printcap. I got some of these, most notably
   crtscts, from the folks who replied. It is mentioned in the 'stty' man
   page, and I did see it before I was mailed about them, even though the man
   page is misformatted (to fix that, edit 'stty.1', go to line 818, and add
   a line containing ".TP" before the line ".BR -crtscts"... Thanks, Glenn).
   It is VITALLY important that there NOT be a "-" (hyphen) before the crtscts
   entry; at least for my setup, it caused handskaking problems. Here is my
   current, working printcap to use as a model. Please note I still need to
   have separate spool directories for each queue defined... just haven't
   fixed that yet:

lp|lw|LASER|laser|LASERJET|laserjet:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:\
        :sh:lf=/var/adm/lpd-errs:\
        :mx#0:ms=pass8,-onlcr,-echo,-opost,ixon,ixoff,crtscts:
# HP 7550 plotter on host ch208c
2|plotter|lot|plot|HP 7550 pen plotter:\
        :lp=:rm=ch208c:rp=plotter:sd=/usr/spool/plotter:
# Normal printing
dos|transp|HP laserjet:\
        :lp=/dev/ttya:sd=/var/spool/dos:br#9600:pl#60:\
        :sh:lf=/var/adm/lpd-errs:\
        :mx#0:ms=pass8,-onlcr,-echo,-opost,ixon,ixoff,crtscts:
# HPLJIII as HPGL
hpgl|HP laserjet III as HPGL:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:pl#60:\
        :sh:lf=/var/adm/lpd-errs:if=/usr/local/filters/hpljiii-hpgl:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# printcap file for HP Laserjet printer (portrait raster plot)
#lot|plot:\
# :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:\
# :sh:lf=/var/adm/lpd-errs:vf=/usr/local/drivers/current/plotfile:
# printcap file for HP Laserjet printer (landscape raster plot)
lan|plan|land|pland:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:\
        :sh:lf=/var/adm/lpd-errs:vf=/usr/local/drivers/current/plotland:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# printcap file for HP Laserjet printer (text, compressed font)
comp|fast|line|lineprint|lineprinter:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:pl#60:\
        :sh:lf=/var/adm/lpd-errs:of=/usr/local/drivers/current/laserfast:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# printcap file for HP Laserjet printer (text, courier font)
cour:\
        :lp=/dev/ttya:sd=/var/spool/cour:br#9600:pl#60:\
        :sh:lf=/var/adm/lpd-errs:of=/usr/local/drivers/current/courier:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# HPLJIII (text, elite pitch)
elite:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:pl#60:\
        :sh:lf=/var/adm/lpd-errs:\
        :of=/usr/local/drivers/current/courier-elite:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# printcap file for HP Laserjet printer (portrait byte-encoded raster plot)
tek|TEK:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:fs#40:\
        :sh:lf=/var/adm/lpd-errs:vf=/usr/local/drivers/current/tekplot:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# printcap file for HP Laserjet printer (landscape byte-encoded raster plot)
tekplan:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:\
        :sh:lf=/var/adm/lpd-errs:vf=/usr/local/drivers/current/tekplan:\
        :mx#0:ms=pass8,onlcr,-echo,ixon,ixoff,crtscts:
# test entry for HP Laserjet III
rawljiii:\
        :lp=/dev/ttya:sd=/var/spool/lpd:br#9600:\
        :sh:lf=/var/adm/lpd-errs:\
        :mx#0:ms=pass8,-onlcr,-echo,-opost,ixon,ixoff,crtscts:

I do use some public domain drivers and filters, as outlined. These do not
affect the handskaking operations; I checked.

4) Correct Laserjet console settings. Be sure to set DTR POLARITY=HI, and
   ROBUST XON=OFF. Otherwise, normal settings for a 9600 baud serial
   connection as desccribed in the Laserjet manual.

Thanks to the following responders:

rhallqui@rigel.uark.edu Roy S. Hallquist, Jr. (thanx for the
                                            master printcap listing!)
tim@otis.hssc.scarolina.edu Tim White
jbarth@hptele7.telerate.com Jeremy Barth
ept@eptsun1.ctd.ornl.gov E P Tinnel
geanel@cn.laafb.af.mil Edmund L. Gean
ups!upstage!glenn@fourx.aus.sun.com Glenn Satchell
david@bdt.com David Beckemeyer

Until next time,

Joel L. Seber | Dry humor is wasted around here.
SUN Workstation Laboratory Manager |
Center for Manufacturing Research | -Joel L. Seber
      and Technology Utilization |
Tennessee Technological University | recursive, adj.
Cookeville, TN 38505 | See 'recursive'
                                        |
jls2013@tntech.edu |



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:54 CDT