[sane-devel] sane-backends 1.0.27 skips my SnapScan e20 in USB "unconfigured" state (OK with 1.0.25)

Dominique Quatravaux dominique at quatravaux.org
Sun Mar 11 20:50:27 UTC 2018


Hello list, I am writing to report that my SnapScan e20 broke between
1.0.25_1 and 1.0.27_3 (Mac OS X with Homebrew) and I'm not exactly
sure what is going on, however I experimented a bit and found some
facts that might be of interest.

Mac:~$ /usr/local/Cellar/sane-backends/1.0.25_1/bin/sane-find-scanner -v
This is sane-find-scanner from sane-backends 1.0.25
[...]
searching for USB scanners:
found USB scanner (vendor=0x06bd [AGFA ], product=0x2091 [SNAPSCAN])
at libusb:020:007
[...]


Mac:~$ /usr/local/Cellar/sane-backends/1.0.27_3/bin/sane-find-scanner -v
This is sane-find-scanner from sane-backends 1.0.27
[...]
searching for USB scanners:
device 0x06bd/0x2091 at 020:007 is not configured
[...]

*However,* after xsane (using older sane-backends, copied libjpeg 8
etc.) opens the scanner OK and gets it to warm up — lo and behold, the
mood improves:

Mac:~$ /usr/local/Cellar/sane-backends/1.0.27_3/bin/sane-find-scanner -v
This is sane-find-scanner from sane-backends 1.0.27
[...]
searching for USB scanners:
found USB scanner (vendor=0x06bd [AGFA], product=0x2091 [ SNAPSCAN e20
  ]) at libusb:020:007
[...]

This state of affairs persists if I unplug the scanner, power-cycle it
and and plug it back in, but not if I reboot my Mac (even keeping the
scanner *unplugged* during the reboot). The "good mood" of
sane-find-scanner v1.0.27 therefore appears to be caused by state in
my Mac's operating system (not something scanner-side).

I recompiled from source and using lldb I could establish that the
"device XXX is not configured" message that I get in "cold" state of
the scanner, comes from libusb_get_configuration() returning config ==
0 (tools/sane-find-scanner.c line 867).

Finally, I need to mention that my SnapScan e20 is of the
"firmware-needy" kind, i.e. it requires

firmware /usr/local/sane-firmware/snape20.bin

in /usr/local/Cellar/sane-backends/VERSIONDUJOUR/etc/sane.d/snapscan.conf
, or it won't even move motors much less respond to xsane. (This
explains my line of investigation to figure out whether the "good
mood" state was caused by my scanner having gotten its firmware; which
unfortunately doesn't appear to be the case.)

I cannot help but notice that
https://github.com/javian/homebrew-core/commit/b1b4d38d5f6875d152f50b36c0950f18a9837a3b
falls just inbetween my "working" and "not working" cases, and
introduces libusb-related changes so I am taking the liberty to put
fxcoudert in Cc.

I am in a position to try patches, etc. Thanks in advance for any help
in that matter,

--
 Dominique Quatravaux
 dominique at quatravaux.org



More information about the sane-devel mailing list