# Problems with parallel port

## rubz

Hi, i'm having problems with the parallel port under kernel vanilla-2.6.6

i've compiled several times. The parallel port doesnt work even after i modprobe parport and parport_pc and lp (all separately). although after i modprobe lp, the directory "printers" appears in /dev

I'm not looking for printer support, i want to use the parallel port to output to a small lcd. i need to get the device /dev/parport0.

if there is any information i can give you, please ask.

i've compiled the parport drivers as a module (parport and parport_pc)

Please help, thank you.

----------

## spudicus

 *rubz wrote:*   

> Hi, i'm having problems with the parallel port under kernel vanilla-2.6.6
> 
> i've compiled several times. The parallel port doesnt work even after i modprobe parport and parport_pc and lp (all separately). although after i modprobe lp, the directory "printers" appears in /dev
> 
> I'm not looking for printer support, i want to use the parallel port to output to a small lcd. i need to get the device /dev/parport0.
> ...

 

What does the following output:

```
dmesg|grep parport
```

Do you load the modules in the following order:

lp

parport

parport_pc

Do the following exist:

/dev/lp0

/dev/parport0

/dev/lp0 should point to /dev/printers/0.

----------

## rubz

dmesg|grep parport outputs:

```
parport0: PC-style at 0x378 (0x778), irq 7, dma 7 [PCSPP,TRISTATE,COMPAT,EPP,ECP

,DMA]

lp0: using parport0 (interrupt-driven).

```

I've loaded the modules in the following order:

parport

parport_pc

lp           * Is lp just a printer driver? if so i guess i dont need it.

Although i've tried loading them in the order you mentioned to no avail.

I DO have /dev/lp0 and /dev/printers/0.

I DON'T have /dev/parport0.

Also, if i look at the last few lines of output from dmesg, i get:

```
parport0: PC-style at 0x378 (0x778), irq 7, dma 7 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]

lp0: using parport0 (interrupt-driven).

parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]

parport0: irq 7 detected

lp0: using parport0 (polling).

```

----------

## spudicus

 *rubz wrote:*   

> 
> 
> lp           * Is lp just a printer driver? if so i guess i dont need it.
> 
> I DON'T have /dev/parport0.

 

Oops. Yes you won't need lp.

Have you run update-modules after loading the modules.

You could try

```
# cd /dev

#MAKEDEV update
```

Also, add parport and parport_pc to /etc/modules.autoload/kernel-2.6

Do you have the following in /etc/modules.d/i386

```
alias parport_lowlevel parport_pc
```

Try rebooting.

Finally if all that doesn't work try creating it sepcifically

```
#mknod parport0  c 99 0

#mknod parportN  c 99 N        ;;where N equals the parallel port number
```

----------

## rubz

I've tried what you've suggested, but still not fixed

when in /dev, "MAKEDEV update" outputs this

```
svr dev # MAKEDEV update

.devfsd presence implies active DevFS.  Aborting MAKEDEV invocation.

```

and "mknod parport0  c 99 0" seems to make the device but it doesnt work, here is the output from a [working] program after executing the previous command and seeing that it has created a device in /dev/

```
Error opening /dev/parport0: No such device or address

Error opening /dev/parport0

```

 :Crying or Very sad:   I dont know what to do.

Thanks for your support.

----------

## rubz

I took this from my /proc/config.gz file (i compiled the option to have the config shown in the /proc directory while configuring the kernel)

```
#

# Parallel port support

#

CONFIG_PARPORT=m

CONFIG_PARPORT_PC=m

CONFIG_PARPORT_PC_FIFO=y

CONFIG_PARPORT_PC_SUPERIO=y

CONFIG_PARPORT_OTHER=y

CONFIG_PARPORT_1284=y
```

There must be some absolutely stupid mistake i'm making somewhere, i'm going ot go and check the parallel ports config in the BIOS.

Edit: The settings were fine, i rebooted and it's still out of commision.  :Sad: 

I tried ECHOing something down the /dev/parport0 device i created earlier (using the mknod command) and got the output:

```
svr root # echo 7 > /dev/parport0

-bash: /dev/parport0: No such device or address

```

----------

## spudicus

Well it seems I was looking in the wrong place (part of the problem of reusing the same kernel config for so long  :Razz: )

Delete the /dev/parport#'s that were made

Try compiling ppdev into the kernel, found at:

Device drivers -> Character devices ->  Support for user-space parallel port device drivers

The help for ppdev, in menuconfig, states:

```
CONFIG_PPDEV:                                                             Saying Y to this adds support for /dev/parport device nodes.  This  

is needed for programs that want portable access to the parallel 

port, for instance deviceid (which displays Plug-and-Play device

IDs). 

 This is the parallel port equivalent of SCSI generic support (sg).

It is safe to say N to this -- it is not needed for normal printing  

or parallel port CD-ROM/disk support. 

 To compile this driver as a module, choose M here: the  

module will be called ppdev.
```

Oddly enough, while I do have this compiled, I don't recall ever loading it but I do have /dev/parport* devices. A closer look at /etc/modprobe.conf, shows the line:

alias char-major-99-* ppdev

So once compiled, running modules-update must pick it up.

If not try loading it manually, although I don't think you need to add it to /etc/modules.autoload.d/kernel-2.6. This should create the /dev/parport# devices.

Fingers crossed, that should work. Eitherway, I apologise for the run around.

Bloody West Australians  :Razz: 

----------

## rubz

Thanks a million.

I'm sure after this compile all will be well.

I thought I was making a stupid mistake.

----------

## Simon196405

I also didn't have a parport0 device.

After I upgraded to 2.6.7 vanilla suddenly /dev/parport0 whas there.

Seems like the kernel didn't write the neccesary information in the /sys directory for UDEV to pick up.

Simon

----------

## Simon196405

I also didn't have a parport0 device.

After I upgraded to 2.6.7 vanilla suddenly /dev/parport0 whas there.

Seems like the kernel didn't write the neccesary information in the /sys directory for UDEV to pick up.

Simon

----------

## rubz

The ppdev module fixed my problem.

btw: it has to be loaded before you use the pport

----------

