> Hi, > On 8/9/06, Johannes Meixner <jsm...@suse.de> wrote: >> >> Hello, >> >> On Aug 9 13:03 Parag N(????) wrote (shortened): >> > With reference to Johannes Meixner's mail to this mailing list >> > http://lists.alioth.debian.org/pipermail/sane-devel/2006-August/017446.html, >> > I have created a patch that will make sane-find-scanner not to detect >> > Non-Scanner USB devices. >> >> The following in the patch looks wrong for me: >> ---------------------------------------------------------------- >> + if (i->bInterfaceClass == 255) >> + { >> + --is_scanner; >> ---------------------------------------------------------------- >> because there are USB scanners which have bInterfaceClass = 255 >> e.g. my Epson all-in-one device, see my other mail where I >> listed sane-find-scanner and lsusb results on three hosts: >> ---------------------------------------------------------------- >> Bus 002 Device 003: ID 04b8:080f Seiko Epson Corp. >> bDeviceClass 0 (Defined at Interface level) >> idVendor 0x04b8 Seiko Epson Corp. >> idProduct 0x080f >> bInterfaceClass 255 Vendor Specific Class >> iInterface 5 EPSON Scanner >> bInterfaceClass 7 Printer >> iInterface 6 USB Printer >> bInterfaceClass 8 Mass Storage >> iInterface 7 USB Mass Storage >> ---------------------------------------------------------------- >> and my plain Epson USB scanner has also bInterfaceClass = 255 >> ---------------------------------------------------------------- >> Bus 001 Device 002: ID 04b8:0121 Seiko Epson Corp. >> bDeviceClass 255 Vendor Specific Class >> idVendor 0x04b8 Seiko Epson Corp. >> idProduct 0x0121 >> bInterfaceClass 255 Vendor Specific Class >> iInterface 0 >> ---------------------------------------------------------------- > > Thanks for replying and testing patch. So this is not useful to > make sane-find-scanner not to show up non USB Scanner devices. > I agree only option then to have a proper maintained list from all > supported scanners by sane-backend. > I got an idea how about writing a code that will parse each > vendor's descriptions files and show up its name,usb id's, backend > status like good,basic,complete? I also found not all entries in .desc > files have usb id's.
As far as I know, there are two ways of detecting a scanner: 1) scanimage -L, which asks all installed backends to report a supported scanner. 2) sane-find-scanner, which makes a rough guess based on the USB descriptors and on several scanner-chip specific detection algorithms. Detection by sane-find-scanner will never be exact. As far as I understand, this tool is supposed to find scanners even if they are not supported yet by sane. Therefore there will always be some false positives. Simply patching it up based on a specific false positive will indeed result in at least one less false positive but will very likely also result in *more* false negatives. So I think the patch should not be applied to sane-find-scanner, but perhaps the wording used in sane-find-scanner can be more conservative when it thinks it has detected a scanner. I think a list of USB ids can only be useful for sane-find-scanner to positively identify a scanner, not for deciding somehing is NOT a scanner. Kind regards, Bertrik