[sane-devel] epsonds backend ADF size with ES-50

Sean Greenslade sean at seangreenslade.com
Wed Aug 31 20:26:41 BST 2022


On Wed, Aug 31, 2022 at 09:34:55AM -0700, Ralph Little wrote:
> Hi,
> 
> On Tue, Aug 30, 2022 at 10:36 PM Sean Greenslade <sean at seangreenslade.com>
> wrote:
> 
> > Hi, all. I recently picked up an Epson ES-50 sheet-feed scanner. My
> > intent is to use it for receipt scanning, so I tried it out with a
> > ~700 mm long receipt and found that it would error out at around 450 mm
> > into the scan. The manual claims the scanner is capable of a max of 72
> > inch document length, so I started poking around in the epsonds backend
> > code.  Something that jumped out at me was the eds_set_adf_area
> > function. It seems that for this particular scanner, three ADF size
> > values are reported: AREA, AMIN, and AMAX (in epsonds-cmd.c around line
> > 445 on current git master). The eds_set_adf_area function is called with
> > the values from AREA, which limits the document length to 14 inches. I'm
> > assuming AREA is just meant to be a default value, but if anyone has any
> > deeper insight into the meaning, I'd be interested to know.
> >
> 
> Looking at that code, AMIN and AMAX are pretty much ignored.
> What do you get for all of the AREA/AMIN/AMAX parameters?
> Perhaps we can figure out what they mean and code up something a little
> better?

Here's the relevant debug output (with my patch applied):

[22:18:10.862326] [epsonds] = gathering device information
[22:18:10.863632] [epsonds]      ADF: sheet feed type
[22:18:10.863650] [epsonds]      ADF: order is 1 to N
[22:18:10.863660] [epsonds]      ADF: auto pre-feed
[22:18:10.863670] [epsonds]      ADF: left aligned
[22:18:10.863683] [epsonds]      ADF: auto scan
[22:18:10.863699] [epsonds]      ADF: area 850x1400 @ 100dpi
[22:18:10.863716] [epsonds]      ADF: min 200x200 @ 100dpi
[22:18:10.863731] [epsonds]      ADF: max 850x7200 @ 100dpi
[22:18:10.863743] [epsonds] eds_set_adf_area: 0.000000,0.000000 215.899994,1828.799988 100 [mm]
[22:18:10.863760] [epsonds]      ADF: basic resolution is 600 dpi
[22:18:10.863770] [epsonds]      ADF: auto recovery

The interesting thing is that these min and max values perfectly match
what is reported in the user's guide for this scanner:

> Document size:
> Maximum: 8.5 × 72 inches (215.9 × 1828.8 mm)
> Documents scanned at 301 dpi or more: up to 8.5 × 14 inches (215.9 × 355.6 mm)
> Minimum: 2 × 2 inches (50.8 × 50.8 mm)

So Allan's point in his reply is probably valid: the AMAX is only usable
at the 200 dpi resolution. And indeed, I just tried a large scan at 600
dpi with my patch and it fails once the paper exceeds 14 inches. So this
is indeed more complicated than my simple patch.

Does anyone know offhand if there are facilities in the sane APIs for
different scan sizes per supported resolution? I see the TL_X/Y and
BR_X/Y, but it seems like the API assumes that those values are fixed
for a given scanner.

> I don't believe that we have a current maintainer for this backend although
> we do get some submissions from Epson Japan now and then for new models. I
> wonder if they would be willing to shed some light on this or provide us
> some documentation on this aspect of the protocol?

Yeah, it would be nice to know if the resolution / scan area
relationship can be queried out of the scanner, or if this will need to
be special-cased per model in the sane code.

Thanks,

--Sean




More information about the sane-devel mailing list