[sane-devel] PIXMA: MX360 at 2400 x 1200 dpi

ibu ☉ radempa ䷰ ibu at radempa.de
Sat Feb 18 11:40:26 UTC 2012

Thanks again!

Dated 2012-02-13 18:08, Rolf Bensch <rolf at bensch-online.de> said:
> Am 10.02.2012 13:42, schrieb ibu ☉ radempa ䷰:
>> Thanks. When I disable pixel_reordering analogously to MP220, then up to
>> 1200 dpi gray and color scans are ok. At 2400 dpi however nothing is
>> scanned and I get
>> [pixma] read_image():reader task closed the pipe:0 bytes received,
>> 143238656 bytes expected
>> which comes from pixma.c; more specifically, this line produces count=0:
>> count = read (ss->rpipe, buf, size);
>> read_image() is called from sane_read(), which provides ss ("sane
>> status", I guess) and itself gets it from a SANE_Handle which comes from
>> the frontend, AFAIS. I don't understand enough of the internals of sane
>> to know where to start debugging. - Hints are welcome.
> You need to investigate 2 things:
> (1) 1200 x 1200 dpi:
> (a) Does the scaned image contain all expected pixels (w x h)?

Yes, the image size is correct.

> (b) Please check the pnm image for mixed columns. It seems that two half
> pictures are bitwise mixed. The result is a streched image with a shadow
> of the 2nd half picture.  It's easy to solve this line by line with a
> (new) reorder_pixels function. You can have a look to similar functions
> in the pixma_mp810.c file.

With the attached patch (just disabling pixel reordering, as for MP220)
everything ist fine, please commit it.

(To exclude yet another pixel reordering mistake I tried to swap even
and odd pixels (

memcpy (linebuf + c * (1 - (i % 2) + (i / 2) * 2), sptr + c * i, c);

) and got parity_inverted.pnm while without reordering I got
correct_order.pnm .)

> (2) 2400 x 1200 dpi:
> Here we should take care that the scanner gets the correct formatted
> scan command.
> Can you sniff the usb protocols on a windows machine and compare it with
> one from a linux machine? Both for 2400 x 1200 dpi. The positions of the
> parameters can be read from the send_scan_param function. You can use
> e.g. wireshark for sniffing. The scan command starts with "d8 20 00 00
> 00 00 00 00 00 00 00 00 00 00 00 38".

Luckily I don't have windows, so I tried Canon's scangearmp 1.70-1
package for debian and found that it also allows only up to 1200 dpi. I
suggest to leave 1200 dpi as maximum resolution. (For completeness I
attach some hexdumps of the respective usb request blocks.)

In the list of working devices on the website I'd suggest to add a
comment for Canon MX360: ADF working partially.

Yours, ibu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: canon_mx360.patch
Type: text/x-diff
Size: 587 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120218/51c14b7f/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: correct_order.pnm
Type: image/x-portable-anymap
Size: 12842 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120218/51c14b7f/attachment-0002.pnm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parity_inverted.pnm
Type: image/x-portable-anymap
Size: 16272 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120218/51c14b7f/attachment-0003.pnm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: usb.txt
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120218/51c14b7f/attachment-0001.txt>

More information about the sane-devel mailing list