[sane-devel] PIXMA: New Protocol Timeouts

Rolf Bensch rolf at bensch-online.de
Thu Feb 18 09:35:11 UTC 2016

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.


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://sane-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
> timeout loop is working again, also with available sanei_usb_set_timeout().
> Please report any problems caused by this fixes.
> Cheers,
> Rolf

More information about the sane-devel mailing list