[sane-devel] PIXMA: New Protocol Timeouts

Rolf Bensch rolf at bensch-online.de
Sat Mar 5 18:05:08 UTC 2016

Hi Louis,

In the meantime I had time to work a little on the imageclass sub-backend.

Please have a look at these commits:

For the 1st possibly failing USB command I chose a reduced timeout
duration of 2 sec.

This code also affects the BJNP communications. But I haven't seen any
problems testing a MF6140 device.


Am 27.02.2016 um 18:44 schrieb Louis Lagendijk:
> 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
>>> 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