[sane-devel] PIXMA: New Protocol Timeouts

Louis Lagendijk louis at fazant.net
Sat Feb 27 17:44:17 UTC 2016


On 2016-02-18 10:35, Rolf Bensch wrote:
> Hello Louis,
> 
> However, some Pixma scanners usually timeout the 1st USB command. I
> already fixed this in pixma_imageclass.c by simply resending the 1st
> command (query_status()).
> 
> To reduce the timeout loop from 8 sec to 1 sec for this 1st particular
> command, I'd like to load tmo in pixma_cmd_transaction() (->
> pixma_common.c) from a parameter.
> 
> I see 2 options:
> (1) a new parameter in the function call of pixma_cmd_transaction()
> (2) a new parameter with the default setting for 8 sec, e.g. in s->io
> 
> Which one is smarter?
> 
> Many thanks for your idea in advance.
> 
> Cheers,
> Rolf
> 
> Am 18.02.2016 um 08:54 schrieb Rolf Bensch:
>> Hello List,
>> 
>> My recent commits to Sane's git repository contain some fixes which
>> affect USB and BJNP protocol timeouts.
>> 
>> This affects *ALL* Canon PIXMA, imageCLASS, i-SENSYS and *SOME* 
>> CanoScan
>> scanning devices (please search your scanner here:
>> http://sanexe-project.org/lists/sane-backends-cvs.html#S-PIXMA).
>> 
>> Background:
>> 
>> Many users have reported and my experience was the same while 
>> debugging
>> a new scanner, that the 8 sec receive timeout needed approx. 160 sec 
>> to
>> lapse. This blocked the interface and was very annoying.
>> 
>> I found out that the protocol timeouts were set to eternal 20 sec. So 
>> I
>> reduced the timeouts down to 1 sec (human immediately), for both
>> PIXMA_BULKIN_TIMEOUT and PIXMA_BULKOUT_TIMEOUT. Now the 8 sec receive
>> timeout loop is working again, also with available 
>> sanei_usb_set_timeout().
>> 
>> Please report any problems caused by this fixes.
>> 
>> Cheers,
>> Rolf
>> 
Hi Rolf
Myapologies for not responding sooner, but I am on a businesstrip untill 
end of coming week. I hope to be able to get back to you when I get home
Br, Louis



More information about the sane-devel mailing list