scanner seen by sane-find-scanner but not by scanimage
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
scanner seen by sane-find-scanner but not by scanimage
After boot:
Code:
# lsusb | grep He
Bus 003 Device 002: ID 03f0:0605 Hewlett-Packard ScanJet 2200c
# sane-find-scanner
# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.
# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.
found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x0605 [HP ScanJet 2200C], chip=LM9832/3) at libusb:003:002
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.
# Not checking for parallel port scanners.
# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.
# scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
$ scanimage -x 10 -y 10 --warmup-time 1 --lamp-off-at-exit=no
scanimage: no SANE devices found
After unpluging and repluging USB cable:
Code:
# lsusb | grep He
Bus 003 Device 005: ID 03f0:0605 Hewlett-Packard ScanJet 2200c
# scanimage -L
device `plustek:libusb:003:005' is a Hewlett-Packard Scanjet 2200c flatbed scanner
$ scanimage -x 10 -y 10 --warmup-time 1 --lamp-off-at-exit=no
P6
# SANE data follows
19 19
255
Is there a soft way to make scanner usable after boot without needing physical action ? For various reasons, my usb-core driver is in kernel, so can't unload it.
I had a similar problem with my Canoscan, which also uses the plustek driver. It turned out that the problem was a dicey usb cable, which kept disconnecting and reconnecting; probably there was a physical break somewhere in the cable. Each time it reconnected, it was given a new bus address and this caused problems with both scanimage and xscanimage, which expect to find the correct address in their default device. It worked with xsane, which starts each scan with a fresh search for available scanners.
Is there a soft way to make scanner usable after boot without needing physical action ? For various reasons, my usb-core driver is in kernel, so can't unload it.
Well, yes that will find all devices and reset accordingly. However you're free to identify and reset only the device of interest eg
Code:
echo -n "0000:03:00.0" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
echo -n "0000:03:00.0" | tee /sys/bus/pci/drivers/xhci_hcd/bind
The general idea is to examine /sys/bus/pci/drivers/xhci_hcd (or the appropriate controller directory for your system) to get the pertinent bus address, then unbind and bind as above.
I don't use power management. I don't use any kind of sleep, only proper poweroff. But, maybe USB chain remains supplied by V standby ...
Just to clarify further here - USB power management is handled at the kernel level, but it can be disabled if necessary. I was also speculating that the USB scanner device may be going into standby mode (and returned to an active state by resetting the USB bus or unplugging and re-plugging physically perhaps).
$ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
# cd /sys/bus/pci/drivers/?hci_hcd
# for i in ????:??:??.? ; do
> echo -n "$i" > unbind
> sleep 5
> echo -n "$i" > bind
> done
$ scanimage -L
device `plustek:libusb:003:004' is a Hewlett-Packard Scanjet 2200c flatbed scanner
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.