sane-find-scanner(1)

πŸ“¦
version 1.4.0 Β· 2 versions
  • 1.4.0 Β· alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.32 Β· centos-stream 9
, in alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

sane-find-scanner β€” bestie, this is the lil detective that goes and finds your SCSI and USB scanners and figures out which device files they're living in πŸ•΅οΈβ™€οΈβœ¨


🌸 SYNOPSIS 🌸

sane-find-scanner [-?|-h|--help] [-v] [-q] [-p] [-f] [-F filename]
[devname]

πŸŽ€ DESCRIPTION πŸŽ€

Okay so sane-find-scanner is a command-line tool that hunts down SCSI and USB scanners and works out what their UNIX device files are. Its whole main character goal? Making sure your scanners can actually get detected by SANE backends. No cap.

For SCSI scanners, it checks the default generic SCSI device files (like /dev/sg0) and /dev/scanner. The test is done by sending a SCSI inquiry command and looking for a device type of "scanner" or "processor" β€” and yes, some old HP scanners apparently be sending "processor" instead πŸ™ˆ (it's giving vintage). So sane-find-scanner will find any SCSI scanner connected to those default device files even if it isn't supported by any SANE backend. Iconic behavior honestly.

For USB scanners, it tests the USB kernel scanner device files first β€” think /dev/usb/scanner0, /dev/usb/scanner, and /dev/usbscanner. The files get opened and the vendor and device ids are determined, if the operating system supports this feature. Quick heads up: currently USB scanners are only found this way if they're supported by the Linux scanner module or the FreeBSD or OpenBSD uscanner driver.

After that test, sane-find-scanner tries to scan for USB devices found by the USB library libusb (if it's available). Now, there's no special USB class for scanners, so the heuristics used to tell scanners apart from other USB devices are lowkey not perfect 😭. It also tries to figure out the type of USB chip used in the scanner β€” and if it detects it, that gets printed after the vendor and product ids. And bestie? sane-find-scanner will even find USB scanners that aren't supported by any SANE backend. Ate. πŸ’…

Also real talk: sane-find-scanner won't find most parallel port scanners, or scanners connected to proprietary ports. Some parallel port scanners may be detected by sane-find-scanner -p. At the time of writing this will only detect Mustek parallel port scanners. 🫢

✨ OPTIONS ✨

  • -?, -h, --help β€” Prints a short usage message. The lil "here's how u use me" moment.
  • -v β€” Verbose output. Use it once and sane-find-scanner shows every device name and the test result. Use it twice and the SCSI inquiry information and the USB device descriptors get printed too. Go off, more info queen πŸ‘‘
  • -q β€” Be quiet. Prints only the devices, no comments. Minimalist vibe. 🀫
  • -p β€” Probe parallel port scanners.
  • -f β€” Force opening all explicitly given devices as SCSI and USB devices. That's useful if sane-find-scanner is wrong in determining the device type. (Basically: "girl, I know better, just try both." πŸ’€)
  • -F filename β€” filename is a file that contains USB descriptors in the format of /proc/bus/usb/devices as used by Linux. sane-find-scanner tries to identify the chipset(s) of all USB scanners found in such a file. This option is useful for developers when the output of cat /proc/bus/usb/devices is available but the scanner itself isn't.
  • devname β€” Test device file devname. No other devices are checked if devname is given. It's giving loyal. πŸ’–

🌈 EXAMPLE 🌈

sane-find-scanner -v

Check all SCSI and USB devices for available scanners and print a line for every device file.

sane-find-scanner /dev/scanner

Look for a (SCSI) scanner only at /dev/scanner and print the result.

sane-find-scanner -p

Probe for parallel port scanners.


πŸ¦‹ SEE ALSO πŸ¦‹

sane(7), sane-scsi(5), sane-usb(5), scanimage(1), xscanimage(1), xsane(1), sane-"backendname"(5)


πŸ’œ AUTHOR πŸ’œ

Oliver Rauch, Henning Meier-Geinitz and others


⭐ SUPPORTED PLATFORMS ⭐

USB support is limited to Linux (kernel, libusb), FreeBSD (kernel, libusb), NetBSD (libusb), OpenBSD (kernel, libusb). Detecting the vendor and device ids only works with Linux or libusb.

SCSI support is available on Irix, EMX, Linux, Next, AIX, Solaris, FreeBSD, NetBSD, OpenBSD, and HP-UX.


πŸ’€ BUGS πŸ’€

  • No support for most parallel port scanners yet. πŸ™ˆ
  • Detection of USB chipsets is limited to a few chipsets.

That's the whole tea, bestie β€” this page is from the SANE Scanner Access Now Easy manual set, dated 13 Jul 2008. Stay iconic, go find those scanners. πŸ’…βœ¨

πŸ“¦ where this page comes from