You are on page 1of 3

Connecting a printer to a parallel port on an AIX system

This document describes how to connect printer to a parallel port on an IBM RS6000 AIX 4.3 system.

The user must be logged on as "root" or have administrative privileges to add the printer.

1. Verify that the printer object has been created with the "lsdev" command as shown below.

# lsdev -C |grep print


lp0 Available 00-00-0P-00 Other parallel printer
#

2. If the printer does not appear in step 1 then use smit to create the desired printer object or printer device. Contact your system
administrator for details.
3. Test the parallel port by redirecting the output of the UNIX cat command to the printer port. The following command sends the
qconfig file to the printer. The "/etc/qconfig" file can be replaced by the name of any ASCII text file.

Cat /etc/qconfig > /dev/lp0

4. Use SMIT to create a new printer que. Launching SMIT and make the following series of menu selections from the SMIT menus
that appear:

a. Devices
b. Printer/plotter
c. Print Spooling
d. Add a print Queue
e. Local
f. Other
g. Generic generic Printer
f. Select the printer object identified in step 1. For this example the printer object is lp0.

This will bring up the "Add a Print Queue" screen show below. Enter the desired queue name. This example uses lp6180
for the name of a new ASCII print que under "Names of NEW print queues to add".

Add a Print Queue

Type or select values in entry fields.


Press Enter AFTER making all desired changes.

[Entry Fields]
Description Generic Printer
Printer name lp0

EXISTING print queues for this printer


ASCII lpkmart

Names of NEW print queues to add


ASCII [lp6180]
GL Emulation []
PCL Emulation []
PostScript []
5. Check the queue by issuing the command "lpstat" from the UNIX prompt. The third line of the following screen capture
indicates that the queue (lp6180) for the parallel printer lp0 is "ready".

# lpstat
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- --
idata drp0 READY
idata: Printer Status File size Bytes left
lp6180 lp0 READY
T6180 @T618 READY
T6180: Printer Status File size Bytes left
#

6. Send a print job to the printer with the command "lp -d que_name file" executed from the UNIX prompt. The following
command prints the "qconfig" file on the printer defined by the "lp6180" print que.

lp -d lp6180 /etc/qconfig
7. Trouble shooting

a. SMIT modifies the "qconfig" file. Verify that the "qconfig file" entries are correct. ". "View" or "cat" can be used to view
the "qconfig" file. The "lp6180" queue, created in step 4, appears in the "/etc/qconfig" file as follows:

lp6180:
device = lp0
lp0:
file = /dev/lp0
header = never
trailer = never
access = both
backend = /usr/lib/lpd/piobe

b. Verify the qdaemon process is running. If "qdaemon" is not running contact the system administrator. The following
example shows how to determine if the "qdaemon" is running by using the ps and grep commands.

# ps -aef |grep qdeamon


root 7996 8550 2 09:58:48 pts/0 0:00 grep qdeamon
#

c. Clear the print queue.

Option 1: Cancel the job

Execute the command "cancel job##" at the UNIX prompt where job## is the print queue job number. The job
number is returned when a print job is sent to the printer using the lp command (see step 7) or the number can be
obtained by using the "lpstat" command (see step 6).

Option 2: Stop the qdeamon process, clear out the queues and restart the qdeamon process.

Contact your system administrator for instructions or refer to IBM on line documentation.
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixbman/printrgd/clean_startover.htm#RBffl26asmit
Procedure

1. Stopsrc -s qdaemon #stop qdaemon


2. ps -aef |grep qdaemon #verifies qdaemon stopped
3. ps -aef |grep pio # kill forked pio processes found
4. rm /var/spool/lpd/stat/*_dev_* # remove queue files
rm /var/spool/lpd/stat/s*
rm /var/spool/lpd/qdir/*
rm /var/spool/lpd/qdaemon/*
5. startsrc -s qdaemon # start qdaemon

NOTE: If forked processes can not be killed the server will need to be re-booted.

You might also like