Unable to find parallel port

openSUSE 11.3 question:
I have a PCI parallel port adapter (Syba SD-PEX-NM1P) that should “only” need to be told what ports and irq to use with parport_pc but, for the life of me, I can’t make it happen. Using lspci -v, I can see it uses irq 19 (it that 19 or 0x19???) and ports 0xc800, 0xc400, 0xc000, 0xb800, 0xb400 (all 8 bit), and 0xb000 (16 bit). This is confirmed by the YaST2 hardware information tool.

Doing modprobe parport_pc io=0xb000 irq=0x19 should do something useful but I get no result at all. There is no /dev/lpt1 - a /dev/parport(n - where n is a digit) shows up on occasion but I can’t figure out when it appears or why. cat foo >& /dev/parport(n) - where foo contains “hello world <FF>” doesn’t do anything on the printer.

Using the YaST2 printer tool, even the HP tool (the printer is an HP LJ-5P), is fruitless. What am I doing wrong?

Is /dev/lp0 (or similar) present?

ls -l /dev/lp*

The ‘dmesg’ results may also be useful in diagnosing the problem here too.

Have you tried detecting/configuring your printer via the CUPS web interface? Are you a member of the ‘lp’ group?

http://localhost:631

Not sure what else to suggest (Parallel ports uggghh!) I haven’t played with them since 1995!

That’s part of my problem, there is nothing in the class /dev/lp* at all.

samwise /root# dir /dev/l*
6777 srw-rw-rw- 1 root    0 Sep 28 22:11 /dev/log
4610 brw-rw---- 1 disk 7, 0 Sep 28 22:11 /dev/loop0
4613 brw-rw---- 1 disk 7, 1 Sep 28 22:11 /dev/loop1
4616 brw-rw---- 1 disk 7, 2 Sep 28 22:11 /dev/loop2
4619 brw-rw---- 1 disk 7, 3 Sep 28 22:11 /dev/loop3
4623 brw-rw---- 1 disk 7, 4 Sep 28 22:11 /dev/loop4
4626 brw-rw---- 1 disk 7, 5 Sep 28 22:11 /dev/loop5
4630 brw-rw---- 1 disk 7, 6 Sep 28 22:11 /dev/loop6
4634 brw-rw---- 1 disk 7, 7 Sep 28 22:11 /dev/loop7

Again, doing the hardware listing, I can see the PCI card with a parallel port, so the card seems functional.


samwise /root# lspci -v
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate
        Subsystem: Hewlett-Packard Company Device 2a92
        Flags: bus master, 66MHz, medium devsel, latency 0
        Capabilities: [c4] HyperTransport: Slave or Primary Interface
        Capabilities: [54] HyperTransport: UnitID Clumping
        Capabilities: [40] HyperTransport: Retry Mode
        Capabilities: [9c] HyperTransport: #1a
        Capabilities: [f8] HyperTransport: #1c
[CUT]
04:00.0 Communication controller: NetMos Technology PCI 1 port parallel adapter (rev 01)
        Subsystem: LSI Logic / Symbios Logic Device 0010
        Flags: medium devsel, IRQ 19
        I/O ports at c800 [size=8]
        I/O ports at c400 [size=8]
        I/O ports at c000 [size=8]
        I/O ports at b800 [size=8]
        I/O ports at b400 [size=8]
        I/O ports at b000 [size=16]
        Kernel driver in use: parport_pc
[CUT]

The problem appears to be getting modprobe to connect the card’s port(s) to the driver parport_pc. Or maybe parport_pc is being tied to the port (0xb000 seems to be the only 16 bit port associated with the card) and irq (is that 19 or 0x19??? I’ve tried both with modprobe without obvious success). For some reason, modprobe -v (or --verbose) doesn’t give any added information. Only show-depends does anything:

samwise /root# modprobe --show-depends parport_pc io=0xb000 irq=0x19
insmod /lib/modules/2.6.34.7-0.3-desktop/kernel/drivers/parport/parport.ko 
insmod /lib/modules/2.6.34.7-0.3-desktop/kernel/drivers/parport/parport_pc.ko dma=none io=0xb000 irq=0x19

Past that, is modprobe supposed to do a makdev to create /dev/lp1 or…?

I also tried running CUPS and I can talk to it, at least to the point of changing the “share printers locally” option. CUPS, too, can’t see my printer. Since this is an HP printer (IIRC, they don’t take to just throwing raw ASCII at them, I tried some HP options in CUPS and in YaST2… nothing).

A bit of background… this same printer worked like a charm with an openSUSE 10.3 system. Unfortunately, the box that had the older version of openSUSE linux also had a built in port at 0x378. The new box only has USB connections and the LJ-5P only does parallel and localtalk. [/banghead] Needless to say, I really, really, really don’t want to have to buy a new printer just to get past the parallel port issue.[/size][/size][/size][/size][/size][/size]

No. modprobe won’t load the module if the device doesn’t exist. /dev/lp0 should have been created at boot time.

