unable to print via lpt1

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

unable to print via lpt1

Post by jpg153 »

or
too stupid to setup CUPS to print on a local printer on parallel port

Hi all,

I am completely puzzled.. :shock:

I had a Laserjet via USB connected and driven by CUPS with a special driver (no standard hplib/cups.
I was not happy with the result and decided to go back to my old Laserjet &MP via printer server.
However the printserver has gone dead. So I bought a lpt-cable to attach it to the parallel port on the mainboard.
Now the Laserjet 6MP is connected to that lpt1, but I cannot find my way through CUPS to get it working.
The only issue is, that I might flip the connector as it does not seem obvious how to attach it to the main board.
But besides that, how do I redirect the output in CUPS to that port?

I tried several entries in the printer "URI", but none works.

My last URI is

Code: Select all

parallel:/dev/parport0
but not working

Code: Select all

http://localhost:631
did not work either.

Where do I miss the point?

Thanks.
Regards Gruß
jpg
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: unable to print via lpt1

Post by laprjns »

“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: unable to print via lpt1

Post by gapan »

Did you load the parallel port kernel module (parport)?
Image
Image
westms
Posts: 298
Joined: 17. Mar 2013, 18:51

Re: unable to print via lpt1

Post by westms »

Hello jpg153,
jpg153 wrote:I am completely puzzled.
This is not unusual with you. :)
jpg153 wrote:However the printserver has gone dead.
Because of a similar incident?: https://www.youtube.com/watch?v=9KawXnT1Zbw

But enough fun. Here is still a help attempt.

Hardwareside:
Centronics IEEE-1284 standard printer cables, with identical connectors at both ends, are electrically circuit-identical. Incorrect interchange is thus impossible. For different connectors at both ends, the consideration is superimposed. The connection cable should always be marked as "IEEE Std 1284-1994 Compliant" for safe operation.

A faulty connection cable is still conceivable as a cause of the fault.

Depending on the age and abilities of the printer, mechanical settings on the Centronics interface or settings on the printer configuration via the control panel may be necessary to set the correct interface and its functionality.

Softwareside:
First you check, e.g. via the Gslapt package management, whether the library hplip is installed, because before you had a CUPS installation with special driver without hplip. Perhaps, you may want to uninstall CUPS and reinstall it to get a full CUPS install.

Then you check whether the parport kernel module is loaded, with:

Code: Select all

sudo dmesg | grep parport
For a CUPS configuration via http://localhost:631 or http://localhost:631/admin, javascript must be allowed for these addresses. Before calling, the printer must be switched on and ready for operation, including a closed housing, the inserted paper cartridge, paper and toner. The different manufacturers have created their printers different bitchy behaviors.
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: unable to print via lpt1

Post by jpg153 »

Hi guys,

thanks so far.

ArchLinux recommendation did not help, unfortunately.

How do I know I loaded the parallel port kernel module?

dmesg output:

Code: Select all

[    5.595738] parport_pc 00:02: reported by Plug and Play ACPI
[    5.595797] parport0: PC-style at 0x278 (0x678), irq 7 [PCSPP,TRISTATE,EPP]
[    5.633982] parport0: Printer, Hewlett-Packard HP LaserJet 6MP
Does that ring a bell?

Thanks
Regards Gruß
jpg
westms
Posts: 298
Joined: 17. Mar 2013, 18:51

Re: unable to print via lpt1

Post by westms »

jpg153 wrote:How do I know I loaded the parallel port kernel module?

dmesg output:

Code: Select all

[    5.595738] parport_pc 00:02: reported by Plug and Play ACPI
[    5.595797] parport0: PC-style at 0x278 (0x678), irq 7 [PCSPP,TRISTATE,EPP]
[    5.633982] parport0: Printer, Hewlett-Packard HP LaserJet 6MP
Does that ring a bell?
Yes, but not the bell sound you want to hear.

The module is already loaded and the printer has already been detected by the driver or the PCI subsystem.

From your first inquiry:
jpg153 wrote:I had a Laserjet via USB connected and driven by CUPS with a special driver (no standard hplib/cups.
I can only guess what that means. If CUPS was not used before but it was printed without CUPS, then the mentioned specific driver must be removed, because it will occupy the Centronics parallel port and prevent other drivers or programs from accessing it. In this case, CUPS service is also not activated, so it must be checked in the list of system services.

Additionally and first, undo all changes to CUPS, e.g. playing with "parallel:/dev/parport0".

The library hplip must be installed. It is hplip, not hplib, as you wrote. You have upgraded your Salix installation from older Salix versions. Previously, hplip was not always preinstalled. Perhaps the library is still missing on your system. I noticed this in my first answer - but no reaction.

If from the above nothing is true, you can still make investigations. parport is a module and parport0 is a device.

The lsmod command provides a list of all kernel modules and their users. For my unused Centronics parallel port, this looks something like this:

Code: Select all

$ lsmod
Module                  Size  Used by
lp                      9819  0 
[...]
parport_pc             19268  1 
[...]
parport                30325  3 lp,ppdev,parport_pc
[...]
$
If still necessary, command calls like

Code: Select all

$ modinfo parport_pc
$ modinfo parport
provide further details on the modules. Too much you will not be able to deduce from it.

From your first inquiry:
jpg153 wrote:I tried several entries in the printer "URI", but none works.

My last URI is

Code: Select all
parallel:/dev/parport0


but not working
I do not understand what there is to fool around there with "printer URI". The selection of a printer via CUPS and the CUPS configuration can be done without a higher admin-consecration. Since one does not come into contact with a "printer URI" at all. You start a web browser and load from the http://localhost:631/admin address, whereby javascript must be allowed for localhost. Then select "Find New Printers" or "Add Printer" and let CUPS search for printers. This can take several minutes in problematic cases. Select the desired one and configure CUPS accordingly. Somewhere in this process you enter the password of the first user.

Also search the general and CUPS-specific log files. Please show any related errors.
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: unable to print via lpt1

Post by jpg153 »

well,

no success so far.
I reinstalled CUPS 3 times and removed the foo2xxx-package I used for printing on the former HP Laserjet 2014-USB.
So CUPS was there, but just using a foreign driver/filter.

But no luck at all, regardless what I try.
All I can get is "CUPS-PDF" printer if I let CUPS search for new printers, but only if the parallel cable is attached in one way.
If I change the plug position on the mainboard CUPS does not find any printer...

I tried to read through the logs but there is nothing which gives any hint...

this is the mainboard:
http://www.asrock.com/mb/Intel/H55M-LE/

I switch back to "normal" mode for the parallel port but that does not change.

Funny enough that dmesg does see the printer clearly, but CUPS does not...

Is there another way of accessing the printer without CUPS?

Thanks
Regards Gruß
jpg
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: unable to print via lpt1

Post by gapan »

Your printer probably supports postscript, so in theory you should be able to use lpr to print without CUPS. Have never tried it though. Look here:
http://lprng.sourceforge.net/

You'll need to remove cups and build lprng from source.
Image
Image
User avatar
jpg153
Donor
Posts: 449
Joined: 23. Oct 2009, 15:43
Location: Krefeld/NRW/BRD/EU

Re: unable to print via lpt1

Post by jpg153 »

Well,

thought about something like that but still dont understand why CUPS doesnot work for me.
Normally it should as it is kinda "standard" in Linux world...

I will check and report back.

Thanks
Regards Gruß
jpg
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: unable to print via lpt1

Post by gapan »

Well, if you have all the necessary packages, it should work. Have you ever printed anything on that PC with another printer?
Image
Image
Post Reply