Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running Sabayon Linux (x86_64).

$ uname -a
Linux qdoe 3.7.0-sabayon #1 SMP Thu Dec 20 07:12:55 UTC 2012 x86_64 Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz GenuineIntel GNU/Linux

I have a HP LaserJet 1100 printer which by default is connected via an 25-pin parallel printer port (DB25). Now, I have a new computer without such a port and I'm not able to directly connect the printer.

Therefore, I bought an USB-to-DB25-connector and tried to install my printer.

USB-to-DB25-connector

But here the trouble starts. In Sabayon or Gentoo, there is a toolbox for HP printers called hplip which is very easy to use: connect printer, detect it with hplip and you are ready to go.

hplip

Now the issue is, that the hplip software does not recognize the printer. Neither via USB nor via parallel port (LPT). The port seems to work though:

# lsusb
(...)
Bus 002 Device 006: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port

I already tried to manually enter the USB address 067b:2305 into hplip - but no success, the printer is not recognized.

What else can I do? Is there some kind of further port-emulation software or any drivers I need in addition to make this port work with my printer?

share|improve this question
    
I haven't seen such a beast, but it should behave like a paralell port, just probably with a weird name. Try to find out what it is named, and see if you can enter that. Perhaps you'd have to find out exactly what files the tool modifies (perhaps strace helps here) and hack the paralell name's port in. It would be nice if you reported your problems and solution to your distribution to update hplip. –  vonbrand Jan 26 '13 at 6:27

2 Answers 2

http://en.gentoo-wiki.com/wiki/CUPS

If you are using a USB->Parallel adapter, you'll want to do the following:

Add your printer by selecting a different connection type (since usb and parallel will not be listed)
Edit the file /etc/cups/printers.conf
Change the DeviceID line to read: DeviceID = parallel:/dev/usb/lp0
...actually, it looks like the proper line is now: DeviceURI parallel:/dev/usb/lp0 

Note: that it is "parallel:" NOT "usb:" - the USB part is handled by the usb drivers. To CUPS it should show up as a parallel port. CUPS doesn't know to look for USB->Parallel adapters, but if you manually configure it, it will work

share|improve this answer
    
Hi, thanks for your reply. I dont have a /etc/cups/printers.conf file. Creating one, adding that line and restarting cupsd didn't work. –  vertoe May 10 '13 at 17:33

Apparently, hplip does not support USB to parallel adapters - see for example http://www.mail-archive.com/hplip-help@lists.sourceforge.net/msg02858.html

I managed to get a parallel printer connected via a PL2305 adapter like yours to work with CUPS by manually editing the printers.conf file as described by @Sandro kensan - I am looking at the CUPS 'Printer Test Page' right now, so I can confirm that Sandro kensan's method works.

I suspect that the absence of printers.conf on your machine means that you do not have CUPS installed. I recommend you do not attempt to create this entire file from scratch; it consists of much more than a single line.

As for HPLIP - I have been completely unable to get it to recognise my LaserJet 2100 connected via a PL2305. What follows is what I've tried so far, in the hope it saves you some time.

Firstly, I tried specifying the USB bus:device numbers of the PL2305 to hp-setup's command line. That results in hp-setup walking the entire USB device tree, at times reading data from USB devices then closing them again, then finally outputting

error: No device selected/specified or that supports this functionality.

and exiting with nonzero status. I suspect it was sniffing each device to see whether it smelt like an HP printer, deciding none were, and giving up.

Secondly, I tried to set the printer up as a parallel printer. Comments elsewhere online said this would not work but as USB had already failed I decided to try it.

The first problem you encounter with this approach is that hp-setup wants to scan rather than be told the device node to use. To defeat this, you have to run it from the command line and supply the device node as an argument.

The next problem is that hp-setup only recognises the command-line argument as a parallel port device node (as opposed, for example, to a USB bus:device ID) if it is in the form /dev/partport[0-9]. I defeated that by doing:

sudo ln -s /dev/usb/lp1 /dev/parport1

That could be made persistent using a custom udev rule, but it's an ugly hack.

The next problem is that the HPLIP tools then (rightly) assume that /dev/parport1 is an lp device, and issue parallel-specific ioctls such as PPGETMODES on it. The kernel driver for the PL2305 is not 'parallel-ish' enough to understand these, so returns an error code, which causes the HPLIP tools to skip that device node, in the process outputting more cryptic/useless diagnostics such as:

Invalid device URI

As far as I can tell, HPLIP wants to see either:

  1. A USB device which is an HP brand printer (not a adaptor/bridge behind which sits a printer); or
  2. An 'lp'-like device node representing a parallel port, which supports all of the parallel-specific ioctls.

The /dev/usb/lp[0-9] device nodes we get when we plug in our PL2305s are neither of these, and HPLIP can't handle them itself, and is inflexible such that it supplies no way I can see for you to force it to Do The Right Thing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.