<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN lang=EN-GB>
<P>Hello,</P>
<P>Can you please take me off your distribution list manually? I get about 30 of
these per day. The unsubscribe option below does not seem to be working fully.
Regards John</P>
<P>John Cotter</P>
<P>Lowestoft</P>
<P>Suffolk</P>
<P>United Kingdom</P></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV class=Section1>
<DIV></DIV><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
sane-devel-bounces+john.cotter=phonecoop.coop@lists.alioth.debian.org
[mailto:sane-devel-bounces+john.cotter=phonecoop.coop@lists.alioth.debian.org]
<B>On Behalf Of </B>Wade Fitzpatrick<BR><B>Sent:</B> 26 April 2009
08:19<BR><B>To:</B> Nicolas Martin<BR><B>Cc:</B> sane-devel<BR><B>Subject:</B>
Re: [sane-devel] Pixma problems: 1200dpi Grayscale and batch
mode<BR><BR></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px"><A
href="http://waddles.org/content/sane-canon-mp730-driver"></A>Things wrong in
pixma_mp730.c:<BR>
<OL>
<LI>Protocol error. The scanner did not like having start_session and
select_source commands sent to it when it already had a session open and was
reading from the ADF.<BR>
<LI>The maximum resolution for the ADF is only 600dpi.
<LI>The maximum bounds should not apply for the ADF. This is still an issue.
I changed the bounds in the pixma_config_t structure to be able to accept A4
pages, but the ADF can read up to 39 inches according to Canon's sales
flyer. </LI></OL><A
href="http://waddles.org/sites/waddles.org/files/pixma_mp730_batch_fixes.diff_.txt">The
patch containing fixes 1 and 2</A> is ready to be applied to CVS now. Fix 3 is
not ready yet.<BR><BR>I have solved the ECANCELED problem using a different
method. Please review the <A
href="http://waddles.org/sites/waddles.org/files/pixma_proper_finish.diff_.txt">patch</A>
on my website.<BR><BR>The change to pixma.c is still curious even to me. I
found that sometimes when I was stepping through the code in gdb, it would end
successfully without the ECANCELED return code, but every time I just let it
run by itself, it always returned ECANCELED. By experimenting with different
sleeps, from 10000 to 100000, I found that 30000 gives a successful scan
consistently. I don't understand why it works, it just works.<BR><BR>So now I
can scan many A4 pages successfully in batch mode through the ADF at
resolutions 75dpi to 600dpi.<BR><BR>When I add your suggestion to change the
way the width is calculated, it goes back to returning ECANCELED. See <A
href="http://waddles.org/sites/waddles.org/files/pixma_mp730_rounded_width.txt">the
log</A>.<BR><BR>The <A
href="http://waddles.org/sites/waddles.org/files/mp730_1200_gray.txt">log of a
1200dpi grayscale scan</A> is also attached to my <A
href="http://waddles.org/content/sane-canon-mp730-driver">site</A>.<BR><BR>Cheers,<BR>Wade.<BR><BR>
<DIV class=gmail_quote>2009/4/26 Nicolas Martin <SPAN dir=ltr><<A
href="mailto:nicolas.martin@freesurf.fr">nicolas.martin@freesurf.fr</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Le
samedi 25 avril 2009 à 23:43 +1000, Wade Fitzpatrick a écrit :<BR>
<DIV class=im>> I tried moving the MP730_PID and DEV macro from
pixma_mp730.c into<BR>> pixma_imageclass.c but the scanner would not
operate at all. It<BR>> attached to the endpoints correctly and could
read and write URBs but<BR>> when it came to sending the read_image
command (0xd420) it responded<BR>> with a cancel command
(0x1515).<BR>> The other imageCLASS devices are all limited to 600dpi
which fits<BR>> their specifications but the MP730 is capable of
1200x2400dpi optical.<BR>> Maybe the imageclass driver is not the best
reference for MP730.<BR>><BR></DIV>That's normal, there are some
differences, so MP730 cannot work out of<BR>the box with the imageclass
driver. The idea here was to compare both<BR>mp730 and imageclass files to
check differences, if you do this, you'll<BR>see they are very
similar.<BR><BR>1/ grayscale issue<BR>Could you now just activate only the
pixma trace log:<BR>$ export SANE_DEBUG_PIXMA=11<BR>and put the full error
trace in a file, zip it and send it back, I would<BR>like to check if the
scanner sent the end scan condition, or if<BR>something special happens at
the moment it hangs. Also, how much data it<BR>expected to send versus how
much is requested.<BR><BR>2/ End condition canceled by software<BR>I have a
clue (but it's only a guess) on what happens here, as this<BR>looks same to
what happened for devices in the mp150 file.<BR>The "Canceled by software"
end condition was raised because the frontend<BR>expected less data than the
scanner was requested to send, so the<BR>backend sends an abort command to
the scanner when all its expected data<BR>is received.<BR>In fact, all Pixma
devices need a rounded up scan width, older devices<BR>had a 4 or 12 pixels
alignment, while recent generations currently all<BR>use 32.<BR>For mp150
devices, the fix was simply to modify the scan width area<BR>requested by
the frontend, to take this into account (the round up was<BR>only done for
scanner parameters).<BR>Could you try the same in the mp730 file:<BR><BR>in
function mp730_check_param(), change the current
content:<BR><BR> sp->depth = 8; /*
FIXME: Does MP730 supports other depth? */<BR> sp->line_size =
calc_raw_width (sp) * sp->channels;<BR><BR>with
that:<BR><BR> sp->depth = 8; /* FIXME: Does MP730 supports other
depth? */<BR> sp->w = calc_raw_width (sp);<BR> sp->line_size
= calc_raw_width (sp) * sp->channels;<BR><BR>and give a try ?<BR>Also,
could you take a complete [pixma] only log trace and send it<BR>back
?<BR><FONT color=#888888><BR>Nicolas<BR></FONT>
<DIV>
<DIV></DIV>
<DIV class=h5>><BR>> Back in the pixma_mp730 driver, when I run a test
scan at 1200dpi<BR>> Gray, it reads some image data then the scanner just
keeps sending OK<BR>> messages forever. It may be a hardware bug. Here is
what it looks<BR>> like:<BR>><BR>>
[sanei_usb] 3DE02A 2C 2A 29 2B 29 2B 29 2A 29 2B 29 2A 2B 2F<BR>>
2E *,*)+)+)*)+)*+/.<BR>>
[sanei_usb] 3DF02C 2A 2D 2B 2C 2C 2D 29 2C 2E 30 31 32 2F 33<BR>>
37 ,*-+,,-),.012/37<BR>>
[sanei_usb] 3E003D 52 60 65 69 69<BR>>
=R`eii<BR>> [sanei_usb] sanei_usb_read_bulk:
wanted 48646 bytes, got 15878<BR>>
bytes<BR>> [pixma] IN T=17.283
len=15878<BR>><BR>> [pixma]
00003de0:2a 2c 2a 29 2b 29 2b 29 2a 29 2b 29 2a 2b<BR>>
2f 2e<BR>>
[pixma] 00003df0:2c 2a 2d 2b 2c 2c 2d 29 2c 2e 30 31 32
2f<BR>> 33 37<BR>>
[pixma] 00003e00:3d 52 60 65 69 69<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_write_bulk: trying to write 10 bytes<BR>>
[sanei_usb] 000 D4 20 00 00 00 00 00 C0 04<BR>>
00
. ........<BR>> [sanei_usb]
sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>> [pixma] OUT T=17.341
len=10<BR>> [pixma] 00000000:d4 20 00
00 00 00 00 c0 04 00<BR>>
[pixma]<BR>> [sanei_usb] sanei_usb_read_bulk:
trying to read 512 bytes<BR>> [sanei_usb] 000
06 06 00 00 00<BR>> 00
......<BR>> [sanei_usb]
sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes<BR>>
[pixma] IN T=17.344 len=6<BR>>
[pixma] 00000000:06 06 00 00 00 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_int: trying to read 16 bytes<BR>>
[sanei_usb] sanei_usb_read_int: read failed: Resource<BR>>
temporarily unavailable<BR>>
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<BR>>
[sanei_usb] 000 D4 20 00 00 00 00 00 C0
04<BR>> 00
. ........<BR>>
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>> [pixma] OUT
T=17.448 len=10<BR>> [pixma]
00000000:d4 20 00 00 00 00 00 c0 04 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_bulk: trying to read 512 bytes<BR>>
[sanei_usb] 000 06 06 00 00 00<BR>> 00
......<BR>>
[sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes<BR>>
[pixma] IN T=17.451 len=6<BR>>
[pixma] 00000000:06 06 00 00 00 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_int: trying to read 16 bytes<BR>>
[sanei_usb] sanei_usb_read_int: read failed: Resource<BR>>
temporarily unavailable<BR>>
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<BR>>
[sanei_usb] 000 D4 20 00 00 00 00 00 C0
04<BR>> 00
. ........<BR>>
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>> [pixma] OUT
T=17.556 len=10<BR>> [pixma]
00000000:d4 20 00 00 00 00 00 c0 04 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_bulk: trying to read 512 bytes<BR>>
[sanei_usb] 000 06 06 00 00 00<BR>> 00
......<BR>>
[sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes<BR>>
[pixma] IN T=17.559 len=6<BR>>
[pixma] 00000000:06 06 00 00 00 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_int: trying to read 16 bytes<BR>>
[sanei_usb] sanei_usb_read_int: read failed: Resource<BR>>
temporarily unavailable<BR>>
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes<BR>>
[sanei_usb] 000 D4 20 00 00 00 00 00 C0
04<BR>> 00
. ........<BR>>
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>> [pixma] OUT
T=17.663 len=10<BR>> [pixma]
00000000:d4 20 00 00 00 00 00 c0 04 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_bulk: trying to read 512 bytes<BR>>
[sanei_usb] 000 06 06 00 00 00<BR>> 00
......<BR>>
[sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes<BR>>
[pixma] IN T=17.666 len=6<BR>>
[pixma] 00000000:06 06 00 00 00
00<BR><BR><BR>> Regarding the ECANCELED error code on completion, this is
the end of a<BR>> successful scan. The image data is fine but the driver
sends an<BR>> abort_session command on completion<BR>><BR>>
[sanei_usb] sanei_usb_write_bulk: trying to write 10
bytes<BR>> [sanei_usb] 000 D4 20 00 00 00 00
00 C0 04<BR>> 00
. ........<BR>>
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>>
[pixma] OUT T=3.310 len=10<BR>> [pixma]
00000000:d4 20 00 00 00 00 00 c0 04 00<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_read_bulk: trying to read 512 bytes<BR>>
[sanei_usb] 000 06 06 20 00 37 50 55 55 56 55 56 55 58 55 57<BR>>
56 .. .7PUUVUVUXUWV<BR>>
[sanei_usb] 010 55 56 57 55 54 56 56 58 53 57 5A 58 A7 B6 B8<BR>>
B9 UVWUTVVXSWZX....<BR>><BR>>
[sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got
512<BR>> bytes<BR>>
[pixma] IN T=3.315 len=512<BR>>
[pixma] 00000000:06 06 20 00 37 50 55 55 56 55 56 55 58
55<BR>> 57 56<BR>>
[pixma] 00000010:55 56 57 55 54 56 56 58 53 57 5a 58 a7
b6<BR>> b8 b9<BR>><BR>>
[sanei_usb] sanei_usb_read_bulk: trying to read 48646
bytes<BR>><BR>><BR>> [sanei_usb] 353031
2F 34 2C 2A 3D 25 30 37 3E 30 43 2A 32 3B<BR>>
37 1/4,*=%07>0C*2;7<BR>>
[sanei_usb] 35402B 47 37 44 4A 3A 41 5E 80 63 51 51 50 53 51<BR>>
53 +G7DJ:A^.cQQPSQS<BR>>
[sanei_usb] 355051 52 52 51 50 FF<BR>>
QRRQP.<BR>> [sanei_usb] sanei_usb_read_bulk:
wanted 48646 bytes, got 13654<BR>>
bytes<BR>> [pixma] IN T=3.389
len=13654<BR>><BR>> [pixma]
00003530:31 2f 34 2c 2a 3d 25 30 37 3e 30 43 2a 32<BR>>
3b 37<BR>>
[pixma] 00003540:2b 47 37 44 4a 3a 41 5e 80 63 51 51 50
53<BR>> 51 53<BR>>
[pixma] 00003550:51 52 52 51 50 ff<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_write_bulk: trying to write 10 bytes<BR>>
[sanei_usb] 000 EF 20 00 00 00 00 00 00 00<BR>>
00
. ........<BR>> [sanei_usb]
sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>> [pixma] OUT T=3.441
len=10<BR>> [pixma] 00000000:ef 20 00
00 00 00 00 00 00 00<BR>>
[pixma]<BR>> [sanei_usb] sanei_usb_read_bulk:
trying to read 2 bytes<BR>> [sanei_usb] 000
06<BR>> 06
..<BR>>
[sanei_usb] sanei_usb_read_bulk: wanted 2 bytes, got 2 bytes<BR>>
[pixma] IN T=3.444 len=2<BR>>
[pixma] 00000000:06 06<BR>>
[pixma]<BR>> [sanei_usb]
sanei_usb_write_bulk: trying to write 10 bytes<BR>>
[sanei_usb] 000 F3 20 00 00 00 00 00 00 0C<BR>>
00
. ........<BR>> [sanei_usb]
sanei_usb_write_bulk: wanted 10 bytes, wrote 10<BR>>
bytes<BR>> [pixma] OUT T=3.444
len=10<BR>> [pixma] 00000000:f3 20 00
00 00 00 00 00 0c 00<BR>>
[pixma]<BR>> [sanei_usb] sanei_usb_read_bulk:
trying to read 14 bytes<BR>> [sanei_usb] 000
06 06 03 01 00 02 03 00 02 00 00 00 00<BR>>
F5 ..............<BR>>
[sanei_usb] sanei_usb_read_bulk: wanted 14 bytes, got 14 bytes<BR>>
[pixma] IN T=3.449 len=14<BR>>
[pixma] 00000000:06 06 03 01 00 02 03 00 02
00 00 00 00 f5<BR>> [pixma]<BR>>
[pixma] Current status: paper=1 cal=0 lamp=0<BR>>
[sanei_usb] sanei_usb_write_bulk: trying to
write 10 bytes<BR>> [sanei_usb] 000 F3 20 00
00 00 00 00 00 0C<BR>> 00
. ........<BR>>
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes,
wrote 10<BR>> bytes<BR>>
[pixma] OUT T=3.452 len=10<BR>>
[pixma] 00000000:f3 20 00 00 00 00 00 00 0c 00<BR>>
[pixma]<BR>>
[sanei_usb] sanei_usb_read_bulk: trying to read 14 bytes<BR>>
[sanei_usb] 000 06 06 03 01 00 02 03 00 02 00 00 00
00<BR>> F5
..............<BR>> [sanei_usb]
sanei_usb_read_bulk: wanted 14 bytes, got 14 bytes<BR>>
[pixma] IN T=3.452 len=14<BR>>
[pixma] 00000000:06 06 03 01 00 02 03 00 02 00 00 00 00
f5<BR>> [pixma]<BR>>
[pixma] Current status: paper=1 cal=0 lamp=0<BR>>
[sanei_usb] sanei_usb_write_bulk: trying to write 20
bytes<BR>> [sanei_usb] 000 CF 60 00 00 00 00
00 00 0A 00 01 00 00 00 00<BR>> 00
.`..............<BR>> [sanei_usb] 010 00 00
00<BR>> FF
....<BR>> [sanei_usb]
sanei_usb_write_bulk: wanted 20 bytes, wrote 20<BR>>
bytes<BR>> [pixma] OUT T=3.455
len=20<BR>> [pixma] 00000000:cf 60 00
00 00 00 00 00 0a 00 01 00 00 00<BR>>
00 00<BR>> [pixma] 00000010:00 00 00
ff<BR>> [pixma]<BR>>
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes<BR>>
[sanei_usb] 000 06<BR>>
06
..<BR>> [sanei_usb]
sanei_usb_read_bulk: wanted 2 bytes, got 2 bytes<BR>>
[pixma] IN T=3.459 len=2<BR>>
[pixma] 00000000:06 06<BR>>
[pixma]<BR>> [pixma]
pixma_read_image():cancelled by software<BR>>
[pixma] Reader task terminated: ECANCELED<BR>>
[pixma] pixma_close(): Canon MultiPASS MP730<BR>>
[sanei_usb] sanei_usb_close: closing device 0<BR>><BR>>
I have managed to get some success by adding a small sleep to
pixma.c<BR>> but I'm still testing that.<BR>><BR>> Cheers,<BR>>
Wade.<BR>><BR>><BR>> Moving from the "MP730 driver broken since
pixma-0.12.2" thread...<BR>><BR>> Nicolas Martin wrote:<BR>>
Concerning points 1 and 2 you raise, this is interesting:<BR>><BR>>
The pixma_mp730.c file has been left almost untouched for a while
(no<BR>> requests or testing ability so far), so it may be in a less
"enhanced"<BR>> state than other ones covering more recent Pixma models,
that have<BR>> been<BR>> recently updated.<BR>> Dennis Lou wrote a
while back the pixma_imageclass.c file, based on<BR>> the<BR>>
pixma_mp730.c file, and which covers several Canon ImageClass models<BR>>
in<BR>> the pixma backend. The code has been nicely brushed up, and is
now in<BR>> a<BR>> better shape than mp730's one.<BR>> So for the 2
issues you raise, I'll take a look and compare the<BR>> pixma_mp730.c
code with pixma_imageclass.c and pixma_mp150.c ,<BR>> probably<BR>>
will help a lot to solve those issues, thanks to your cooperation
for<BR>> testing and feedback.<BR>><BR>>
Nicolas<BR>><BR>><BR>> Le vendredi 24 avril 2009 à 01:19 +1000,
Wade Fitzpatrick a écrit :<BR>> > The only problems I can find now
are:<BR>><BR>> > 1. Scanning at 1200dpi
Grayscale. Sometimes it hangs depending<BR>> on<BR>> >
the x and y values - the larger the values, the sooner
it<BR>> > fails. If it does succeed, the
data is always bogus.<BR>><BR>> > 2. The return
code after a successful scan is always ECANCELED<BR>> >
which causes a problem for batch mode as it will only
scan<BR>> one<BR>> > page. It doesn't
seem to matter for single
scans.<BR><BR><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>