saned help? (was Re: [sane-devel] Fujitsu 5120C)

m. allan noah anoah at pfeiffer.edu
Thu Jun 1 14:46:04 UTC 2006


On Thu, 1 Jun 2006, Henning Meier-Geinitz wrote:

> Hi,
>
> On 2006-05-31 09:07, m. allan noah wrote:
>> On Tue, 30 May 2006, Jim McQuillan wrote:
>>
>>> Ok, I tried using scanimage without saned, and it works !!!!!
>>> Now, I need to figure out how to get saned working with this backend.
>>
>> Anyone here can give me any pointers? i wont rule out a bug in the
>> backend, but i dont know enough about saned to even start troubleshooting.
>>
>> what we see is that scanimage via saned is giving random buffer sizes to
>> the calls to sane_read.
>
> Thats ok. Any buffer size is acceptable by the SANE standard, even
> only one byte. You may get a similar error when running scanimage -T.
>
> The fujitsu backend seems to assume that the buffer is at least one
> scan line:
>
> bytes -= (bytes % s->params.bytes_per_line);

yes- the code is simplistic, and assumes that the frontend is not trying 
to fill an arbitrary buffer size exactly.

saned requests 8188 bytes, backend only returns 7656, cause that is an 
even number of scanlines. the difference is 532. then saned asks for 528 
bytes on the next attempt? why not 532? why not just transmit the 7656?

i will buffer a block in the backend and return pieces of it.

allan

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera



More information about the sane-devel mailing list