[comp.sys.hp] Laserjet and MPE

glee@cognos.UUCP (Godfrey Lee) (07/22/89)

Apparently, when we try to send a raster image to the HP Laserjet, the
NUL characters are stripped out by the MPE operating system.

Does anyone know of a way around this problem?
-- 
Godfrey Lee                                            P.O. Box 9707
Cognos Incorporated                                    3755 Riverside Dr.
VOICE:  (613) 738-1338 x3802   FAX: (613) 738-0002     Ottawa, Ontario
UUCP: uunet!mitel!sce!cognos!glee                      CANADA  K1G 3Z4

dcarter@ferret.rtech.com (Dan Carter) (07/26/89)

In article <6635@cognos.UUCP> glee@cognos.UUCP (Godfrey Lee) writes:
>Apparently, when we try to send a raster image to the HP Laserjet, the
>NUL characters are stripped out by the MPE operating system.
>
>Does anyone know of a way around this problem?

To send binary data to a device, you must inform the driver to keep its hands
off your data and transmit whatever you send.  If you're attempting to write
through the MPE spooler, you're probably out of luck.  It opens the device 
in a standard mode, and you have no opportunity to modify any parameters.  A 
related example is attempting to write to a device with non-HP-standard parity
requirements.  In both cases a special-purpose program is required.

I have had some luck at sending binary data to an async device (a cartridge
tape drive in a 2645 terminal, but that's another story) by FOPENing the
LDEV and issuing FCONTROL 27, to enable binary transfers.  What I don't 
know is what effect the binary transfer mode has on flow control characters
coming from the device to the host.  They may be treated as incoming data
since you've told the driver to become transparent; that would lead to data
overrun.  If that is the case, try FCONTROL 41, which sets "unedited mode".
I'm not sure of all the differences between the two, but the documentation
indicates that flow control will be obeyed with the 41.

You didn't mention whether you're on a Classic or Spectrum HP3000.  Most HP
printers on Classics are configured with a terminal type that uses ENQ-ACK
flow control (e.g., termtype 19).  If that's the case in your situation you
will need to issue an FCONTROL 38 to set the terminal type to 18 (generic,
non-HP printer), which has the effect of disabling ENQ-ACK.  Otherwise, you'll
get ENQ characters (hex 5) interspersed with data.

My HP3000 async device hacking is a little rusty, so you'll need to do some
experimenting to solve this problem (having a datascope handy wouldn't hurt a
bit).  There may be some real jiffy way around the problem that I don't know
about.  If you find one I'd like to hear about it.

Dan Carter
Relational Technology, Inc.
Alameda, CA
dcarter@rabbit.rtech.com