[sane-devel] Pixma MP600R times out after scan stats

Nicolas Martin nicolas0martin at gmail.com
Sat May 9 09:36:13 UTC 2009


Hi Phil, 

Good news, so will git-commit this small update for MP600* 

The scan width adjustment you mention is due to a limitation for all
Pixma devices. 
 
In fact, the scan horizontal coordinate and scan width needs to be
rounded, to 32 for generation 2 and 3 devices (like MP600). Used to be
rounded to 12 on older generation 1 Pixma.

So the backend lowers the left horizontal coordinate and extends the
scan width to a multiple of 32, while maintaining the desired scan area
inside the new widened scan area.

This is why the scan area gets horizontally extended, the effect of this
adjustment is more visible at low dpi (can go up to 1 cm at 75 dpi!)
than at high dpi (at 2400 dpi, up to 0.4 mm)

Canon's Windows driver for MP610 clearly shows the same effect when
setting up the scan area (the scan area jumps to some fixed coordinates
when you draw it on the preview window), but Xsane's preview window does
not take this information when showing up the scan area (although this
adjusted scan area is then used when Xsane scans).

As you suggest, I copy the Sane-dev list for information. 

Nicolas

samedi 09 mai 2009 à 10:21 +0200, nicolas.martin at freesurf.fr a écrit :
> Hi Nicolas,
> 
> The changes you made have solved the problem with the 2400 dpi scan.
> I also checked all other resolutions again and they are ok.
> I say ok and not perfect because I discovered a slight issue.
> Depending on the chosen resolution, the scanned zone is slightly different,
> not much, but sometimes, the zone shifts to the left or right by a few
> millimetres.
> 
> Attached are 2 samples. One at 150 dpi and one at 300. You can see a small
> hear
> on the 150 dpi file, but it's out of the scanned zone on the 300.
> Looking at the size of both images, the width of the 300 dpi file isn't
> the double
> of the other one whereas the height is...
> 
> This might not be a sane related issue, but was wondering what you thought.
> 
> Thanks anyway for solving the 2400 dpi issue.
> 
> Do you want to send a reply to the group to state the problem is solved ?
> 
> Phil
> 
> Le vendredi 08 mai 2009 à 12:29 +0200, Nicolas Martin a écrit :
> Hi Phil, 
> 
> Could you do a test with the file pixma_mp150.c attached, simply place
> it in the sane-backends tree in subdir backend (this will replace
> current one). Recompile/reinstall, and retest.
> 
> Nicolas
> 
> Le jeudi 07 mai 2009 à 23:16 +0200, Phil Wooding a écrit :
> > Hi Nicolas,
> > 
> > Attached is a archive that contains 2 files.
> > A first scan at 75 dpi (test1.gif) and a second scan at 2400 dpi
> > (test2.gif).
> > 
> > Let me know if you need anything else.
> > 
> > Thanks,
> > 
> > Phil
> > 
> > > Subject: RE: [sane-devel] Pixma MP600R times out after scan stats
> > > From: nicolas.martin at freesurf.fr
> > > To: pwdng at hotmail.com
> > > CC: sane-devel at lists.alioth.debian.org
> > > Date: Thu, 7 May 2009 21:17:12 +0200
> > > 
> > > Phil, 
> > > 
> > > This behavior when scanning at high dpi is a classic of many Pixma
> > > devices, but there are some slight differences between models. 
> > > 
> > > This is probably easy to fix, as code for this purpose is already
> > > present in the backend for other Pixma devices, but before, could
> > you
> > > send a small sample image (send directly the image, not the logs) to
> > see
> > > exactly how it needs to be tuned up.
> > > 
> > > Nicolas 
> > > 
> > > Le mercredi 06 mai 2009 à 23:49 +0200, Phil Wooding a écrit :
> > > > Hi again,
> > > > 
> > > > The 2400 dpi scan completes ok, but the result is the original
> > image
> > > > duplicated and stretched.
> > > > You basically have 2 images side by side.
> > > > So the vertical resolution is ok, but the horizontal isn't as
> > there
> > > > are 2 copies of the original image.
> > > > I will try to send out the logs of a test image, but I first need
> > to
> > > > get connected using USB again. 
> > > > Requires a but of time, but will try to do tomorrow.
> > > > 
> > > > Thanks,
> > > > 
> > > > Phil
> > > > 
> > > > > Subject: RE: [sane-devel] Pixma MP600R times out after scan
> > stats
> > > > > From: nicolas.martin at freesurf.fr
> > > > > To: pwdng at hotmail.com
> > > > > CC: sane-devel at lists.alioth.debian.org
> > > > > Date: Sat, 2 May 2009 14:06:10 +0200
> > > > > 
> > > > > And BTW, you say that 2400 dpi does not work. 
> > > > > 
> > > > > What do you get exactly ? 
> > > > > Does the scanner scan something ? 
> > > > > Is the image wrong ?
> > > > > Can you send a sample scan at 2400 dpi:
> > > > > - the log trace using the same command I gave in my previous
> > mail,
> > > > scan
> > > > > only a **small** image to keep the log small
> > > > > - the image (if any) you get 
> > > > > 
> > > > > Let's see then if we can do something to fix this.
> > > > > 
> > > > > Nicolas
> > > > > 
> > > > > Le jeudi 30 avril 2009 à 23:46 +0200, Phil Wooding a écrit :
> > > > > > Hi Nicolas,
> > > > > > 
> > > > > > Thank you for your reply. Its most appreciated.
> > > > > > Yes, I can successfully scan with a USB cable.
> > > > > > As mentioned in the compatibility list, all resolutions work
> > > > except
> > > > > > 2400 dpi.
> > > > > > However, over the network, it always times out...
> > > > > > Including command scanimage -T which outputs:
> > > > > > 
> > > > > > scanimage: scanning image of size 640x877 pixels at 24
> > bits/pixel
> > > > > > scanimage: acquiring RGB frame, 8 bits/sample
> > > > > > scanimage: reading one scanline, 1920 bytes... [pixma]
> > > > > > bjnp_recv_header: (recv) could not read response header,
> > received
> > > > 0
> > > > > > bytes!
> > > > > > [pixma] bjnp_recv_header: (recv) error: Success!
> > > > > > [pixma] Could not read response to command!
> > > > > > [pixma] bjnp_recv_header: (recv) could not read response
> > header,
> > > > > > received 0 bytes!
> > > > > > [pixma] bjnp_recv_header: (recv) error: Success!
> > > > > > [pixma] Could not read response to command!
> > > > > > FAIL Error: Error during device I/O
> > > > > > 
> > > > > > Do you have any ideas of something I can try?
> > > > > > 
> > > > > > PS : I won't be able to reply immediately.
> > > > > > 
> > > > > > Thanks,
> > > > > > 
> > > > > > Phil
> > > > > > 
> > > > > > > Subject: Re: [sane-devel] Pixma MP600R times out after scan
> > > > stats
> > > > > > > Date: Sat, 25 Apr 2009 10:46:39 +0200
> > > > > > > 
> > > > > > > In order to facilitate investigations on this: do you
> > > > successfully
> > > > > > scan
> > > > > > > with an usb cable ?
> > > > > > > 
> > > > > > > Nicolas
> > > > > > > 
> > > > > > > Le vendredi 24 avril 2009 à 23:30 +0200, Phil Wooding a
> > écrit :
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > I am trying to get the latest svn code working with a
> > MP600R.
> > > > > > > > The scanner is properly detected, it starts scanning, but
> > then
> > > > > > > > nothing...
> > > > > > > > Any help would be apreciated as it should work according
> > to
> > > > the
> > > > > > > > documentation.
> > > > > > > > 
> > > > > > > > Thanks,
> > > > > > > > 
> > > > > > > > Phil
> > > > > > > > 
> > > > > > > > Here are the logs with maximum debug information:
> > > > > > > > 
> > > > > > > > [pixma] bjnp_set_timeout(requested 10000, set 20000):
> > > > > > > > [pixma] bjnp_read_bulk(0, bufferptr, 0x8 = -1075284088)
> > > > > > > > [pixma] bjnp_read_bulk: 0x0 = 0 bytes available at start,
> > > > Short
> > > > > > block
> > > > > > > > = 0 blocksize = 0x400 = 1024
> > > > > > > > [pixma] So far received 0x0 bytes = 0, need 0x8 = 8
> > > > > > > > [pixma] No (more) scanner data available, requesting more
> > > > > > > > [pixma] bjnp_send_read_req sending command
> > > > > > > > [pixma] 00000000:42 4a 4e 50 02 20 00 00 00 0b 00 09 00 00
> > 00
> > > > 00 
> > > > > > > > [pixma] bjnp_recv_header: receiving response header
> > > > > > > > [pixma] TCP response header(scanner data = 8 bytes):
> > > > > > > > [pixma] 00000000:42 4a 4e 50 82 20 00 00 00 0b 00 09 00 00
> > 00
> > > > 08 
> > > > > > > > [pixma] Scanner reports 0x8 = 8 bytes available
> > > > > > > > [pixma] reading 0x8 = 8 (of max 0x8 = 8) bytes more
> > > > > > > > [pixma] bjnp_recv_data: receiving response data
> > > > > > > > [pixma] bjnp_recv_data: read response payload (8 bytes
> > max)
> > > > > > > > [pixma] Received TCP response payload (8 bytes):
> > > > > > > > [pixma] 00000000:06 06 00 00 00 00 00 00 
> > > > > > > > [pixma] IN T=6.235 len=8
> > > > > > > > [pixma] 00000000:06 06 00 00 00 00 00 00 
> > > > > > > > [pixma]
> > > > > > > > [pixma] bjnp_set_timeout(requested 10000, set 20000):
> > > > > > > > [pixma] bjnp_write_bulk(0, bufferptr, 0x40 = 64)
> > > > > > > > [pixma] bjnp_write: sending 0x40 = 64 bytes
> > > > > > > > [pixma] 00000000:42 4a 4e 50 02 21 00 00 00 0c 00 09 00 00
> > 00
> > > > 40 
> > > > > > > > [pixma] 00000010:de 20 00 00 00 00 00 00 00 00 00 00 00 00
> > 00
> > > > 30 
> > > > > > > > [pixma] 00000020:00 00 00 00 80 4b 80 4b 00 00 00 00 00 00
> > 00
> > > > 00 
> > > > > > > > [pixma] 00000030:00 00 02 80 00 00 03 6d 08 18 00 00 00 00
> > 00
> > > > 00 
> > > > > > > > [pixma] 00000040:ff 00 00 81 00 00 02 01 00 00 00 00 00 00
> > 00
> > > > d5 
> > > > > > > > [pixma] bjnp_recv_header: receiving response header
> > > > > > > > [pixma] TCP response header(scanner data = 4 bytes):
> > > > > > > > [pixma] 00000000:42 4a 4e 50 82 21 00 00 00 0c 00 09 00 00
> > 00
> > > > 04 
> > > > > > > > [pixma] bjnp_recv_data: receiving response data
> > > > > > > > [pixma] bjnp_recv_data: read response payload (4 bytes
> > max)
> > > > > > > > [pixma] Received TCP response payload (4 bytes):
> > > > > > > > [pixma] 00000000:00 00 00 40 
> > > > > > > > [pixma] OUT T=6.240 len=64
> > > > > > > > [pixma] 00000000:de 20 00 00 00 00 00 00 00 00 00 00 00 00
> > 00
> > > > 30 
> > > > > > > > [pixma] 00000010:00 00 00 00 80 4b 80 4b 00 00 00 00 00 00
> > 00
> > > > 00 
> > > > > > > > [pixma] 00000020:00 00 02 80 00 00 03 6d 08 18 00 00 00 00
> > 00
> > > > 00 
> > > > > > > > [pixma] 00000030:ff 00 00 81 00 00 02 01 00 00 00 00 00 00
> > 00
> > > > d5 
> > > > > > > > [pixma] 
> > > > > > > > [pixma] bjnp_set_timeout(requested 10000, set 20000):
> > > > > > > > [pixma] bjnp_read_bulk(0, bufferptr, 0x8 = -1075284088)
> > > > > > > > [pixma] bjnp_read_bulk: 0x0 = 0 bytes available at start,
> > > > Short
> > > > > > block
> > > > > > > > = 0 blocksize = 0x400 = 1024
> > > > > > > > [pixma] So far received 0x0 bytes = 0, need 0x8 = 8
> > > > > > > > [pixma] No (more) scanner data available, requesting more
> > > > > > > > [pixma] bjnp_send_read_req sending command
> > > > > > > > [pixma] 00000000:42 4a 4e 50 02 20 00 00 00 0d 00 09 00 00
> > 00
> > > > 00 
> > > > > > > > [pixma] bjnp_recv_header: receiving response header
> > > > > > > > [pixma] bjnp_recv_header: could not read response header
> > > > (select
> > > > > > timed
> > > > > > > > out): Success!
> > > > > > > > [pixma] IN T=26.257 len=-9
> > > > > > > > [pixma] ERROR: ETIMEDOUT
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ______________________________________________________________________
> > > > > > > > What can you do with the new Windows Live? Find out
> > > > > > > > --
> > > > > > > > sane-devel mailing list:
> > sane-devel at lists.alioth.debian.org
> > > > > > > > http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> > > > > > > > Unsubscribe: Send mail with subject "unsubscribe
> > > > your_password"
> > > > > > > > to sane-devel-request at lists.alioth.debian.org
> > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ______________________________________________________________________
> > > > > > What can you do with the new Windows Live? Find out
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > >
> > ______________________________________________________________________
> > > > Windows Live™: Keep your life in sync. Check it out!
> > > 
> > > 
> > 
> > 
> > ______________________________________________________________________
> > See all the ways you can stay connected to friends and family




More information about the sane-devel mailing list