Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[GAVE UP] trying to print via usb/parallel cable
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Mon May 14, 2012 9:35 am    Post subject: [GAVE UP] trying to print via usb/parallel cable Reply with quote

Hi all,

This is not the first thread on that topic :
http://forums.gentoo.org/viewtopic-t-752357-highlight-uri.html
http://forums.gentoo.org/viewtopic-t-549055-start-0.html

But they are old post with hal which is deprecated. Nevertheless, I am in the same situation. I have an old EPSON LQ 500 printer with a parallel port. My PC does not have parallel port. Then I bought a usb to parallel port adapter.

CUPS does not find the printer.

Does anyone has made that working - printing throught a usb to parallel port adaptor ? How ? Or does someone has some clues ?

Some info :

It looks like the adaptor is seen (Prolific Technology, Inc. PL2305 Parallel Port) :
Code:
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 04ca:0027 Lite-On Technology Corp.
Bus 002 Device 003: ID 18e3:9106 Fitipower Integrated Technology Inc
Bus 002 Device 004: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 002 Device 005: ID 054c:031e Sony Corp. PRS-505 reader
Bus 002 Device 006: ID 046d:c063 Logitech, Inc.
Bus 002 Device 007: ID 058f:6364 Alcor Micro Corp.


Nothing in dmesg :
Code:
# dmesg | egrep -i "print|lq|parallel|prolific"
#


Here is my kernel USB configuration :
Code:
# grep USB .config | grep -v "#"
CONFIG_BT_HCIBTUSB=m
CONFIG_BT_HCIBFUSB=m
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_USB_DABUSB=m
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_USB_HID=m
CONFIG_USB_HIDDEV=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=m
CONFIG_USB_DEBUG=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_MON=m
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE_DATAFAB=m
CONFIG_USB_STORAGE_FREECOM=m
CONFIG_USB_STORAGE_ISD200=m
CONFIG_USB_STORAGE_USBAT=m
CONFIG_USB_STORAGE_SDDR09=m
CONFIG_USB_STORAGE_SDDR55=m
CONFIG_USB_STORAGE_JUMPSHOT=m
CONFIG_USB_STORAGE_ALAUDA=m
CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
CONFIG_USB_LIBUSUAL=y


Nothing about paport or parallel :
Code:
# egrep -i "paport|parallel" .config
#


and my configuration :
Code:
# uname -a
Linux JANUS 2.6.37-tuxonice #6 SMP PREEMPT Sat May 12 15:50:29 CEST 2012 x86_64 Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz GenuineIntel GNU/Linux


Last edited by lalebarde on Fri May 25, 2012 7:08 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 30108
Location: 56N 3W

PostPosted: Mon May 14, 2012 5:18 pm    Post subject: Reply with quote

lalebarde,

Consider the USB/Parallel port as part of the printer, not part of your PC.
You attach it and have a USB printer.

Google indicates the power up order is important - the printer must be powered up before you boot the PC.
You have
Code:
CONFIG_USB_PRINTER=m
is usblp loaded?
Look in lsmod. if not,
Code:
modprobe usblp
Does that help?

In CUPS, look for your printer as a USB device.

Does the printer show up in dmesg?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Tue May 15, 2012 8:36 am    Post subject: Reply with quote

Thanks for your help NeddySeagoon.

After having followed your advices, here is what I obtain :

Code:
# dmesg | egrep -i "print|lq"
[  155.678094] usblp0: USB Bidirectional printer dev 4 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
# ls -l /dev/usblp0
lrwxrwxrwx 1 root root 7 15 mai   10:27 /dev/usblp0 -> usb/lp0


But CUPS does not see anything. The find new printer button returns "No printers found".

If I send an echo, the printer reacts :

Code:
echo "azerty" >> /dev/usblp0
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9474
Location: Córdoba (Spain)

PostPosted: Tue May 15, 2012 8:48 am    Post subject: Reply with quote

