Question & Answer
Question
Adding Parallel Printers at AIX 4 and 5
Answer
This document describes how to configure a printer device and one or more print queues. Use this procedure to connect a printer directly to a parallel port on the local host.
This document applies to AIX Versions 4 and 5.
NOTE: If you only want to configure a printer without adding a print queue, do not use this procedure. See the section "Configuring a printer without adding a queue" in this document.
PrerequisitesConfiguring a local printer and adding a queue
Testing the print queue
Troubleshooting parallel port problems
Files changed when adding an AIX 4 or 5 local queue
Configuring a printer without adding a queue
Prerequisites
- Read the documentation for your printer.
Printer-specific information may be needed to connect and configure the printer.
- A parallel port must be available on the system.
# lsdev -Cc printer | grep 0P will show if a printer is already attached. - You must have root authority.
Configuring a local printer and adding a queue
- Connect the printer to the local host by performing the following steps:
- Use the shutdown command to halt the system.
- Turn off the system and any external devices.
- Connect the printer to the appropriate parallel port with a supported cable of less than or equal to six feet.
- Set up your printer as described in the printer documentation.
- Restart the system.
- Enter the SMIT fastpath:
- smit mkpq
- Select the attachment type local.
- Select the manufacturer of the printer.
If the manufacturer of your printer is not listed,- select a supported printer with similar characteristics or
- select Other to use a generic printer definition.
- Select the printer model.
If your printer model is not listed,- select a supported printer with similar characteristics or
- select Other to use a generic printer definition.
If you select a generic printer definition, you will get a no printer initialization string generated before a print job. As a result, print flags such as setting pitch and page orientation will have no effect.
- If prompted, select the Add NEW Printer option.
If you already have a printer added, select the device to which you want to add the queue.
- lp0 IBM 4029 LaserPrinter
- Select the type of printer interface.
- parallel
- Select the parent adapter.
- ppa0 Available 00-00-0P Standard I/O Parallel Port Adapter
- Fill in queue names in the following screen (number and type of
emulation will vary based on printer type selected):
Add a Print Queue Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] Description IBM 4029 LaserPrinter Names of NEW print queues to add ASCII [ascpp0] GL Emulation [glpp0] PCL Emulation [pclpp0] PostScript [pspp0] IBM 5587 G01 Japanese Data Stream Emulation by [] 4029 Printer connection characteristics * PORT number [p] + Type of PARALLEL INTERFACE [standard] + Printer TIME OUT period (seconds) [600] +# STATE to be configured at boot time availableNOTE: If the printer supports more than one type of print data, such as PostScript and ASCII, enter a print queue name for each print data type. - Review and change the remaining attributes as necessary.
- Select Do or hit the Enter key to add the printer.
- When the printer and print queues have been created successfully,
their names are displayed. Be sure to note any error messages.
- Select Exit and then enter the SMIT fastpath to customize the new printer attributes.
Testing the print queue
To test the print queue make sure you use a file that is appropriate for the printer you have attached. If you are testing an ASCII text or PCL queue, one of the following commands is recommended:
- lptest 10 10 | qprt -P <queue>
- enq -P<queue> /etc/motd
- lptest 10 10 > /dev/lp2 (use correct lp number)
If you are testing a printer that prints only PostScript or HPGL, print a known good file or use the following commands:
lptest 10 10 | enscript -d<psqueue>
- qprt -Ban -P<ps_queue> /usr/lib/lpd/pio/burst/H.ps
With HPGL it is best to use a known good file.
Troubleshooting parallel port problems
Some common problems when printing to parallel port printers are:- Defective parallel cable
- Parallel cable longer than six feet
- Printer setup for serial rather than parallel-common on proprinters and
HPLJ III
- Delay setting for older parallel printers and plotters-a common symptom being initial printing is fine, after a moment though, data is lost
Setting the Delay for Parallel Port Printing
The handshaking on the parallel port is quite simple but depends on the printer receiving the data within a set period of time after the data has been shown as READY. There is a single SMIT setting for this.
- smitty printer
- Choose Printer Plotter Devices
- Choose Change / Show Characteristics of a Printer/Plotter
- Choose lp0 Available 00-00-0P-00 IBM 4029 LaserPrinter
- The next screen will show:
Change / Show Characteristics of a Printer/Plotter Type or select values in entry fields. Press Enter AFTER making all desired changes. [TOP] [Entry Fields] Printer/Plotter lp0 Printer/Plotter type ibm4029 Printer/Plotter interface parallel Description IBM 4029 LaserPrinter Status Available Location 00-00-0P-00 Parent adapter ppa0 * PORT number [p] + Type of PARALLEL INTERFACE [standard] + Microseconds to delay between characters [0] Printer TIME OUT period [600] +# STATUS of device at BOOT time available + - Change Microseconds to delay between characters to 100-500
Files changed when adding an AIX 4 or 5 local queue |
|
|---|---|
| File | Description |
| /etc/qconfig | New queue stanza and queue device stanza is added |
| /etc/qconfig.bin | Digested binary version of /etc/qconfig |
| /var/spool/lpd/pio/@local/custom/<queue:quedev> | ASCII editable version of virtual printer colon file definitions |
| /var/spool/lpd/pio/@local/ddi/<queue:quedev> | Digested binary version of virtual printer colon file definitions |
| /var/spool/lpd/pio/@local/smit/<odm files> | ODM database of attribute limits and smit panel information |
| /dev/lp/device_number> | Special Device Files |
Configuring a printer without adding a queue
The procedure for adding a printer without adding an AIX print queue differs slightly from the preceding discussion. This is the case, for example, if you are using a third party print spooler or if you are using applications that print directly to a device file.
Following are the steps to add a printer without adding a print queue.
- Use the smitty mkprt fastpath.
- Choose Add a Printer/Plotter.
- Select the Printer/Plotter Type.
- Choose the Printer/Plotter Interface.
- Choose the PORT number.
- Modify any serial attributes.
- Press the Enter key to add the printer.
This will add a device file in /dev such as /dev/lp24.
Testing
You will not be able to use print commands to print to this device. You must write directly to the device file using redirection or print statements inside a program.Example:
lptest 10 10 > /dev/lp24 cat /etc/hosts > /dev/lp24
To look at the configurations or make temporary changes to the device configuration use:
# splp lp24 device = /dev/lp24 (+ yes ! no) CURRENT FORMATTING PARAMETERS (ignored by qprt, lpr, and lp commands) Note: -p + causes the other formatting parameters to be ignored. -p ! pass-through? -c + send carriage returns? -l 64 page length (lines) -n + send line feeds? -w 80 page width (columns) -r + carriage rtn after line feed? -i 0 indentation (columns) -t ! suppress tab expansion? -W ! wrap long lines? -b + send backspaces? -C ! convert to upper case? -f + send form feeds? CURRENT ERROR PROCESSING PARAMETERS -T 30 timeout value (seconds) -e ! return on error?
To print postscript to this file you may need to set the printer to passthrough mode using:
splp -p+
Historical Number
isg1pTechnote0431
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1000281