LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-08-2016, 09:17 PM   #1
jmanley
LQ Newbie
 
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
CUPS Backend using same Device URI for two different printers


I have two Citizen CLP-7201e printers attached to a USB hub and I have the drivers downloaded for CUPS from Citizen's website.
They are loaded with different size labels.
When I have one or the other setup they work fine.
If I try and set them both up in CUPS at the same time then neither one works. I'm guessing it has to do with the "auto detected" device URI in CUPS
Below is the output of the /usr/lib/cups/backend/usb showing the two printers detected but with the same Device URI.
I also checked lsusb -v and the iSerial is 0 so I'm guessing that is why CUPS is not adding a SERIAL=XXXXX and appending that on to the USB device URI.
I've googled and tried using udev with rules and I did get it to add a SYMLINK I called Printer1 and another SYMLINK I called Printer2 in the rules for udev but even with restarts, reboots, and adding and removing the prints CUPS did not use these symlinks (this was just a guess and me trying stuff to be through).
I'd appreciate any ideas.
Thanks;
Jon

Code:
root@Z:/usr/lib/cups/backend# ./usb
DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 131 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=12
DEBUG2: Printer found with device ID: MANUFACTURER:CITIZEN;COMMAND SET:NATIVE ON, NATIVE OFF;MODEL:CLP-7201e;ACTIVE COMMAND:NATIVE OFF; Device URI: usb://CITIZEN/CLP-7201e
direct usb://CITIZEN/CLP-7201e "CITIZEN CLP-7201e" "CITIZEN CLP-7201e" "MANUFACTURER:CITIZEN;COMMAND SET:NATIVE ON, NATIVE OFF;MODEL:CLP-7201e;ACTIVE COMMAND:NATIVE OFF;" ""
DEBUG2: Printer found with device ID: MANUFACTURER:CITIZEN;COMMAND SET:NATIVE ON, NATIVE OFF;MODEL:CLP-7201e;ACTIVE COMMAND:NATIVE OFF; Device URI: usb://CITIZEN/CLP-7201e
direct usb://CITIZEN/CLP-7201e "CITIZEN CLP-7201e" "CITIZEN CLP-7201e" "MANUFACTURER:CITIZEN;COMMAND SET:NATIVE ON, NATIVE OFF;MODEL:CLP-7201e;ACTIVE COMMAND:NATIVE OFF;" ""
 
Old 05-08-2016, 09:50 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,802

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
It is unfortunate that the reported device URIs are identical. Some printers differentiate themselves with unique serial numbers which gets around this problem. Perhaps this thread may answer your question. It involves setting up additional CUPS printer classes. I've never had the need to do this, so don't have direct experience with it. Hopefully, it will work for you.

Last edited by ferrari; 05-08-2016 at 09:55 PM.
 
Old 05-08-2016, 10:46 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,802

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Is it practical to consider connecting these USB-attached printers to different print servers? Or perhaps convert them to CUPS network printers using two cheap Raspberry Pi's for example. Just a thought.
 
Old 05-08-2016, 11:00 PM   #4
jmanley
LQ Newbie
 
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Is it practical to consider connecting these USB-attached printers to different print servers? Or perhaps convert them to CUPS network printers using two cheap Raspberry Pi's for example. Just a thought.
That's not really what I want to do.
 
Old 05-08-2016, 11:07 PM   #5
jmanley
LQ Newbie
 
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
I've already tried it with Class in CUPS - this is basically the same issue, however classes do not work as the CUPS Backend still thinks they are the same printer on the same Device URI / Printer port.


Quote:
Originally Posted by ferrari View Post
It is unfortunate that the reported device URIs are identical. Some printers differentiate themselves with unique serial numbers which gets around this problem. Perhaps this thread may answer your question. It involves setting up additional CUPS printer classes. I've never had the need to do this, so don't have direct experience with it. Hopefully, it will work for you.
 
Old 05-09-2016, 12:08 AM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,802

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Then AFAIU there is nothing further that can be done. The only UDEV approach I've seen relied on using legacy usblp (rather than libusb) and assigning specific device node names for each instance of a USB-attached device.
 
Old 05-09-2016, 12:37 AM   #7
jmanley
LQ Newbie
 
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
So how can I force it to use usblp instead of libusb?

Quote:
Originally Posted by ferrari View Post
Then AFAIU there is nothing further that can be done. The only UDEV approach I've seen relied on using legacy usblp (rather than libusb) and assigning specific device node names for each instance of a USB-attached device.
 
Old 05-09-2016, 03:23 AM   #8
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,802

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
So how can I force it to use usblp instead of libusb?
I'm in uncharted territory here, so I'm not sure if it is feasible or not, so no promises from me. IIRC, CUPS 1.7 onwards can handle both the libusb backend and usblp concurrently without conflict. I'm not a Debian user, but for openSUSE at least usblp is compiled as a module and can be loaded manually. For example, When I do this with my system, then connect my Brother USB-attached printer, I get the following device node appear
Code:
# ls -l /dev/usb/*
crw-rw-r--+ 1 root lp 180, 0 May  9 19:57 /dev/usb/lp0
as well as 'direct usb://Brother/DCP-7055?serial=E69893D1N337394' reported by lpinfo.

Here's some posts from a user describing some udev rules used to identify two identical printers from each other (post #4 onwards) and issign unique lpN device nodes...
https://forums.gentoo.org/viewtopic-t-556395.html

FWIW, similar discussion here
http://www.henningweiler.de/2009/01/...ical-printers/

Good luck with this! If it was me in your position, I'd be using the pragmatic CUPS server suggestion
 
Old 05-09-2016, 04:21 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,802

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I don't feel at all all hopeful about you succeeding with the above, but in any case here's how you can set up a custom backend capable of communicating with /dev/usb/lp0

https://en.opensuse.org/SDB:Using_Yo...le_USB_printer

Another similar backend would be used to communicate with lp1.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Brother HL-2240-R Stopped - Backend /usr/lib/cups/backend/usb does not exist! jet222jet Linux - Hardware 2 12-28-2020 06:32 PM
[SOLVED] is device-uri of printer mapping to device file akhilbaai Linux - Newbie 1 11-20-2015 01:04 AM
Trying to setup printer, what is Device and device URI ? M$ISBS Linux - Hardware 1 07-20-2005 11:44 AM
CUPS: What URI to use when a username is needed without a password elluva Linux - Networking 0 02-26-2005 10:19 AM
CUPS --> URI settings carboncopy Slackware 1 08-13-2003 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration