PIXMA: New Protocol Timeouts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PIXMA: New Protocol Timeouts

Rolf Bensch-2
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
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


--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIXMA: New Protocol Timeouts

Rolf Bensch-2
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://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
> 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
>



--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIXMA: New Protocol Timeouts

Louis Lagendijk-2
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

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PIXMA: New Protocol Timeouts

Rolf Bensch-2
Hi Louis,

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

Please have a look at these commits:
c41640f
bbd327f

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.

Cheers,
Rolf


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
>>> 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
>

--
sane-devel mailing list: [hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to [hidden email]
Loading...