Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lpvi(4S) — SBus Printer Card 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

LPVI(4S)  —  DEVICES AND NETWORK INTERFACES

NAME

lpvi − laser printer video interface driver for the SPARCprinter card

CONFIG

device-driver lpvi

LOAD

modload -entry _lpviinit lpvi.o

SYNOPSIS

#include <unbdev/lpviio.h>
open("/dev/lpvin", mode);

AVAILABILITY

SBus Open Boot PROM Systems only. 

DESCRIPTION

The lpvi device driver provides an interface to a laser printer using the SPARCprinter SBus card on systems with an SBus which use the Open Boot PROM.  The SPARCprinter SBus card is designed for use with a RIP-(Raster Image Processor)-less laser marking engine.  It supports a video and serial interface to the laser printer.  The SPARCprinter card also provides a bidirectional parallel port supported by the bpp device driver. 

The lpvi device can be opened for exclusive access only.  EBUSY is returned if the interface is already open.  EIO is returned if there is no response from the printer on request for status.  Only the character interface is supported. 

Applications using the lpvi driver pass a bitmap containing the image to be printed to the driver via a single call to write(2V).  The write(2V) does not return until the image is actually printed and the paper has exited the printer. 

To improve printer performance calls to write(2V) must be overlapped.  For example, a ring of child processes can be used to write to the device.  The parent process opens the printer and prepares images in shared memory, then signals each child process in turn that an image is ready to be printed.  Alternatively, the application may wish to use the new asynchronous IO system calls, such as aiowrite(3) provided with SunOS 4.1. 

read(2V) is not supported. 

IOCTLS

The following ioctl(2) calls are provided (see /usr/include/unbdev/lpviio.h for related defines and parameters):

LPVIIOC_RESET resets the lpvi interface.  This is not required in normal operation. 

LPVIIOC_TESTIO tests the state of the print engine by sending it a read machine status command. 

LPVIIOC_INQ returns information about the printer configuration and status. 

LPVIIOC_GETERR returns detailed information on the current error condition. 

LPVIIOC_SETPAGE allows the user to describe the dimensions of the bitmap image as well as the printed page layout and resolution. 

LPVIIOC_GETPAGE returns current bitmap image dimensions, page layout, and resolution. 

LPVIIOC_SETMODE sets the operating mode.  Some of the supported modes, for example, are manual feed and print image with reverse polarity (a "negative" image). 

LPVIIOC_GETMODE returns the current operating mode. 

LPVIIOC_SETDSP allows setting of the printer display console by the application. 

ERROR HANDLING

If EIO is returned from a write(2V) call or from any of the ioctl(2) calls, the application should use the LPVIIOC_GETERR ioctl(2) to determine the cause of the problem.  The following problems are reported:

print engine failure

interlock door open

paper jam

no tray

no paper

print engine warming up

toner nearly exhausted

toner exhausted

drum nearly exhausted

drum exhausted

no response from printer - timeout

DMA transfer errors

serial communication errors

FILES

/dev/lpvin

/usr/include/unbdev/lpviio.h

Sun Release 4.1  —  Last change: 2 October 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026