SuSE Linux: Versions 6.2 to 7.3
Kernel: Versions since 2.2
You want to configure your additional parallel port.
From SuSE Linux 8.0 on, check the "Reference" manual.
You must be using kernel 2.2.xx or better.
By default, only the first parallel port /dev/lp0
is available.
This parallel port is configured by means of the following entry in the file
/etc/conf.modules
or /etc/modules.conf
(SuSE Linux 6.3 or later):
alias parport_lowlevel parport_pc options parport_pc io=0x378 irq=none,none # If you have multiple parallel ports, specify them this way: # options parport_pc io=0x378,0x278 irq=none,noneio=0x... is followed by the I/O address of the parallel port; irq=... usually states "none" for polling or the interrupt of the parallel port. Polling is usually better than interrupt operation and does not affect the speed (except for very old machines).
Testing the first parallel port:
If a normal printer (not a GDI printer) is connected to /dev/lp0
,
the command
echo -en "Hello\f" >/dev/lp0
entered as the user root should produce a page with the word "Hello".
(Compare the articles on
GDI printers and
selecting a compatible printer.)
Assuming you have a second parallel port that can be addressed
with the standard I/O address 278 (hexadecimal; can be set e.g.
with jumpers on ISA interface cards), the following entry in
/etc/conf.modules
or /etc/modules.conf
(SuSE Linux 6.3 or later) is sufficient:
alias parport_lowlevel parport_pc # options parport_pc io=0x378 irq=none,none # If you have multiple parallel ports, specify them this way: options parport_pc io=0x378,0x278 irq=none,noneFollowing a reboot, the second parallel port should be available.
/dev/lp1
,
the commandecho -en "Hello\f" >/dev/lp1
It will be more complicated if the I/O address of the additional parallel
port is not known beforehand.
In this case, the I/O address of the additional parallel port must first
be determined.
I) ISA PnP cards:
Sometimes fixed values for the I/O address, interrupt, and mode can be
set on cards of this kind:
Either by way of jumpers or - if you have DOS/Windows - by means of
an enclosed DOS/Windows program.
If this is possible, set fixed values for the I/O address, interrupt, and mode.
If this is not the case, the values for the I/O address, interrupt, and mode
will be written to the ISA PnP card when Linux is started.
These values can be retrieved from the Linux boot messages, or the following
procedure described in the manual (chapter "Linux and Hardware") can
be followed:
/etc/isapnp.conf
already exists, save the existing file withmv /etc/isapnp.conf /etc/isapnp.conf.bak
/etc/isapnp.conf
withpnpdump -c >/etc/isapnp.conf
isapnp /etc/isapnp.conf
pnpdump -c >/etc/isapnp.conf
II) PCI cards:
The I/O addresses and interrupts which can be used for a PCI card can be
displayed with the following command (as root):
lspci -v
or at a higher level of verbosity with
lspci -vv
Excerpt from the output of lspci -v
for
a PCI interface card with two parallel ports:
... 00:0a.0 Parallel controller: ... ... Flags: stepping, medium devsel, IRQ 10 I/O ports at b400 I/O ports at b000 I/O ports at a800 I/O ports at a400 ...Two I/O addresses in intervals of 400 (hexadecimal) jointly belong to one parallel port.
/etc/conf.modules
or /etc/modules.conf
(SuSE Linux 6.3 or later) makes
all three parallel ports available after a reboot:
alias parport_lowlevel parport_pc # options parport_pc io=0x378 irq=none,none # If you have multiple parallel ports, specify them this way: options parport_pc io=0x378,0xb400,0xa800 irq=none,none,noneTesting all parallel ports:
echo -en "Hello\f" >/dev/lp0
echo -en "Hello\f" >/dev/lp1
echo -en "Hello\f" >/dev/lp2
Note:
Instead of rebooting, it is sufficient to update the list of kernel
module dependencies as the user root and - provided only printers
are connected to the parallel ports - stop the print daemon, unload
and reload the kernel modules for the parallel ports, and restart
the print daemon using the following commands:
/sbin/depmod -a 2>/dev/null >/dev/null
rclpd stop
rmmod lp
rmmod parport_probe
rmmod parport_pc
rmmod parport
modprobe parport
modprobe parport_pc
modprobe parport_probe
modprobe lp
rclpd start
If the test of the additional parallel ports is successful, additional printers or
other parallel devices can be set up.
Simple use /dev/lp1
or /dev/lp2
as printer device instead of
/dev/lp0