Problem
I ran 'mkdev parallel' to configure a parallel port, and when I try to send data to the port, I get the message:
/dev/lp0: cannot create Cause
This problem is usually seen when the port's hardware settings do not match the settings chosen during the mkdev parallel configuration process.
The message will also appear if the printer is off-line, or the printer cable is not plugged in, or is defective.
If the I/O address range, or other settings, chosen for the port during configuration (mkdev parallel) do not match the parallel port's hardware settings (I/O range, IRQ, and so on) set in the system BIOS (or on the parallel card), the port will not be opened and the above error message will appear.
Solution
The I/O address range (also called the "I/O base address range") of parallel ports have the following standard settings:
port IRQ address range
---- --- -------------
lp0 7 0x378-37F
lp1 5 0x278-27A
lp1 5 0x3BC-3BE (microchannel)The system BIOS and/or hardware switches must be set to correctly
reflect these settings in order for port configuration at the
operating system level to succeed. The values used to configure
the port at the operating system level must match the BIOS or card
settings as well.In some systems, the BIOS will allow you to enable or disable
interrupts for the parallel port(s). Make sure interrupts are
enabled. If interrupts are not enabled, the parallel port will
function in polling mode which can make port activity slow and/or
problematic.In rare cases, there are no BIOS settings for the parallel ports, or, the settings seem to have no effect. In some of these cases, control of the port(s) is done via DIP switches on the motherboard. In rare cases, the port's settings simply cannot be determined.
The first step in solving this problem should be to check the BIOS
settings and/or hardware switches. Making sure these settings match
those used in the mkdev parallel configuration process will solve
most of these problems. If the BIOS has no parallel port settings,
and you are unable to determine and/or change the port's settings,
you can configure a device driver for each of the three I/O base
address ranges offered in mkdev parallel, and test each one to
see which one works with your parallel port as it is currently set.To determine and/or set the port's I/O range, reboot your system
and enter the system BIOS (following the prompts on your monitor).
Once in the BIOS screen, find the parallel port field. Each BIOS
will have different settings for the field. There may be an
enable/disable setting, an IRQ and I/O range setting, enable
interrupts settings, and so forth. Take note of and/or change
the settings so that they work with your system setup.If your parallel port is controlled via DIP switches on the motherboard or parallel card, you will need to verify/set the port I/O range and IRQ there.
In some cases, there will be no parallel port field in a system's
BIOS, and no hardware switches to set. When this is the case, the
second approach (listed below) can be used.The second approach involves running mkdev parallel three times, and
configuring a device driver for each of the three I/O ranges offered
by mkdev parallel. The same IRQ can be used for each device node.
It is quickest to configure all three at once, then relink the
kernel, reboot, and test them all at once. Once you have determined
which device node will successfully open the port, the other nodes
can be deleted. For detailed instructions, see below.To configure all three device nodes at once, do the following:
# mkdev parallelChoose to add a parallel port. You will then see the I/O address
choices:Please select the I/O address for the adapter:
1. Parallel Adapter at address: 378-37f 2. Parallel Adapter at address: 3bc-3be 3. Parallel Adapter at address: 278-27a 4. Other configuration
Select an option or enter 'q' to quit:
The first time through, choose '1', the second time '2', the third
time '3'. If possible, choose the default value for the IRQ, and
choose the same IRQ for each iteration. After entering the IRQ
for the port, you will be prompted to relink the kernel. Do not
choose 'yes' until all three ports have been configured. After the
configuration of /dev/lp2 is complete, choose 'yes' to relinking the
kernel.After rebooting, test each port by typing the commands:
# date > /dev/lp0
# date > /dev/lp1
# date > /dev/lp2The device node that successfully sends the date to the printer is
the node you want to keep. Once you have determined which settings
work for your parallel port, take note of those settings. Then
remove all parallel port configuration (including the device node
that worked) using the "remove" option from the mkdev parallel
script. Then use mkdev parallel to re-add the port with the correct
settings.NOTE: The "mkdev parallel" option has changed with the introduction of
OpenServer 5.0.7.PCI parallel devices are now assigned to lp unit numbers 3 and up. The assignment is done at boot time; if you have a PCI parallel adapter with up to two ports, they'll be assigned to /dev/lp3 and /dev/lp4. If you don't have a PCI adapter, then you still have those device nodes on your system, but they don't do anything.
There's no harm in leaving them. But if you want to delete them,
run "mkdev parallel", select option 3 ("Modify configuration of PCI
parallel ports"), and then set the number of supported PCI devices to
zero.This will re-link the kernel and a reboot of the server will be required for the changes to take affect.
This is explained in Option 5 - Help.
See also
ta106305, "I want to remove the parallel port driver from the kernel."