SUMMARY: Connecting HP LaserJet II serial to SS1 with Newsprint

From: Jack Stewart (
Date: Wed Jan 08 1992 - 00:52:17 CST

PROBLEM: How do you hook up a HP LaserJet II to a SPARCstation I using
NEWSPRINT to drive it?


I received a number of different solutions. I only had time to try
one. Most of them revolve around using a special cable. This is what
I did:

1) I created a special device file for the printer. I did this
because the example that I used referenced using /dev/cu*. I did try
sending it to /dev/tty* and it seemed to work fine but I ran out of
patience to fully test it. Since the printer was hooked up to
/dev/ttya I made the following device file -- 'mknod cua0 c 12 128'.

2) I made a special cable for the printer. Below are the pin outs:
        Sun Printer
        1 1
         2 3
        3 2
        4 5
        5 20
        7 7
        20 6

3) I installed the /etc/printcap entry via add_np_printer.

4) I modified the /etc/printcap entry for all of the different printer
names and changed the ms field to ms=litout,crtscts,-echo: .

That was it. It worked like a trooper but it was painfully slow. It
took about 10 minuites to printer a page of simple postscript (this
was at 19200 baud). This was so slow that the person that I did this
for managed to convince her boss (and mine) to buy a SPARCprinter that
she could use while she was on maternity leave (it would come back to
the office when she did, giving us another spare SPARCprinter).
Making, of course, the entire effort an exercise in futility.

I wish to sincerely thank everyone who replied to my original query.
Their responses appear below.


Jack Stewart                                     E-Mail: jack@CCSF.Caltech.EDU
Caltech Concurrent Supercomputing Facility,       Phone: 818-356-2153
Mail Stop # 158-79, 391 S. Holliston, 
Pasadena, CA 91125.                            #include
From: (Brian Stormont)

I have used a Laserjet II with newsprint on a Sparcstation IPC with no problems.

The only thing I needed was a null-modem cable.

One important note: if you use newsprint and the printer is attached serially, expect the page output to be real slow. This is because each page is converted to a raster image, and then sent to the printer, so the smallest text file is quite slow (if newsprint is being used). If you have the Sparcprinter card, I would recommmend using parallel output, rather than serial.


------------------------------------------------------------------------------ From: sdb%hotmomma@uunet.UU.NET (Scott Ballantyne)


The problem is typically the HP configured the serial port on the Laserjet - DTR goes low whenever it wants the sun to stop sending data - this is non-configurable, as far as I can tell - you can turn off the xon/xoff stuff, but you can't get rid of this. With the typical cable setup this will make the sun think the connection is lost! So the solution I used is to make a special cable:

Sun Printer 1 1 2 3 3 2 4 5 5 20 7 7 20 6

You can buy jumper blocks from places like ratshack that make this fairly simple. Then use a printcap like this:

lp|ps|postscript|PostScript:\ :lp=/dev/cua1:br#19200:ms=litout,crtscts,-echo:sf:sb:mx#0:

add filters, and stir.

Hope this was helpful.

------------------------------------------------------------------------------ From: (Keith Dale)

Attach it to ttyb. If you connect a printer to ttya, the system thinks it's a terminal.

-- Keith M. Dale Salomon Inc - UNIX Systems Support (201) 896-7029

------------------------------------------------------------------------------ From: Kristin Schleich <>

I dont know specifically about HPII printers, but I have gotten Newsprint to work with HPIII's and Deskjets on serial ports. You need a null modem cable - pin 2 to pin 3, pin 4 to pin 5, pins 6and 8 to pin 20, etc. There is usually a diagram in the Sparc deskset of one. You might want to get a multimeter and check that that your null modem cable truly is one - I was sold a null modem cable that wasn't one. The next thing is to check that the jumpers for the serial port are set to RS232; sun ships Sparc IPC's and II's in RS423 position so they probably did on Sparc I's. Pop open the box and look for two tiny jumpers somewhere in the middle of the board. Your Deskset Sparc Installation Guide has an appendix describing the two settings and where to find the little things so you should check it for position. Plug everything together and that should be it for hardware.

