AIX Printer Tips: Adding Serial Printers at AIX 4
Contents
About This Document
Prerequisites
Configuring a Local Printer and Adding a Queue
Testing the Print Queue
Troubleshooting Serial Port Problems
Files Changed When Adding an AIX 4 Local Queue
Configuring a Printer without Adding a Queue
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 serial
port or adapter on the local host. This procedure applies to native serial
ports, 8-port adapters, 16-port adapters, 64-port adapters and 128-port
adapters. With some modifications, it also applies to P10 style printer
ports on the IBM 7318 Network Communications Server.
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.
This document applies to AIX Version 4.x.
Prerequisites
-
Read the documentation for your printer. Printer-specific
information may be needed to connect and configure the printer.
-
A serial port must be available on the system.
# lsdev -Cc printer will show the configured printer devices.
-
You must have root authority.
Configuring a Local Printer and Adding a Queue
-
Determine communications parameters for baud rate, stop bits, parity, bits
per character, and flow control. Hardware or DTR flow control is highly
recommended if at all possible.
Set up the printer using these characterstics
based on the printer documentation.
-
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 serial port.
-
Set up your printer as described in the printer documentation.
-
Restart the system.
-
Enter the SMIT fastpath:
-
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.
-
rs232
-
rs422, if using rs422 adapter board
-
Select the parent adapter. Choices will look something like this:
-
sa0 Available 00-00-S1 Standard I/O Serial Port 1
-
sa1 Available 00-00-S2 Standard I/O Serial Port 2
-
sa2 Available 00-01 8-Port Asynchronous Adapter EIA-232
-
sa4 Available 00-07 64-Port Asynchronous Controller
-
sa6 Available 00-04-12 16-Port RAN EIA-232 for 128-Port Adapter
-
cns01 Available NW-00-01 Serial Communications Network Server (IBM 7318)
-
Fill in queue names in the following screen (number and type of emulation
will vary based on printer type selected). Print
queue names that are six characters or less in length are suggested
because this is the queue length
displayed with the queue status commands.
The communication parameters must match those previously set up on
the printer.
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 [ascp0]
GL Emulation [gllp0]
PCL Emulation [pclp0]
PostScript [pslp0]
IBM 5587 G01 Japanese Data Stream Emulation by []
4029
Printer connection characteristics
* PORT number [s2]
BAUD rate [9600]
PARITY [none]
BITS per character [8]
Number of STOP BITS [1]
FLOW CONTROL to be used [dtr]
Printer TIME OUT period (seconds) [600]
STATE to be configured at boot time available
NOTE: 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, be certain to 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<qutue> /etc/motd
-
lptest 10 10 > /dev/lp2 (use correct lp number)
These commands will print a single page to the printer.
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
This will produce a page that contains rows of ### and lines with percent
signs, but will print a banner page and only one other page.
With HPGL it is best to use a known good file.
Troubleshooting Serial Port Problems
Some common problems when printing to serial attached printers are:
-
Defective serial cable
-
Missing interposer
-
Serial cable longer than 50 feet (200 for rs232 adapters and printers)
-
Printer set up for parallel rather than serial-common on proprinters
and HPLJ III
-
Serial parameter mismatch between printer and RS/6000 settings
-incorrect baud rate often prints upside down question marks
-
Mismatched flow control settings-prints fine for a moment then data is lost
-
Queue goes down or cannot create indicates that the CTS signal on AIX is
not being asserted from the printer or that the signal is toggling
|
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 File |
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+
Adding Serial Printers at AIX 4: AIX Printer Tips:addsp4.html ITEM: FAX
Dated: 99/05/21~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:14
Comments or suggestions?
Contact us