[cups.general] DNS-SD-(Zeroconf)-based CUPS backend to discover network printers

Till Kamppeter till.kamppeter at gmail.com
Wed Sep 12 14:26:34 PDT 2007


Hi,

I have written a small Perl program around the command line 
"avahi-browse -k -t -v -r -a" to be run as a CUPS backend to discover 
network printers. It is used the same way as the "snmp" backend. You put 
it into /usr/lib/cups/backend/ and make it executable. The whenever a 
printer setup tool asks CUPS to look for available printers (or if you 
call "lpinfo -v") the program gets called and CUPS will list the 
discovered printers.

As it does fairly the same as "snmp" but only based on another method 
you can deactivate "snmp" via

chmod -x /usr/lib/cups/backend/snmp

and avoid duplicate results. You can also have both running to get a 
more reliable scan including old printers not supporting DNS-SD and 
newer cheap printers (like the HP LaserJet 2600n) not supporting SNMP.

The backend also reports make/model info so that printer setup tools can 
auto-select PPDs/drivers. In addition, it even discovers the PDLs of the 
printers, this way printer setup tools can react muchg more 
intelligently on unknown printer models, assigning PPDs like "Generic 
PCL-6/XL printer", and so the unknown printer "just works", too.

If a printer has more that one access protocol, the highest priority is 
on socket, after that LPD, and IPP at last. To avoid discovering the 
print queues of CUPS 1.3.x servers as IPP printers every result on IPs 
which also appear as a computer are discarded.

If a printer has more than one port for TCP/Socket or more than one 
internal queue for LPD or IPP, all ports/queues get listed.

In my small network (2 comnputers, 3 network printers) there are no 
visible speed differences. Please report your experience in big networks.

Here is the tool (License: GPL) for download:

http://www.openprinting.org/download/printing/dnssd

Needs Perl and Avahi.

I want to ask all of you to test this tool and compare it with the SNMP 
backend, especially in big networks and with non-HP printers.

- Is it faster?
- Is it more reliable (same results on repeated calls)?
- Does it discover more printers?
- Does it hang on certain printer models?

Thank you in advance for every test report.

    Till





More information about the cups mailing list