On 2010-09-29 20:06, please try again wrote:
>
> RBEmerson;2230343 Wrote:
>>
>> Past that, is modprobe supposed to do a makdev to create /dev/lp1
>> or…?
>>
> No. modprobe won’t load the module if the device doesn’t exist.
> /dev/lp0 should have been created at boot time.

Are you sure? Isn’t it the other way round?


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I thought. But if you’re asking so firmly, I have to be wrong.

Good news, bad news…

I now have /dev/lp0 - only I don’t know why. I re-boot the system and there’s /dev/lp0. CUPS can find the printer and I used the simple Gutenburg 5P driver because I used that on the old system - should work here, too, but it doesn’t.

The test page is just trash. Even using cat to get “Hello, world!<NL><FF>” to /dev/lp0 fails. The results are usually something like “AHello, word” or something close to it. In short, the data going to the printer isn’t healthy, even if I go direct to /dev/lp0.

I’m running out of ideas. FWIW, here’s something I dragged out of lsmod:

samwise /root# lsmod | grep lp
lp                      8082  0 
parport                34052  3 lp,ppdev,parport_pc
drm_kms_helper         29180  1 radeon
drm                   180503  4 radeon,ttm,drm_kms_helper
samwise /root# lsmod | grep par
parport_pc             33475  1 
parport                34052  3 lp,ppdev,parport_pc

On 2010-09-29 23:36, please try again wrote:
>
> Carlos E. R.;2230551 Wrote:
>> On 2010-09-29 20:06, please try again wrote:
>>>
>>> RBEmerson;2230343 Wrote:
>>>>
>>>> Past that, is modprobe supposed to do a makdev to create /dev/lp1
>>>> or…?
>>>>
>>> No. modprobe won’t load the module if the device doesn’t exist.
>>> /dev/lp0 should have been created at boot time.
>>
>> Are you sure? Isn’t it the other way round?
>>
>
> I thought. But if you’re asking so firmly, I have to be wrong.

No, no, I’m not clear on this. I really do not know the sequence, because it’s handled by udev, and
I know very little about it.

I think that the hardware is detected, the module is loaded (sometimes not automatically), and the
device node is created by some part of the sequence - it could be the part that detects the hardware
that simultaneously creates the device node and the driver and then links them both. But that would
need a database relating hardware, device nodes, and drivers/modules.

I really do not know, and I would like to.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2010-09-30 01:36, RBEmerson wrote:
>
> Good news, bad news…
>
> I now have /dev/lp0 - only I don’t know why. I re-boot the system and
> there’s /dev/lp0.

You did not reboot before? That could be it.

> CUPS can find the printer and I used the simple
> Gutenburg 5P driver because I used that on the old system - should work
> here, too, but it doesn’t.
>
> The test page is just trash. Even using cat to get “Hello,
> world!<NL><FF>” to /dev/lp0 fails. The results are usually something
> like “AHello, word” or something close to it. In short, the data going
> to the printer isn’t healthy, even if I go direct to /dev/lp0.

Well, the best way I can think of to make sure of that would be to connect a plain old printer, pin
and ribbon type. A sophisticated printer could try to be intelligent and “guess” what printer
language the computer is using to talk to the printer.

> I’m running out of ideas. FWIW, here’s something I dragged out of
> lsmod:

I can look up what another computer of mine with a parallel port shows, but another day (it is off
right now).


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

The test page is just trash. Even using cat to get “Hello, world!<NL><FF>” to /dev/lp0 fails. The results are usually something like “AHello, word” or something close to it. In short, the data going to the printer isn’t healthy, even if I go direct to /dev/lp0.

I’m not sure about raw ascii printing like that, but you should be able to use HPLIP software and configure with HP tools like hp-setup:

SDB:How to set-up a HP printer - openSUSE

This might be useful too:

Driver: hplip | OpenPrinting - The Linux Foundation

RBEmerson wrote:

>
> openSUSE 11.3 question:
> I have a PCI parallel port adapter (Syba SD-PEX-NM1P) that should
> “only” need to be told what ports and irq to use with parport_pc but,
> for the life of me, I can’t make it happen. Using lspci -v, I can see
> it uses irq 19 (it that 19 or 0x19???)

19 (decimal).

> Doing -modprobe parport_pc io=0xb000 irq=0x19- should do something
> useful but I get no result at all.

What happens if you try:

modprobe parport_pc io=0xb000 irq=19


Per Jessen, Zürich (11.2°C)
http://en.opensuse.org/User:pjessen

Yes, it is has to be handled by udev and there are databases with constructor and product ids for everything, I guess. And you can add/change your owns by writing udev rules and put them in /etc/udev/rules.d.

The funny thing is that to make sure - after your question - I rebooted and disabled the parallel port in the BIOS and guess what … I found a /dev/lp0 again and it juste made me even more unsure than before. Not to mention that I don’t use any module to print on the parallel port … however … the cups daemon is running (maybe that’s why).