As far as I know, parallel devices do not have that kind of magic power (to report themselves). So, you will either need some cups script to probe for it, or you will need to set it up by hand, using the correct port, driver, ppd and whatever, and hope for the best.

If your little test succeeded, though, you are on the right way. The communication between the pc and the printer is already set up. You just need to configure cups. The only problem is you won't get to it automagically.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Tue May 15, 2012 10:49 am    Post subject: Reply with quote

Thanks i92guboj.

It still does not work. Here is what I did :

1) download Epson-LQ-500-epson.ppd from http://www.openprinting.org/driver/epson and put it in /etc/cups/ppd with some additional symbolic links since I am not sure for the format :
Code:
# ls -l
total 112
lrwxrwxrwx 1 root  root     22 15 mai   12:21 epson-Epson-LQ-500.ppd -> Epson-LQ-500-epson.ppd
-rw-r--r-- 1 alain alain 15576 15 mai   11:53 Epson-LQ-500-epson.ppd
lrwxrwxrwx 1 root  root     22 15 mai   12:22 Epson-LQ-500.ppd -> Epson-LQ-500-epson.ppd
-rw-r--r-- 1 root  root  23976 22 oct.   2010 HP_J5780.ppd
-rw-r--r-- 1 root  root  23976 14 mai    2010 HP_Officejet_J5780.ppd
-rw-r--r-- 1 root  root  20940 23 déc.   2010 PDF.ppd


2) I edited /etc/cups/printers.conf (after having stopped CUPS) :
Code:
<Printer EPSON_LQ500>
Info EPSON LQ-500
MakeModel EPSON LQ-500
DeviceURI usb:/dev/usblp0
State Stopped
StateMessage
StateTime 1307531401
Reason paused
Type 8388612
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>


The CUPS control panel indicates that the printer is not connected.

Any clue ?
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Wed May 16, 2012 8:28 am    Post subject: Reply with quote

1) Except the ppd file, I don't find drivers, like I have for my HP inkjet. Is it normal ?

2) I don't find information for the building of the printer URI when it has to be hand made i.e. when cups cannot find the printer. Even in the CUPS documentation. If you have some know-how to transmit, you are welcome.

3) If you have a dot matrix EPSON, even used with a normal parallel port, I would appreciate to get your configuration (/etc/cups/printers.conf), ppd, driver.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9474
Location: Córdoba (Spain)

PostPosted: Wed May 16, 2012 11:07 am    Post subject: Reply with quote

lalebarde wrote:
1) Except the ppd file, I don't find drivers, like I have for my HP inkjet. Is it normal ?


You might need to install some other drivers. I know that gutenprint has helped me in the past with some epson printers (but not your concrete model). So, try emerging that package, and see if there's a driver for the lq500 in there.

By the way, did you consider using a true parallel port via a pci card?
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Wed May 16, 2012 12:38 pm    Post subject: Reply with quote

I have already gutenprint installed, but it is of no help here :

Code:
# equery files net-print/gutenprint | grep -i epson
/usr/libexec/cups/filter/commandtoepson
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-acl_c2000.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-acl_c2000ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-acl_c8500.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-acl_c8500ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-acl_c8600.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-acl_c8600ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-actl_1100.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-actl_ii.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5200.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5200plus.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5700.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5700ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5800.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5800ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5900.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-5900ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-6100.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-6100ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-7100.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2050.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2050plus.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2050ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2050psplus.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2120.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2500.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2500ps.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2750.5.2.ppd.gz
/usr/share/cups/model/gutenprint/5.2/C/stp-epson-epl-n2750ps.5.2.ppd.gz


Only epl series here.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9474
Location: Córdoba (Spain)

PostPosted: Wed May 16, 2012 1:17 pm    Post subject: Reply with quote

About the printer URI: nowadays, I usually configure cups using its localhost:631 web frontend. There you can find some tips about these URIs when creating a new printer. You can provide your own ppd and it should set it up for you.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Wed May 23, 2012 8:05 am    Post subject: Reply with quote

