[sane-devel] Q: improving epson2 for Epson 12000XL

Olaf Meeuwissen paddy-hack at member.fsf.org
Sun Sep 27 08:57:49 BST 2020


Hi Wolfram,

Sorry for not chiming in earlier.

I have been involved with development of the third-party epkowa and
utsushi backends for many years.  A lot of the protocol is documented in
the code for the utsushi backend via doxygen source comments.  See

  https://gitlab.com/utsushi/utsushi/-/tree/master/drivers/esci

# I guess I could add a job to publish the documentation in a more
# accessible format via GitLab Pages.  Please submit an issue if you
# would like that.

Remaining comments inlined.

Wolfram Sang writes:

> Hiya,
>
>> a) The scanner reports level "B8". For "B8", allowed brightness levels are in
>>    the -4..3 range. However, my scanner returns -EINVAL for -4. To avoid that,
>>    I guess I need to check the model name and adapt the range accordingly?

Only the following values are documented* -3, -2, -1, 1, 2, 3.
Yes, 0 is not documented as far as I know.

> Fixed with !529.
>
>>
>> b) It seems to me that set_focus is not working for this model because
>>    e2_set_extended_scanning_parameters() says "/* XXX focus */" and no byte in
>>    the buffer is filled with the focus value. Probably the location is unknown?
>>    And I'd need to snoop Windows USB traffic to (hopefully) figure it out?

There is no documented position that I know of but there is still space
where it might be set.

> Fixed with !530.
>
>>
>> c) 'focus' has only two options. 0mm and 2.5mm. The hex values are 0x19 apart.
>>    That being dec 25, it is tempting to try inbetween values. But I assume I'd
>>    need some evidence that those values are "officially OK" somehow?

There are two documented values: 0xff for autofocus and 0x40 for setting
it to the glass plate.  Other values appear to be allowed.

> This and also autofocus added with !531. If someone has comments, I am
> honestly looking forward to hear them. I am still new to the project.

I'll have a look at the merge requests and comment there.

> The only question left for me now: Should focus/autofocus settings
> really have CAP_ADVANCED?

That's debatable indeed but I'd say CAP_ADVANCED is appropriate for most
users.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join



More information about the sane-devel mailing list