[sane-devel] Error codes returned by Fujitsu fi-5900c?

m. allan noah kitno455 at gmail.com
Sun Dec 10 18:43:47 GMT 2023


The Fujitsu protocol is basically the same for all scanners, so you could
pick up a used fi-5120 or similar for cheap.

On Sun, Dec 10, 2023, 1:16 PM Wes Rishel <wrishel at gmail.com> wrote:

> re: Really, for what you are trying to do, you might be better off
> interfacing with the SANE API instead of trying to drive scanimage.
>
> Thanks. This is something I have thought before. Right now I invoke
> scanimage as a subprocess for each batch, so there is a noticeable delay
> while it polls the USB addresses. It would be nice to do that once and have
> each batch start quickly. If I had more access to the scanner for debugging
> I might use that approach.
>
> Meanwhile I will check out scanimage sources.
>
>
>
>
> On Sat, Dec 9, 2023 at 2:49 PM m. allan noah <kitno455 at gmail.com> wrote:
>
>> Look at the source code for scanimage, see how it translates SANE_status
>> to exit codes. If that is not sufficient, you might need to catch its
>> STDERR stream, and parse it.
>>
>> Really, for what you are trying to do, you might be better off
>> interfacing with the SANE API instead of trying to drive scanimage.
>>
>> allan
>>
>> On Sat, Dec 9, 2023 at 2:25 PM Wes Rishel <wrishel at gmail.com> wrote:
>>
>>> I have a program that uses SANE to run a Fujitsu fi-5900c scanner, but I
>>> only have access to the scanner when I am doing production work. So I am
>>> writing code on a system where the scanner is not available.
>>>
>>> It would help to have a list of the return codes from scanimage while
>>> working on a Fujitsu scanner. In particular, I would like to identify the
>>> error codes returned for various errors where the operator might correct
>>> them. Examples include stops due to double feeds, due to something stuck on
>>> the page (like a sticky note), due to a failure to pass a single page
>>> through the scanner, and so forth. I know that fujitsu.c somehow sets
>>> different return codes for some of these situations but I haven't found the
>>> list in sane-fujitsu(5) or sane-epjitsu(5).
>>>
>>> I believe that a good enough list is the SANE_status enum for the
>>> general SANE specification.
>>>
>>> What I don't know is how to map the various values in the enum to the
>>> return codes that scanimage uses on exit or whether there are specific
>>> additional values for Fujitsu.
>>>
>>> Can someone share the secret decoder ring ;-) or point me to a document
>>> or source file that has this info?
>>>
>>> Thanks in advance.
>>>
>>> -- Wes
>>>
>>
>>
>> --
>> "well, I stand up next to a mountain- and I chop it down with the edge of
>> my hand"
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20231210/4c506633/attachment.htm>


More information about the sane-devel mailing list