mike@penguin.gatech.edu (Mike Gourlay) (11/28/90)
Hi, I connected an HP laserJet Series II to my HPUX 370 serial port using a cable I built to go from the 370's 9 pin RS-232 to the printer's 25 pin RS-232. I created the printer, and when I send stuff to it using lp, the header page gets printed, and part of the first page of the printout, and then the printer drops DTR, give ERROR 22 (protocol error), and the HPUX 370 keeps sending data over the serial line, even though the printer doesn't want it. My guess is that the computer is ignoring the printer's xon/xoff control bytes. The possibilities are that 1) my cable is messed up, 2) the hardware for the RS-232 is messed up, or 3) I've done something stupid in the set-up. Does anybodt have the 9-pin to 25-pin layout? I used: Computer Printer -------- ------- 2 3 RD 3 2 TD 5 7 SIG GND 6 & 8 20 DTR I also tried using the /dev/printer `file' via sleep 999999999 < /dev/printer & stty raw 9600 -parenb cs8 ixon -istrip clocal < /dev/printer and then I cat file >> /dev/printer. What happens then is that more of the file gets printed, but if the printer runs out of memory (hence sending an xoff to the computer) or a page gets form-fed (which also causes the printer to send a ^S to the computer), the computer ignores the ^S (speculation) and so the printer, not wanting any more data, but still receiving data, punts, and drops DTR. Can anyone help me? I hope its the cable. I called the HP LaserJet hotline, and they are completely 100% clueless. They know NOTHING about HPUX. They are only trained on MS-DOS, and they ask me stupid questions. My local HP reps say that what I have should work, but obviously they are wrong. Thanks in advance, Mike
walter@hpsadle.HP.COM (Walter Coole) (11/28/90)
I'm not an expert, but I've done what yur trying to do. Since you got coherent stuff from the first page, it's unlikely that you have the pinout wrong. Did you want CS/CB (hardware) handshaking or ^S/^Q (software) handshaking? The LJ will do both. If you want CS/CB, you will need those pins connected, but unless you need it (because for instance you have a switch box to share the printer with another device), ^S^Q only requires the three wires to be connected. I use a 98561-61604 cable with another cable after it that connects 2-3, 3-2, 7-7, and 20-6 (the bare essentials from a 13242G cable). For CS/CB handshaking, you need to set the minor device number correctly. You may need to check your device model, since some of them fiddle with device settings. In particular, be sure that the receive baud rate is the same as your printer is set to.
mike@penguin.gatech.edu (Mike Gourlay) (11/28/90)
In article <770038@hpsadle.HP.COM>, walter@hpsadle.HP.COM (Walter Coole) writes: |> I'm not an expert, but I've done what yur trying to do. Since you got |> coherent stuff from the first page, it's unlikely that you have the |> pinout wrong. The pinpout could still be wrong. If the printer's TD is not connected to the computer's RD then the computer could send stuff to the printer, but when the printer sends the ^S, the computer ignores it, and keep sending data anyway. That's what seems to be happening. |> Did you want CS/CB (hardware) handshaking or ^S/^Q |> (software) handshaking? I was going to use ^S/^Q but if this continues, I'll use CS/CB. |> The LJ will do both. If you want CS/CB, you |> will need those pins connected, Please tell me what those pins are. I can't get ^S/^Q to work. |> but unless you need it (because for |> instance you have a switch box to share the printer with another |> device), ^S^Q only requires the three wires to be connected. I use a |> 98561-61604 cable with another cable after it that connects 2-3, 3-2, |> 7-7, and 20-6 (the bare essentials from a 13242G cable). Is that 20 on the printer side to 6 on the computer/98561-61604 side, or the other way around? I have a 98561-61604 cable. I tried both configurations. I figured that the 6 on the computer side should go to 20 on the printer side, but neither way worked. Please tell me anyway, so I know for sure what should be working. What is a 13242G cable? |> For CS/CB |> handshaking, you need to set the minor device number correctly. What is the minor device number, please? What else needs to be done? What do I tell the printer? Do I make DTR polarity HI or LO? How about XON/XOFF on the printer when I want to use CS/CB? Since ^S/^Q doesn't work for me, I'll try CS/CB. |> You |> may need to check your device model, since some of them fiddle with |> device settings. In particular, be sure that the receive baud rate is |> the same as your printer is set to. What should I look for other than baud? Since I got data to the printer it seems that everything is probably okay in that respect. Thanks for your reply, Mike Gourlay, mike@penguin.gatech.edu
perry@hpfcdc.HP.COM (Perry Scott) (11/29/90)
>mike@penguin.gatech.edu (Mike Gourlay) >Hi, > > I connected an HP laserJet Series II to my HPUX 370 serial port >using a cable I built to go from the 370's 9 pin RS-232 to the printer's 25 pin >RS-232. I created the printer, and when I send stuff to it using lp, the >header page gets printed, and part of the first page of the printout, and then >the printer drops DTR, give ERROR 22 (protocol error), and the HPUX 370 keeps >sending data over the serial line, even though the printer doesn't want it. > > Mike The LaserJet II drops DTR to tell the computer to stop sending. Apparently, this is The Right Thing To Do if you are a PC, the LJ-II's primary market. The solution is to kludge up a cable that connects DTR on the printer end to CTS on the computer end. HP makes such an animal, but I don't know what it is. Then, enable CTS pacing by ORing 0x08 into the minor number of the tty file. I think this incantation should work: mknod /dev/tty09 c 1 0x09000C Perry Scott Ex-300-tty-guru
rjn@hpfcso.HP.COM (Bob Niland) (12/11/90)
re: > I connected an HP laserJet Series II to my HPUX 370 serial port > using a cable I built to go from the 370's 9 pin RS-232 to the > printer's 25 pin RS-232. Cables to use: 92221P direct 9M to 25M, or... 98561-61604 9M-25F adaptor plus 40242G or 13242G You need to bring DTR in on CTS to get the hardware flow control. You also need to set a bit in the device file minor number to turn on CTS detection in the host. Also request the latest serial driver from your HP support person. Earlier ones may not do CTS correctly. The following covers more than just CTS.... re: Advanced Serial Driver Date: 27 Nov 90 Here are the things you can control on the 400 #1 and 345/375 serial port with the 7.05 or pre-release 7.0/7.03 driver. Some of this is not yet documented in any published manuals. Contact your HP support representative for a copy of the driver. Have them contact me if they don't have it. Permissions Owner Group Major Minor Last write File name crw--w--w- 1 root crm 1 0x090000 Feb 28 09:39 tty09 crw-rw-rw- 1 root other 1 0x090001 Nov 4 1988 cua09 crw-rw-rw- 1 root other 1 0x090001 Feb 12 14:17 cul09 # # example LP files # crw--w--w- 1 root bin 1 0x0900cc Mar 19 11:44 lp crw-rw-rw- 1 lp bin 1 0x0900cc Mar 1 1989 rlp ^^^^^^^^ | __________________________/ / | V TERMINALS: 0xScPoAc where Sc = card select code (05, 06, 09) Po = port number (98642); 00 for other cards Ac = access type Access type bit fields: AABB CDEF AA = receive fifo trigger level 00 = 1 01 = 4 10 = 8 11 = 14 (not on select codes 5 & 6) BB = effective tx fifo size 00 = 12 (16 on all other buffered cards) 01 = 8 10 = 4 11 = 1 AA only on 345/375 built-in ports 05, 06, 09, 98628A, 98638A and 98642A BB only on 345/375 built-in port 09, 98628A, 98638A and 98642A C = 0 hardware handshake disabled (CTS/RTS) C = 1 hardware handshake enabled CTS available on all built-in 05, 06, 09, 98626A, 98628A, 98638A and 98642A port 0 RTS available on 345/375/400 built-in 09 D = 0 modem (or modem eliminator) D = 1 direct connect Not supported on 98642A ports 1,2,3 E = 0 US modems E = 1 CCITT mode (for European modem support) Not supported on 98642A ports 1,2,3 F = 0 call-in port F = 1 call-out port (for cu* devices) In addition, UNIX (HP-UX) routinely allows control of the following items. See the termio(7) manual page in the HP-UX Reference Manual for details. speed 19200 baud; line = 0; susp <undef>; dsusp <undef> intr = ^C; quit = ^\; erase = ^H; kill = ^U; swtch = ^@ eof = ^D; eol = ^@; min = 4; time = 0; stop = ^S; start = ^Q -parenb -parodd cs8 -cstopb -hupcl cread clocal -loblk -crts -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc ixon ixany -ixoff -ienqak isig icanon iexten -xcase echo echoe echok -echonl -noflsh opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop Note "ienqak" is ignored on the 300 and 800. # example /etc/inittab entries (don't use both on the same port) # 09:2:respawn:/etc/getty -h tty09 HST 09:2:respawn:/etc/getty -h lp LPH {if using CTS flow control} 09:2:respawn:/etc/getty -h lp LP {if not} # example customized /etc/gettydef entries # The "LP" and "LPH" entry keeps the port properly configure for unspooled I/O. # LP# B19200 SANE CS8 ONLCR CLOCAL IXON IXANY TAB3 OPOST ###LP LPH# B19200 SANE CS8 ONLCR CLOCAL TAB3 OPOST ###LPH HST# B19200 SANE HUPCL CS8 ISTRIP IXON IXOFF # B19200 SANE HUPCL CS8 ISTRIP IXON IXOFF #HST login: #HST # example /usr/lib/uucp/Devices entries (HST modem) # <type> <cul> <cua> <speed> PROG/usr/lib/dialit <type> /dev/<cul> \T \S \P Direct tty09 0 19200 direct Direct cul09 0 19200 direct ACUHP92205A cul09 cua09 19200 hp92205A Regards, Hewlett-Packard Bob Niland 3404 East Harmony Road Internet: rjn@hpfcrjn.FC.HP.COM Fort Collins UUCP: [hplabs|hpu*!hpfcse]!hpfcrjn!rjn CO 80525-9599 This response does not represent the official position of, or statement by, the Hewlett-Packard Company. The above data is provided for informational purposes only. It is supplied without warranty of any kind.
paul@eye.com (Paul B. Booth) (12/13/90)
In article <7370267@hpfcso.HP.COM> rjn@hpfcso.HP.COM (Bob Niland) writes: > >Here are the things you can control on the 400 #1 and 345/375 serial port >with the 7.05 or pre-release 7.0/7.03 driver. Some of this is not yet >documented in any published manuals. ... bunch of useful info .... The serial port info that Bob posted is available in the ReleaseNotes file for 7.05. It's in /etc/newconfig/ReleaseNotes on my system. -- Paul B. Booth (paul@eye.com) (...!hplabs!hpfcla!eye!paul) ------------------------------------------------------------------------------- 3D/EYE, Inc., 2359 N. Triphammer Rd., Ithaca, NY 14850 voice: (607)257-1381 fax: (607)257-7335
richard@hpfcdc.HP.COM (Richard Artz) (12/16/90)
Paul Booth replied: >The serial port info that Bob posted is available in the ReleaseNotes >file for 7.05. It's in /etc/newconfig/ReleaseNotes on my system. The printed 7.05 release notes is part number 98594-90802 and it comes with the 7.05 upgrade. Richard Artz / OSSD Learning Products / 303-229-2036 / richard@hpfcww.fc.hp.com Hewlett-Packard / MS11 / 3404 E. Harmony Road / Fort Collins, CO 80525-9599