Thanks i92guboj. I had a look into the CUPS interface of course, and the CUPS online documentation also. But it is of no help. It is very minimalist, with a single example for network printers. I found other examples on the web, but nothing works.

I wonder if Linux is design to allow devices to be connected throught links that are not the original/former ones ? In other words, is there a solution to this problem ?

I would have liked a PCI card solution, but I have no PCI plug left ! Probably I will be obliged to give up and to connect this printer to a second PC where I have room for the PCI card and share it on the network. But having to switch it on just to print makes me crazy.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9474
Location: Córdoba (Spain)

PostPosted: Wed May 23, 2012 2:47 pm    Post subject: Reply with quote

I don't think this has to do with how linux handles things, since it can actually see your printer, and you said that the printer reacts when you echo text to the device node.

I think this has more to do with the arcane knowledge that you need to use cups, and how it's designed. This, alongside alsa, has been probably what has given me the worst linux experience above anything else you can think of. Even my old conexant hfs winmodem with its proprietary driver behaved better than cups. I think cups is evil.

To make it worse, cups seems to be deprecating quite some things with 1.6. There's some debate about that on the internet. We all can start shivering now. :evil:
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Thu May 24, 2012 9:19 am    Post subject: Reply with quote

lol :lol: & cry :cry:

So I am going to buy a PCI card !
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 9474
Location: Córdoba (Spain)

PostPosted: Thu May 24, 2012 10:31 am    Post subject: Reply with quote

Not that this will solve your problem, but in case you want to keep an eye on it in the future, there's someone developing something that could some day fix this mess. I am keeping an eye on printerd, but I have no idea whether this will end up being something or not. In case you want to take a look (even though there's little for you to look at at this moment), here you have some links.

http://cyberelk.net/tim/2012/05/10/announcing-printerd/
http://cyberelk.net/tim/2012/05/23/some-benefits-of-printerd/
http://gitorious.org/printerd
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Fri May 25, 2012 7:08 am    Post subject: Reply with quote

Thanks for the information. It is worth keeping an eye on it.
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 601
Location: Würzburg, Deutschland

PostPosted: Fri May 25, 2012 7:18 am    Post subject: Reply with quote

Hi lalebarde! Sorry I didn't see this post earlier, I do have a parallel port printer (HP laserjet 5L) working via a USB -> parallel cable. However, newer CUPS versions use libusb and _not_ the kernel USB printer driver to communicate with the printer. So, you'll have to either blacklist usblp or remove it from your kernel config; after that, it should work. The fact that you have a /dev/usblp0 shows that the conflicting driver is active and has claimed the interface. If it doesn't work even after removing the kernel driver, check /dev/bus/usb --- if you plug in the printer, a new node should appear down there somewhere, belonging to the lp group. In my case, this looks like
Code:
pestix@gondolin /dev/bus/usb/001 $ ls -lha
insgesamt 0
drwxr-xr-x 2 root root     160 25. Mai 09:22 .
drwxr-xr-x 4 root root      80 24. Mai 10:59 ..
crw-rw-r-- 1 root usb  189,  0 24. Mai 10:59 001
crw-rw-r-- 1 root usb  189,  1 24. Mai 10:59 002
crw-rw-r-- 1 root usb  189,  2 24. Mai 10:59 003
crw-rw-r-- 1 root usb  189,  4 24. Mai 10:59 005
crw-rw-r-- 1 root usb  189, 11 25. Mai 09:04 012
crw-rw-r-- 1 root lp   189, 13 25. Mai 09:22 014
If the permissions are wrong, you might have to fix your udev configuration. Also, to state the obvious, CUPS must be merged with the usb useflag, libusb must be installed (should be pulled in by CUPS), and I guess your kernel should have "CONFIG_USB_DEVICEFS=y".

I should also add the the printer _does_ show up in CUPS using the "find new printer" button. Also, I can't confirm that power up order is important for me in any way. In general, I never had much trouble with this piece of hardware... ;)
Back to top
View user's profile Send private message
schoett
n00b
n00b


Joined: 26 Jan 2003
Posts: 62

