[sane-devel] Pixma problems: 1200dpi Grayscale and batch mode

Wade Fitzpatrick wade.fitzpatrick at gmail.com
Sat Apr 25 13:43:20 UTC 2009


I tried moving the MP730_PID and DEV macro from pixma_mp730.c into
pixma_imageclass.c but the scanner would not operate at all. It attached to
the endpoints correctly and could read and write URBs but when it came to
sending the read_image command (0xd420) it responded with a cancel command
(0x1515).

The other imageCLASS devices are all limited to 600dpi which fits their
specifications but the MP730 is capable of 1200x2400dpi optical. Maybe the
imageclass driver is not the best reference for MP730.

Back in the pixma_mp730 driver, when I run a test scan at 1200dpi Gray, it
reads some image data then the scanner just keeps sending OK messages
forever. It may be a hardware bug. Here is what it looks like:

[sanei_usb] 3DE02A 2C 2A 29 2B 29 2B 29 2A 29 2B 29 2A 2B 2F 2E
> *,*)+)+)*)+)*+/.
> [sanei_usb] 3DF02C 2A 2D 2B 2C 2C 2D 29 2C 2E 30 31 32 2F 33 37
> ,*-+,,-),.012/37
> [sanei_usb] 3E003D 52 60 65 69 69                               =R`eii
> [sanei_usb] sanei_usb_read_bulk: wanted 48646 bytes, got 15878 bytes
> [pixma] IN   T=17.283 len=15878
>


> [pixma]  00003de0:2a 2c 2a 29 2b 29 2b 29  2a 29 2b 29 2a 2b 2f 2e
> [pixma]  00003df0:2c 2a 2d 2b 2c 2c 2d 29  2c 2e 30 31 32 2f 33 37
> [pixma]  00003e00:3d 52 60 65 69 69
> [pixma]
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 D4 20 00 00 00 00 00 C0 04 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=17.341 len=10
> [pixma]  00000000:d4 20 00 00 00 00 00 c0  04 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 512 bytes
> [sanei_usb] 000 06 06 00 00 00 00                               ......
> [sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes
> [pixma] IN   T=17.344 len=6
> [pixma]  00000000:06 06 00 00 00 00
> [pixma]
> [sanei_usb] sanei_usb_read_int: trying to read 16 bytes
> [sanei_usb] sanei_usb_read_int: read failed: Resource temporarily
> unavailable
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 D4 20 00 00 00 00 00 C0 04 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=17.448 len=10
> [pixma]  00000000:d4 20 00 00 00 00 00 c0  04 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 512 bytes
> [sanei_usb] 000 06 06 00 00 00 00                               ......
> [sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes
> [pixma] IN   T=17.451 len=6
> [pixma]  00000000:06 06 00 00 00 00
> [pixma]
> [sanei_usb] sanei_usb_read_int: trying to read 16 bytes
> [sanei_usb] sanei_usb_read_int: read failed: Resource temporarily
> unavailable
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 D4 20 00 00 00 00 00 C0 04 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=17.556 len=10
> [pixma]  00000000:d4 20 00 00 00 00 00 c0  04 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 512 bytes
> [sanei_usb] 000 06 06 00 00 00 00                               ......
> [sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes
> [pixma] IN   T=17.559 len=6
> [pixma]  00000000:06 06 00 00 00 00
> [pixma]
> [sanei_usb] sanei_usb_read_int: trying to read 16 bytes
> [sanei_usb] sanei_usb_read_int: read failed: Resource temporarily
> unavailable
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 D4 20 00 00 00 00 00 C0 04 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=17.663 len=10
> [pixma]  00000000:d4 20 00 00 00 00 00 c0  04 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 512 bytes
> [sanei_usb] 000 06 06 00 00 00 00                               ......
> [sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 6 bytes
> [pixma] IN   T=17.666 len=6
> [pixma]  00000000:06 06 00 00 00 00
>


Regarding the ECANCELED error code on completion, this is the end of a
successful scan. The image data is fine but the driver sends an
abort_session command on completion

[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 D4 20 00 00 00 00 00 C0 04 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=3.310 len=10
> [pixma]  00000000:d4 20 00 00 00 00 00 c0  04 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 512 bytes
> [sanei_usb] 000 06 06 20 00 37 50 55 55 56 55 56 55 58 55 57 56 ..
> .7PUUVUVUXUWV
> [sanei_usb] 010 55 56 57 55 54 56 56 58 53 57 5A 58 A7 B6 B8 B9
> UVWUTVVXSWZX....
>


> [sanei_usb] sanei_usb_read_bulk: wanted 512 bytes, got 512 bytes
> [pixma] IN   T=3.315 len=512
> [pixma]  00000000:06 06 20 00 37 50 55 55  56 55 56 55 58 55 57 56
> [pixma]  00000010:55 56 57 55 54 56 56 58  53 57 5a 58 a7 b6 b8 b9


[sanei_usb] sanei_usb_read_bulk: trying to read 48646 bytes
>

[sanei_usb] 353031 2F 34 2C 2A 3D 25 30 37 3E 30 43 2A 32 3B 37
> 1/4,*=%07>0C*2;7
> [sanei_usb] 35402B 47 37 44 4A 3A 41 5E 80 63 51 51 50 53 51 53
> +G7DJ:A^.cQQPSQS
> [sanei_usb] 355051 52 52 51 50 FF                               QRRQP.
> [sanei_usb] sanei_usb_read_bulk: wanted 48646 bytes, got 13654 bytes
> [pixma] IN   T=3.389 len=13654


[pixma]  00003530:31 2f 34 2c 2a 3d 25 30  37 3e 30 43 2a 32 3b 37
> [pixma]  00003540:2b 47 37 44 4a 3a 41 5e  80 63 51 51 50 53 51 53
> [pixma]  00003550:51 52 52 51 50 ff
> [pixma]
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 EF 20 00 00 00 00 00 00 00 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=3.441 len=10
> [pixma]  00000000:ef 20 00 00 00 00 00 00  00 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
> [sanei_usb] 000 06 06                                           ..
> [sanei_usb] sanei_usb_read_bulk: wanted 2 bytes, got 2 bytes
> [pixma] IN   T=3.444 len=2
> [pixma]  00000000:06 06
> [pixma]
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 F3 20 00 00 00 00 00 00 0C 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=3.444 len=10
> [pixma]  00000000:f3 20 00 00 00 00 00 00  0c 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 14 bytes
> [sanei_usb] 000 06 06 03 01 00 02 03 00 02 00 00 00 00 F5
> ..............
> [sanei_usb] sanei_usb_read_bulk: wanted 14 bytes, got 14 bytes
> [pixma] IN   T=3.449 len=14
> [pixma]  00000000:06 06 03 01 00 02 03 00  02 00 00 00 00 f5
> [pixma]
> [pixma] Current status: paper=1 cal=0 lamp=0
> [sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
> [sanei_usb] 000 F3 20 00 00 00 00 00 00 0C 00                   . ........
> [sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
> [pixma] OUT  T=3.452 len=10
> [pixma]  00000000:f3 20 00 00 00 00 00 00  0c 00
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 14 bytes
> [sanei_usb] 000 06 06 03 01 00 02 03 00 02 00 00 00 00 F5
> ..............
> [sanei_usb] sanei_usb_read_bulk: wanted 14 bytes, got 14 bytes
> [pixma] IN   T=3.452 len=14
> [pixma]  00000000:06 06 03 01 00 02 03 00  02 00 00 00 00 f5
> [pixma]
> [pixma] Current status: paper=1 cal=0 lamp=0
> [sanei_usb] sanei_usb_write_bulk: trying to write 20 bytes
> [sanei_usb] 000 CF 60 00 00 00 00 00 00 0A 00 01 00 00 00 00 00
> .`..............
> [sanei_usb] 010 00 00 00 FF                                     ....
> [sanei_usb] sanei_usb_write_bulk: wanted 20 bytes, wrote 20 bytes
> [pixma] OUT  T=3.455 len=20
> [pixma]  00000000:cf 60 00 00 00 00 00 00  0a 00 01 00 00 00 00 00
> [pixma]  00000010:00 00 00 ff
> [pixma]
> [sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
> [sanei_usb] 000 06 06                                           ..
> [sanei_usb] sanei_usb_read_bulk: wanted 2 bytes, got 2 bytes
> [pixma] IN   T=3.459 len=2
> [pixma]  00000000:06 06
> [pixma]
> [pixma] pixma_read_image():cancelled by software
> [pixma] Reader task terminated: ECANCELED
> [pixma] pixma_close(): Canon MultiPASS MP730
> [sanei_usb] sanei_usb_close: closing device 0
>

I have managed to get some success by adding a small sleep to pixma.c but
I'm still testing that.

Cheers,
Wade.

Moving from the "MP730 driver broken since pixma-0.12.2" thread...

Nicolas Martin wrote:
Concerning points 1 and 2 you raise, this is interesting:

The pixma_mp730.c file has been left almost untouched for a while (no
requests or testing ability so far), so it may be in a less "enhanced"
state than other ones covering more recent Pixma models, that have been
recently updated.
Dennis Lou wrote a while back the pixma_imageclass.c file, based on the
pixma_mp730.c file, and which covers several Canon ImageClass models in
the pixma backend. The code has been nicely brushed up, and is now in a
better shape than mp730's one.
So for the 2 issues you raise, I'll take a look and compare the
pixma_mp730.c code with pixma_imageclass.c and pixma_mp150.c , probably
will help a lot to solve those issues, thanks to your cooperation for
testing and feedback.

Nicolas


Le vendredi 24 avril 2009 à 01:19 +1000, Wade Fitzpatrick a écrit :
> The only problems I can find now are:
>      1. Scanning at 1200dpi Grayscale. Sometimes it hangs depending on
>         the x and y values - the larger the values, the sooner it
>         fails. If it does succeed, the data is always bogus.
>      2. The return code after a successful scan is always ECANCELED
>         which causes a problem for batch mode as it will only scan one
>         page. It doesn't seem to matter for single scans.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090425/71cb732a/attachment-0001.htm>


More information about the sane-devel mailing list