In this tutorial I will explain step by step, how to setup a PCI Parallel Port using as Operational System(OS), a Debian 7 with Kernel 3.4.
To be easier the detection of new hardware, do,
and take a note somewhere of all entries that you have, and just then shutdown your OS, and insert the PCI with Parallel Port(LP) in the target machine where you want the LP.
Now turn on your computer, and do again,
and check where is your new hardware installed, in my case it will be:
04:00.0 Serial controller: Device 1c00:3250 (rev 10) (prog-if 05 )
Subsystem: Device 1c00:3250
Flags: fast devsel, IRQ 18
I/O ports at d800
Memory at f6ff8000 (32-bit, prefetchable) [size=32K]
I/O ports at dc00
Expansion ROM at f7fe0000 [disabled] [size=32K]
Capabilities: <access denied>
Here you must note the IRQ 18 and both IO address’s, the d800 and dc00, that you will need further.
Since you only have one LP, you know from the start that one of those two IO address’s is the right one, so this will be a trial and error, but in my case since I already know the right one I will use the dc00.
Now, in your system you must add manually a new entrie at modprobe who is the tool responsable for loading and removing modules of kernel system. In this case the modprobe configuration file that needs to be edited is here,
sudo nano /etc/modprobe.d/alsa-base.conf
and then in this file, add the following lines,
# LPC parport to PCI-E card
alias parport_low level parport_pc
options parport_pc io=0xdc00 irq=18,auto
but dont forget to add the IO and IRQ from the PCI that you have installed, that maybe differente from this one. The other arguments must not be changed.
After this just reboot the system to load modprobe config file,
when the OS come back again, to confirm if this PCI is already configured, do,
dmesg | grep par
and if you choose the right IO address, you will have something similar with this,
[ 15.531022] parport0: PC-style at 0xdc00, irq 18 [PCSPP,TRISTATE]
[ 15.626720] lp0: using parport0 (interrupt-driven).
[ 16.232244] ppdev: user-space parallel port driver
where parport0 was automatically attached to the LP.
Now if you have a device that can communicate through parallel port, you will be able to use it without problem.
Special thanks to atanere from the help in linux.org, trying to help with this situation.