[Note: This file generated via: man parallel | col -bx > Parallel.txt } NAME plp - parallel line printer interface SYNOPSIS #include /dev/plp /dev/plpbi DESCRIPTION The special files /dev/plp and /dev/plpbi refer to the parallel printer interface on the Personal IRIS, Indigo, Indy, Indigo2, and Challenge/Onyx products. Please note that reference to "non 4D/20 and 4D/25" IRIS, anywhere in this manpage is equivalent to IRIS 4D/30, 4D/35, 4D/RPC, 4D/RPC-50, Indy, Indigo2 and Challenge/Onyx. The plp device on the IRIS 4D/20 and 4D/25 supports output to a Centronics-compatible printer connected to the builtin parallel printer port. Normally, /dev/plp is directly accessed only by a print spooling mechanism such as the lp(1) subsystem. The special file /dev/plp may only be open for writing by one process at a time. However, several processes may open the device read-only so as to obtain printer status. A printer reset (INPUT PRIME) is issued whenever the device is opened for writing. The plp device on the non 4D/20 and 4D/25 supports Centronics and Bidirectional Centronics interfaces. Normally, /dev/plp and /dev/plpbi are directly accessed only by a print spooling mechanism such as the lp(1) subsystem. Any number of processes may open the device for reading or writing, but these processes must synchronize reads and writes to prevent intermingled data. A printer reset is automatically issued only once at system startup. Also the special file /dev/plpbi may be open for reading and writing by one process at a time. The following ioctls are defined in the include file and may be used to control the device: PLPIOCSTATUS Returns the current printer status. PLPIOCRESET Cancels any current printing and asserts the "INPUT PRIME" signal to the printer. PLPIOCTYPE Defines interface STB and ACK signals to be either Centronics or Versatec polarity (argument is PLP_TYPE_CENT or PLP_TYPE_VERS). Non 4D/20 and 4D/25 only. PLPIOCSTROBE Sets the duration and duty cycle of the data strobe output. A macro is provided, PLP_STROBE, which converts strobe length to the argument format. See . Non 4D/20 and 4D/25 only. PLPIOCESTROBE Sets the set-up, pulse, and hold times of the data strobe output. A macro is provided, PLP_ESTROBE, which converts strobe length to the argument format. See . Challenge/Onyx L/XL only. PLPIOCIGNACK Argument of 1 causes the acknowledge input from the interface to be ignored. Argument of 0 reenables the acknowledge input. Non 4D/20 and 4D/25 only. PLPIOCWTO Set write timeout value, the length of time a write command will wait before timing out, in seconds (default is 60 seconds). Non 4D/20 and 4D/25 only. PLPIOCRTO Set read timeout value, the length of time a read command will wait before timing out, in seconds. Non 4D/20 and 4D/25 only. All writes are immediately followed by reads therefore note that this value directly affects each write. PLPIOCREAD Enables the reads from the port (bidirectional mode). For all Indy and Indigo2 products PLPIOMODE ioctl is a prerequisite. Should only be set once at the time the device is opened. Use the following code to set it (it remains set until the port is closed). .... if (ioctl (scanner, PLPIOCREAD, 1) < 0) { close (scanner); return -1; } .... PLPIOMODE This ioctl is supported for all Indy and Indigo2 products. Causes the driver to set the controller for bidirectional IO. Should only be set once at initialization time. Use the following code to set it: .... if (ioctl (scanner, PLPIOMODE, 1) < 0) { close (scanner); return -1; } .... The PLPIOCSTATUS ioctl returns the printer status as an integer bit-mask based on constants defined in . The constants are described below: FAULT Printer is in fault state EOI End of Ink (Ribbon out) EOP End of Paper ONLINE Printer is on line Not all printers support all of these status indications. FILES /dev/plp, /dev/plpbi SEE ALSO lp(1) ELECTRICAL INTERFACE Normal 36-pin Centronics at the printer/scanner end. STANDARD CENTRONICS PARALLEL PORT _____________________________________________ __________________|__________________________ 1 | STB 2 | DATA1 3 | DATA2 4 | DATA3 5 | DATA4 6 | DATA5 7 | DATA6 8 | DATA7 9 | DATA8 10 | ACK 11 | BUSY 12 | PE 13 | ONLINE 14 | PR/SC 15 | NOPAPER 16 | N.C. 17 | NOINK 18 | N.C. 19-30 | Signal Ground 31 | RESET 32-36 | N.C. Standard DB-25 connector on host end. 25-PIN PARALLEL PORT CONNECTOR _______________________________________ _______________|_______________________ 1 | STB 2 | DATA1 3 | DATA2 4 | DATA3 5 | DATA4 6 | DATA5 7 | DATA6 8 | DATA7 9 DATA8 10 | ACK 11 | BUSY 12 | PE 13 | ONLINE 14 | PR/SC 15 | FAULT 16 | RESET 17 | NOINK 18 | N.C. 19-25 | Signal Ground