Now if you installed Newsprint from tape, it will warn you that it has to patch a configuration file for the kernel and will then stuff the file in the right place. However, you have to rebuild your kernel. I beleive that a GENERIC_SMALL or similar works just fine. If you dont remember seeing this or copied stuff over the net, you might want to check that this file is where it ought to be. The patches are living somewhere in the /newsprint files in some subdirectory labeled patches/4.1 or 4.1.1. It replaces one of the /usr/kvm/sys/sun4c/OBJ files - of the same name of course. My advice is, if you are not real sure or comfortable with poking around like this, just reinstall from tape - it takes care of the whole thing.

Check to make sure that you told newsprint where your openwindows files were ( i.e. /usr/openwin) or told newsprint to install its own version.

OK. Now that the kernel is remade, you can install the printer with the add_np_printer shell script in one of the directories under /newsprint. It prompts you for all the details. Next you may need to edit the generated printcap file to set the baud rate to 9600 from 19200 if the HPII wont go that fast. Now, everything should work(??!!); send a file to the printer via the usual route.

OOPS! I forgot that its important to check that you can cat to /dev/ttya right after the hardware is all connected up to make sure that the computer and the printer are talking to each other. As long as whatever you send to the printer gets through, albeit in mangled form, I think you are all right.

Final tips; you probably want to create a /var/spool/licenses directory to shut up newsprint complaining about the lack of one and you can get rid of the usual header file or tailer file or switch them by commenting or uncommenting out the appropriate lines in the .param file in the printers spool directory.

Good luck - serial is slow for text, but the newsprint setup is great for postscript graphics - HP cartridges die after about 10 minutes generating simple little drawings that the Sparc spits out in a minute or two. You may need more memory in the printer maybe a 1 megabyte upgrade if its at its minimum.

Kristin Schleich

------------------------------------------------------------------------------ From: (William D. Sears 1-8369)


I show your post in Comp.sys.sun.admin that you have NeWS print in order to drive your HPII. I am in the process of purchasing an IPC with 4.1.? and wish to use it with a DeskJet 500. Please let me know how you got your system to work. Also, how did you aquire NeWS print? Did it come with the system, or did you have to purchase it separately?

------------------------------------------------------------------------------ From: mh%awds@WLV.IMSD.CONTEL.COM (Mike Hoegeman)

it could be working OK and you not realizing it. over a serial line it takes a ***LONG*** time for it to print. like at least 5 minutes.

------------------------------------------------------------------------------ From: Jim Leous <>

Hi, I tried the same thing, but if you look at page C-3 of the NeWSprint install. and admin guide, they say that you really need at least a 1 meg upgrade. After we did this it worked, but it was SSSSLLLLOOOOWWW. The guy who owns the machine ended up getting a PostScript cartridge. We actually got a 2 meg upgrade rather than just one.

Jim Leous Earth System Science Center Penn State University

------------------------------------------------------------------------------ From: (Domingos Begalli)

Jack, I had the same problem setting up our HPII here at work.

Anyway, the only thing that worked was when I shorted pins 6,8 and 20 on the printer side of the cable. I had a break box with DB25 connectors coming from the Spark and from the HP and I tryed a lot of different configurations with the pins before I looked on the "Answer Book" online from SUN and saw the pinout description. I know that the Spark is a DTE and so is the printer, so a null modem cable will not cut it, but I dindnt quite understand the recomended shorting on those pins.

Thanks and regards...


Domingos Begalli - - C.Itoh Technology - Irvine, CA - 714-757-4429 - fax: 714-757-4423

------------------------------------------------------------------------------ From: (Chaim Frenkel)

I have had no problems. I am currently running the software with an IPC and the HPII and it works (slowly but works :-).

First see if you can cat a file to the printer.

Then check if you have the correct version of the kernel. The install procedure for newsprint appears to generate a patched kernel but does not tell you to install it.

I finally was able to get the HPIII to work after the installation However, This broke my LOTUS, and WP printing. It appears that both do not terminate their postscript files with a <LF>. The fix was to add a new filter to the pl.sun[34] directories which is a sed script to add a linefeed and to remove the ^D's that are in the file.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:33 CDT