-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUPS should rely on SNMP and not IPP for device discovery #1728
Comments
CUPS.org User: mike Reassigning as RFE for -feature. The problem with the device description that we get from SNMP is that it is a) less consistent than the IPP values, and b) doesn't handle multi-port print servers. In our testing, the IPP values were always more useful than the SNMP values. As we continue to enhance the SNMP backend, we will be able to rely more on the SNMP data when it is available, reliable, and accurate, however there will likely always be a fallback to IPP (and other) device information when we can't find it via SNMP. |
CUPS.org User: georgeliuyue George Liu wrote:
I think we can just special-case this - if printer-make-and-model is bogus ("Ricoh IPP Printer" or other strings we add in the future) then we rely on the device description OID instead. |
CUPS.org User: georgeliuyue Michael, I got the response from our firmware R&D team. The strings Ricoh family devices returns are: "Ricoh IPP Printer v2.0" or This covers Ricoh, Lanier, Gestetner, Savin, NRG and Infotec. Snmp.c just need to add an additional condition check for these two strings. Thanks and best regards |
CUPS.org User: mike Fixed in Subversion repository. Try the attached patch and let me know how it works for you... |
CUPS.org User: georgeliuyue The patch need fix. Problem: Debugging: I added debug log in snmp.c / list_devices(), to print all the printers to error_log as well as to a file. In error_log, printer name messed up. Finding: if (model) fix_make_model(make_model, temp, sizeof(make_model)) (Variable model and info both are NULL.) |
CUPS.org User: mike OK, got the printer today, and attached is a fix for both the garbled make and model and to use /printer for the IPP printer-uri... |
CUPS.org User: georgeliuyue Tested against the latest CUPS-1.2.x svn-r5642. The discovery part works great! Thanks Michael for the timely fix. However, I discovered that some Ricoh devices does not support the IPP backend very well. After a job has been submitted (ipp://ipaddress:631/printer) and printed, the printer is stopped, "/usr/lib/cups/backend/ipp failed". A message in error_log shows that Unable to get job 4 attributes (client-error-bad-request)! I guess it might because some of the IPP attributes are not supported by the printer? (/backend/ipp.c, around line 980) A quick fix for this is to remove "/printer" from common resource paths for IPP, (snmp.c, line 1547.) In this way, old generation of Ricoh printers (like Aficio AP400, which only supports ipp://ipaddress:631/printer" will fall back to use socket 9100 protocol. New generation of Ricoh printers (like SP C410, which supports both ipp://ipaddress:631/printer and ipp://ipaddress:631/ipp) will use IPP protocol. I removed the line "/printer" from str1728p2.patch, and both discovery and print works fine. Thanks again for the support. |
CUPS.org User: georgeliuyue Printer discovery in current cups-1.2.x worked fine. The problem of IPP backend failed (probably because printer does not support job-state and job-media-sheets-completed) is a separate issue regarding the robustness of CUPS and I have filed bug 1762 to address that. This bug can be closed as Fixed. |
CUPS.org User: mike Fixed in Subversion repository. |
"str1728.patch": Index: snmp.c--- snmp.c (revision 5612)
|
"str1728p2.patch": Index: snmp.c--- snmp.c (revision 5638)
|
Version: 1.2.1
CUPS.org User: georgeliuyue
In the web GUI of CUPS 1.2.0, add printer will invoke /cups-1.2.0/backend/snmp.c to detect printers in the network.
Per my understanding, snmp.c will do the following:
As printer information has already been aquired using SNMP in the first step, and the support for SNMP is way better than IPP (some printers support IPP, but might not support all the IPP attributes), more printers will be supported if CUPS rely on SNMP sysDescr to match PPDs.
The text was updated successfully, but these errors were encountered: