Johannes Meixner <jsm...@suse.de> writes: > Hello,
Hi, > On Jul 5 08:50 Gerhard Jaeger wrote (shortened): >> On Tuesday 05 July 2005 02:10, Olaf Meeuwissen wrote: >> > I would much appreciate it if someone with commit privileges would be >> > so kind as to update doc/descriptions-external/epkowa.desc. >> >> done - with a small correction, you might want to cross-check that. > > I noticed that many model names are a bit different in epson.desc > and epkowa.desc. In epkowa.desc I tried to stick to the names under which the scanners are marketed as much as possible. That means that most of the names in that file should correspond (quite well) with what is on the case, so users should be able to find out whether their particular model is supported or not. > I don't have the detailled knowledge which model names are exactly > the right ones but I assume that many of those models are on fact > the same. Yes, many of them are and, where known, I included such information in the comment. You'll see things like "overseas version of the ...". > As scanner config tools build the model lists from the *.desc files > it leads to some user confusion which exact model he should select. Such scanner config tools put an awful lot of faith in files that in most situations are updated manually and bear no direct mechanical correspondence to the sources for the backend. I know that such a correspondence will be hard to establish but anyway. > The user may think that one model is only supported by one backend > because of sightly different model names. Actually, I've seen the reverse. Oh, the Perfection 1650 is supported by the epson and epkowa backends. Cool! I'll go buy the 1670. That should work. Well, it doesn't. BTW, the 1670 is supported by the snapscan backend. > A scanner config tool cannot find the matching backends if the > model name in *.desc is sightly different than the autodetected > model name and therefore the tool will not offer all backends which > work in fact for the scanner to the user. > > Example: > > The labels on my scanners (i.e. what is on the hardware) are > "EPSON PERFECTION 1240U" and "EPSON PERFECTION 2480 PHOTO". > > In epson.desc there is "Epson Perfection 1240". > In snapscan.desc there is "Epson Perfection 2480". > In epkowa.desk there is "EPSON Perfection 1240U" > and "EPSON Perfection 2480 PHOTO". Apart from upper/lower case differences, they match alright with what is in epkowa.desc, but see below. Note, the SANE spec even says that backends should use "Epson" for the vendor strings. If this is the worst of your troubles, may I suggest that your config tool uses strcasecmp(). > sane-find-scanner finds > the "EPSON PERFECTION 1240U" as > "... vendor=0x04b8 [EPSON], product=0x010b [Perfection1240] ..." > and the "EPSON PERFECTION 2480 PHOTO" as > "... vendor=0x04b8 [EPSON], product=0x0121 [EPSON Scanner] ..." > > "lsusb -v" lists > the "EPSON PERFECTION 1240U" as > idVendor 0x04b8 Seiko Epson Corp. > idProduct 0x010b Perfection 1240 > iManufacturer 1 EPSON > iProduct 2 Perfection1240 > and the "EPSON PERFECTION 2480 PHOTO" as > idVendor 0x04b8 Seiko Epson Corp. > idProduct 0x0121 > iManufacturer 1 EPSON > iProduct 2 EPSON Scanner > > > Summary: > Most model strings are slightly different depending where the > information is stored. Very well observed and this is exactly why autodetected strings do not match, in principle, what is on the case. > When case is ignored and meaningless characters > (e.g. all except "abcdefghijklmnopqrstuvwxyz0123456789+") > are ignored, more model strings become equivalent > but trailing meaningful characters (like "U" or "PHOTO") > cannot be ignored by a scanner setup tool and this leads > to the above problems for the users. FYI, the U stands for USB and PHOTO indicates that the scanner sports a TPU. There is also S for SCSI. As far as EPSON scanners are concerned, I think you'll get along quite well with longest substring match. > I would apprecialte it if at least the manufacturer and model > strings in epson.desc and epkowa.desc would be the same and > if possible exactly those which are autodetected. The first part of your request can be done. It just needs a bit of synchronisation between the files. (Karl, are you listening? CC'd you explicitly, so I'd say yes. Want a diff against epson.desc?) The second part is plain impossible. > By the way: > Does anybody know why model name autodetection fails > for the "EPSON PERFECTION 2480 PHOTO"? > Is the model name stored inside the scanner and this model > reports only "EPSON Scanner" on the USB bus or has the USB system > a map "model ID -> model name" where an entry for this model > is missing? Let's see how many names there are. - one on the scanner case - one reported as part of the USB/SCSI information - one reported by the firmware As Oliver Schwartz already noted in a different follow-up, the names used by EPSON are, eh, not very consistent. That puts it mildly. Just take a look at (any of) the Stylus CX5100/CX5200/CX5300/CX5400 and the CC-600PX. These are all really just the same hardware with a different model name on the case. They all have the same USB product ID (0x0801, see epkowa_usb.c). The CC-600PX and Stylus CX5100/CX5200 all return the same firmware name ("CC-600PX", see epkowa.c). The Stylus CX5300 and CX5400 also return the same firmware name but one different from the other three ("CX5400", see epkowa.c). I haven't looked at what the USB/SCSI protocols have to offer as far as model names are concerned but I doubt it will be useful. Probably something like "EPSON SCANNER", with or without a random integer attached for no particular reason. Never mind case differences. Why all the different names? These scanners are all marketed in different regions (something that I also try to explain in a comment in epkowa.desc). Not only are the model names different, but quite often the imprint on the panel differs as well. Then there may also be minor differences in what Windows/Mac software comes with it. None of these differences have anything to do with getting the thing to work with SANE, but, well, someone thinks there's a need to keep them apart somehow. # And drive you and me nuts in the meantime ;-) The epkowa backend bends over backwards to try to figure out a model name that corresponds to what is on the case but there are limits (see epkowa.c, second_guess_model_name() and the scanner_data array). It uses the TZ environment variable to distinguish between Japan and overseas and I'm not looking forward to try distinguishing between all the other regions. Hope this clarifies things a bit. If you do think up a way to improve this situation (that doesn't involve a web-cam pointed at the scanner ;-) I'd like to know. While writing this up, I wondered if a :same-as or :clone-of tag in the description files might be useful for cases like this. Oh, and while at it, how about a :license tag so we can easily flag non-free software (like part of the epkowa backend :-(). -- Olaf Meeuwissen EPSON AVASYS Corporation, LAN FSF Associate Member #1962 sign up at http://member.fsf.org/ GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97 976A 16C7 F27D 6BE3 7D90 Penguin's lib! -- I hack, therefore I am -- LPIC-2