sane-find-scanner
Find attached scanner devices
SYNOPSIS
sane-find-scanner [options]
sane-find-scanner [-q] [-g] [-f] [-p] [-v] [-s] [-V]
PARAMETERS
-q, --quiet
Suppresses output for successfully found devices. Only errors or warnings are printed. Useful for scripting.
-g, --list-groups
Lists the Unix group IDs that SANE backends would typically try to use for device access (e.g., 'scanner'). This helps in configuring user permissions.
-f, --no-forceread
By default, sane-find-scanner attempts to read a few bytes from certain devices to verify they are scanners. This option disables that behavior, potentially speeding up detection but might miss some devices that don't respond immediately.
-p, --ping
For network-attached scanners, this option attempts to ping the detected IP addresses to verify they are active and reachable on the network. This is not for general device detection but for checking network connectivity.
-v, --verbose
Increases the verbosity of the output. More detailed information about the scanning process, devices probed, and any encountered issues will be displayed. Very helpful for debugging.
-s, --scsi
Limits the search to SCSI scanners only. Useful when you know your scanner is SCSI and want to avoid checking other interfaces.
-V, --version
Prints the version information of the sane-find-scanner utility and exits.
DESCRIPTION
sane-find-scanner is a utility that searches for scanners connected to the system. It inspects common device locations for SCSI, USB, and parallel port (ECP/EPP) based scanners. Its primary purpose is to help users identify if their scanner is detected by the operating system and to provide information (like device files or USB vendor/product IDs) that is crucial for configuring the SANE (Scanner Access Now Easy) backend drivers.
While it doesn't perform actual scanning, it's an indispensable first step in diagnosing scanner connectivity issues and setting up SANE. It reports found devices, indicating their type and the necessary device paths or identifiers that can then be used in SANE configuration files (e.g., in /etc/sane.d/). A typical use case is running it after connecting a new scanner to verify detection before attempting to scan with tools like scanimage or graphical frontends.
CAVEATS
To detect all types of scanners, especially USB and SCSI devices, sane-find-scanner often needs to be run with root privileges (e.g., using sudo). If run as a regular user, it might only find network scanners or devices for which the user already has direct access permissions.
sane-find-scanner identifies potential scanner devices but does not configure them. After detection, manual configuration of SANE backend files (like /etc/sane.d/*.conf) and user permissions (e.g., adding user to 'scanner' group or configuring udev rules) is usually required to make the scanner usable by SANE frontends.
PERMISSIONS AND TROUBLESHOOTING
One of the most common reasons sane-find-scanner fails to detect a connected scanner, particularly USB or SCSI devices, is insufficient user permissions. Running the command as a regular user might only show network scanners or devices where proper udev rules and group memberships (e.g., being part of the 'scanner' group) are already in place.
If your scanner is not detected, first try running sane-find-scanner with sudo. If it appears then, it indicates a permissions issue. You'll need to adjust udev rules or add your user to the appropriate group (often 'scanner' or 'lp') to grant access without root privileges for everyday use. It's an essential diagnostic tool before delving into backend-specific configurations.
OUTPUT INTERPRETATION
The output of sane-find-scanner provides crucial information. For USB devices, it typically shows 'found USB scanner (vendor=0x####, product=0x####) at libusb:###:###'. These vendor and product IDs are necessary for configuring the sane-usb backend. For SCSI, it might show 'found SCSI scanner /dev/sg#'. For network scanners, it provides the IP address. This output directly informs how you should edit the corresponding SANE backend configuration files.
HISTORY
sane-find-scanner is a core component of the SANE (Scanner Access Now Easy) project, which was initiated in the late 1990s to provide a standard application programming interface (API) for accessing raster image scanners on Unix-like operating systems. As scanner hardware diversified across SCSI, USB, and parallel interfaces, the need for a robust detection utility became paramount. sane-find-scanner was developed early on as a foundational tool to help users and system administrators identify and verify scanner hardware presence, making it a critical first step in the SANE configuration and troubleshooting workflow, a role it continues to play today.
SEE ALSO
sane(7), scanimage(1), xscanimage(1), sane-backends(7), sane-usb(5), sane-scsi(5), sane-net(5)