pconf_detect — A command-line utility for autodetecting printers


pconf_detect -m [PPORT|NETWORK] -i <info-string>


pconf_detect is a command-line utility for autodetecting printers from Linux. It is a simple wrapper around libprinterconf's pconf_detect_printer() function. It currently supports two methods of autodetection: parallel port detection and network detection.

The detection type is specified with the -m option, which can be followed by one of two values: PPORT or NETWORK. Detection specific information is passed following the -i option. For parallel port detection, this will be a comma-separated string of parallel port numbers.

For network detection, it will be some method of specifying a range of hosts or IP addresses.

The most common form is "", indicating the IP/bitmask to scan.

Other formats include an IP range (""), an IP/netmask (""), a simple IP address (""), or a host name ("myprinter.mydomain.com").
  [Note: Detection of large network subnets can take a significant amount of time.]

pconf_detect will print out a set of formatted text strings, one for each detected printer.

The actual format of these strings will depend on the detection method. For parallel port detection, the string will be in the basic form: "port=p;model=m". For a network printer the form is: "printer=hostaddr;vendor=v;model=m".


PPORT example:

        pconf_detect -m PPORT -i 0,1

where "0,1" is a comma-separated list of the parallel port to scan.

NETWORK example:

        pconf_detect -m NETWORK -i ""

where "" is the IP/bitmask to scan.