PostPosted: Mon May 28, 2012 9:24 am    Post subject: Reply with quote

DirtyHairy wrote:
[...] newer CUPS versions use libusb and _not_ the kernel USB printer driver to communicate with the printer. So, you'll have to either blacklist usblp or remove it from your kernel config; after that, it should work. The fact that you have a /dev/usblp0 shows that the conflicting driver is active and has claimed the interface.

Thanks a lot; this was exactly the problem in my case (HP LaserJet 5L on USB-to-Parallel adapter).

I wish the CUPS folks would tell their users about such breakages by means of eselect news; it still feels like my printer stops working after about 1 in 5 CUPS updates. While it used to be worse (about 1 in 2 updates a few years ago); it still means that gentoo can put you in a fix when you need that urgent document printed out.
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Tue May 29, 2012 4:28 pm    Post subject: Reply with quote

Thanks DirtyHairy,
I have fullfilled your recommandations, and a node is actually created :
Code:
# ls -l /dev/bus/usb/002/010
crw-rw-r-- 1 root lp 189, 137 29 mai   18:10 /dev/bus/usb/002/010

But the printer is not detected by cups. If I do it by hand, I tryed the DeviceURI usb:/dev/bus/usb/002/010 and lp:/dev/bus/usb/002/010 with no success.
Could you post your /etc/cups/printers.conf, the section concerning your HP laserjet 5L, please ? What is the reference & buy link of your usb2parallel adaptor ?
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 601
Location: Würzburg, Deutschland

PostPosted: Wed May 30, 2012 8:55 pm    Post subject: Reply with quote

The relevant part of /etc/cups/printer.conf is
Code:
<Printer HP_LaserJet_5L>
UUID urn:uuid:973f6eb4-9369-38ec-7f85-49462ef69ae6
Info HP LaserJet 5L
Location Freiburg
MakeModel HP LaserJet 5L - CUPS+Gutenprint v5.2.7
DeviceURI usb://HP/LaserJet%205L
State Stopped
StateMessage Unplugged or turned off
StateTime 1337892632
Reason paused
Type 4116
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
I bought the adaptor ~6 years ago, so I can't give you any references. However, I don't think that --- provided that cups is set up correctly --- the adaptor is the issue here, it could be that your printer is simply too old to be autodetected. I remember that later generation parallel port printers offered support for autodetection, and I am pretty sure that this is what makes a parellel port printer advertise itself over a parallel <-> USB connection; it could be that your printer is too old for that. I have to admit that I can't offer you any further clues on how to set up this combo :( I would consider getting a new printer, unless you really depend on the matrix printer for making carbon copies, there are lots of cheapo printers out there which should work with cups out of the box.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 374
Location: Close to Annecy

PostPosted: Thu May 31, 2012 8:48 am    Post subject: Reply with quote

DirtyHairy wrote:
However, newer CUPS versions use libusb and _not_ the kernel USB printer driver to communicate with the printer.

Hum, as per the problem I solved yesterday on my own systems , it is not so true : as per my own trouble shooting, and CUPS building output, or you use KERNEL USB PRINTER driving, or libusb, but having both doesn't work.

In my case, my kernel has KERNEL USB PRINTER enabled, I've put
Code:
net-print/cups  -usb
and it's working again.

I'm using an USB printer, but as said previously, in a kernel point a view, an USB printer or an centronic printer thru an USB adapter seen in the same way.
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 420
Location: France, Haute-Garonne

PostPosted: Mon Jun 04, 2012 7:03 am    Post subject: Reply with quote

Nothing works for me :cry: except direct echo that actually prints !!!
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 374
Location: Close to Annecy

PostPosted: Mon Jun 04, 2012 8:16 am    Post subject: Reply with quote

For me, I can print a test page from CUPS meaning the printing system works ... but applications can't see the printer .

I really duno what/how printer are exposed to applications ... but it's starting to be very annoying : the only thing I didn't tried yet is to rebuild my kernel without USB support, but CUPS' build message said it should work as it is.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum