LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   CUPS and multiple USB printers (https://www.linuxquestions.org/questions/linux-software-2/cups-and-multiple-usb-printers-895439/)

_jeremy 08-03-2011 11:37 PM

CUPS and multiple USB printers
 
For starters, I'll warn you that I installed linux on a pc for the first time yesterday. With the guidance of a pro, I was able to get this far, but now we're stumped and he suggested I ask here.

I'm running Ubuntu 11.04 desktop 32-bit with CUPS 1.4.6. I have three Samsung ML-2525 USB printers attached. They all three show up with lsusb:

Bus 001 Device 004: ID 04e8:3297 Samsung Electronics Co., Ltd
Bus 001 Device 003: ID 04e8:3297 Samsung Electronics Co., Ltd
Bus 001 Device 002: ID 04e8:3297 Samsung Electronics Co., Ltd


When I go into CUPS, it shows one. I've tried to add another via bash and I can't seem to get that to work either. All three were plugged in when CUPS was started, so I've ruled out that thing where it doesn't see new USB devices.

I set up three printers in CUPS (via the web interface) and (no surprise!) they all print to the same printer. I then tried to force them to go to the right places by shutting down CUPS, modifying cups.conf to inculde "FileDevice yes", restarting CUPS and using lpadmin to change the uri's to their /dev/ filedevices. That doesn't work. You probably knew that already, didn't you!?

user@pc:~$ ls /dev/usb
lp0 lp1 lp2
user@pc:~$ sudo lpadmin -pSamsung_1 -v /dev/usb/lp0
[sudo] password for user: ************
user@pc:~$ sudo lpadmin -pSamsung_2 -v /dev/usb/lp1
user@pc:~$ sudo lpadmin -pSamsung_3 -v /dev/usb/lp2


and then sending my ps file to the printers (which is the whole point- I need to be able to select which printer the postscript file ends up printing on for this project to work)

user@pc:~$ lpr -PSamsung_1 filename.ps
user@pc:~$ lpr -PSamsung_2 filename.ps
user@pc:~$ lpr -PSamsung_3 filename.ps


That makes nothing print at all, and CUPS complains about missing a "filter" or some such. There are some log file entries if that would help. I'd have to go and find them. I think they complain about a queue file somewhere not being right.

If I change the uri to a real uri-looking thing like this:

user@pc:~$ sudo lpadmin -pSamsung_1 -v usb:/dev/usb/lp0
[sudo] password for user: ************
user@pc:~$ sudo lpadmin -pSamsung_2 -v usb:/dev/usb/lp1
user@pc:~$ sudo lpadmin -pSamsung_3 -v usb:/dev/usb/lp2


Then the jobs just sit in their queues forever. (I let it sit for 25 hours, they are still "processing").

If anyone out there knows how to make this work, I'd really appreciate the help.

Thanks from a complete newbie.


Jeremy



Update / More Info:

When the jobs are "just sitting there" these events are showing up in /var/log/syslog.

Code:

Aug  4 01:08:10 pc kernel: [91922.792747] usb 1-6: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:10 pc kernel: [91922.792785] usb 1-6: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:10 pc kernel: [91922.792820] usb 1-3: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:10 pc kernel: [91922.792834] usb 1-3: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:15 pc kernel: [91927.912452] usb 1-4: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:15 pc kernel: [91927.912462] usb 1-4: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:15 pc kernel: [91927.912509] usb 1-6: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:15 pc kernel: [91927.912524] usb 1-6: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:15 pc kernel: [91927.912557] usb 1-3: usbfs: interface 0 claimed by usblp while 'usb' sets config #1
Aug  4 01:08:15 pc kernel: [91927.912618] usb 1-3: usbfs: interface 0 claimed by usblp while 'usb' sets config #1


_jeremy 08-04-2011 02:04 AM

Fix
 
_jeremy,

It looks like usblp is running, and it shouldn't be. You need to stop CUPS, kill usblp, start cups. Then all three printers will show up in CUPS. Remove all the printers you have with dev/ uri's and then add one at a time.

Next, make sure that you blacklist usblp so it won't try to start again.

I hoped that works for you!


-- _jeremy


PS: I didn't really figure this out. super-genius eantoranz did. He keeps saying he isn't an expert, but all the evidence says otherwise.

eantoranz 08-04-2011 12:17 PM

Ok, jeremy.. so I'm kind of an expert (wish that were enough to get a job as a linux sys admin somehere :( :-)).

eantoranz 08-04-2011 05:44 PM

By the way, this is where I got the info to solve this problem: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=545288


All times are GMT -5. The time now is 03:58 PM.