[sane-devel] MP730 driver broken since pixma-0.12.2

Nicolas Martin nicolas.martin at freesurf.fr
Thu Mar 19 20:51:41 UTC 2009


Hi Wade, 

Well, I've done some work on the pixma backend those last months,
currently all latest work is now incorporated into the Sane CVS version,
the standalone driver (the one you are using), is not maintained
anymore, only CVS one is maintained for easiness.
The biggest difference between standalone and CVS pixma drivers is the
usb part. Standalone uses its own usb code, whereas CVS uses the
standard libusb, much more robust to my opinion.

I took a look at the information you sent:

- patch between 0.12.1 and 0.12.2 
It does only concern button scan code, so this is a bit weird if it
affects normal scan. But this may be a place to dig.

- scanimage fail: 
I don't have the complete log, but as far as I can see, the fail looks
to appear after the send date request, not implemented in those old
versions of the backend (pixma scanners request the date and time). 
I've implemented a while back this date/time message for MP710 (which
shares the same code as MP730), so it is now present in Sane CVS code.

To dig further for MP730, my advice would be:

- Install Sane CVS 
- Get a trace log as you did, zip it and send it back:

SANE_DEBUG_PIXMA=11 scanimage -d pixma:04A9262F_00000000F972 -T
2> /tmp/logfile


Nicolas

Le vendredi 20 mars 2009 à 06:17 +1100, Wade Fitzpatrick a écrit :
> Hi all
> 
> I spent some time in 2006 working with Wittawat Yamwong to get the
> Canon MultiPASS MP730 (US branding) or Canon imageCLASS MP730
> (Asia-Pacific branding) supported in the pixma driver. Sadly, I had to
> move house at the time, the project also moved to a new mailing list
> and then life got in the way and I never had time to get back onto it
> until now.
> 
> The driver worked for about 90% of functionality up until pixma-0.12.1
> but something broke in 0.12.2. I managed to track it down to this
> diff:
> 
> --- pixma_mp730.c.orig  2006-08-27 07:37:16.000000000 +1000
> +++ pixma_mp730.c       2009-03-20 03:28:16.000000000 +1100
> @@ -533,7 +533,7 @@
>         &pixma_mp730_ops,  /* ops */            \
>         dpi, dpi,          /* xdpi, ydpi */     \
>         w, h,              /* width, height */  \
> -        PIXMA_CAP_GRAY|PIXMA_CAP_EVENTS|cap                      \
> +        PIXMA_CAP_GRAY|/*PIXMA_CAP_EVENTS|*/cap
> \
>  }
>  const pixma_config_t pixma_mp730_devices[] = {
>  /* TODO: check area limits */
> 
> 
> Applying the same patch to pixma-0.13.1 also makes it work using the
> pixma test utility 'scan', but not when using the sane backend as a
> library. The error message is coming out of pixma_io_sanei.c:330 which
> only gets rolled into the libsane-pixma.so.1.0.19 library. I have
> tried using gdb to set a breakpoint and get a backtrace but gdb makes
> baby jesus cry.
> 
> Can anyone help by explaining how to debug a shared lib and/or tell me
> why the pixma_write() function gets a count of 0?
> 
> Thanks,
> Wade.
> 
> 
> helot mp150-0.12.1 # ./scan -d 100 -r 150 -m color -x 0 -y 0 -w 10 -h
> 20 -W -F experiment /tmp/foo.pnm
> [pixma-0.12.1] Scanning devices
> under /dev/bus/usb                                                    
> Connected
> scanner(s):                                                                                 
> 1: Canon MultiPASS MP730
> (SN:04A9262F_00000000F972)                                                   
> [pixma-0.12.1] pixma_open(): Canon MultiPASS
> MP730                                                    
> [pixma-0.12.1] Set interface
> 1,0                                                                      
> [pixma-0.12.1] Found endpoints: 3 (OUT), 84 (IN), 85
> (INTR,64)                                        
> Scan mode:
> color                                                                                      
> DPI:
> 150x150                                                                                    
> Offset:    (0,0) = (0.00cm,
> 0.00cm)                                                                   
> Dimension: 59x118 = 1.00cm x
> 2.00cm                                                                   
> Size:      21 kiB (uncompressed,
> raw)                                                                 
> Source:
> Flatbed                                                                                    
> Scanning...                                                                                           
> [pixma-0.12.1]                                                                                        
> [pixma-0.12.1] pixma_scan():
> start                                                                    
> [pixma-0.12.1]   line_size=180 image_size=21240 channels=3
> depth=8                                    
> [pixma-0.12.1]   dpi=150x150 offset=(0,0)
> dimension=59x118                                            
> [pixma-0.12.1]   gamma_table=0x60d318
> source=0                                                        
> [pixma-0.12.1] raw_width =
> 60                                                                         
> [pixma-0.12.1] OUT  T=0.266
> len=10                                                                    
> [pixma-0.12.1]  00000000:f3 20 00 00 00 00 00 00  0c
> 00                                               
> [pixma-0.12.1]                                                                                        
> [pixma-0.12.1] IN   T=0.269
> len=14                                                                    
> [pixma-0.12.1]  00000000:06 06 03 01 00 02 03 00  02 00 00 00 00
> f5                                   
> [pixma-0.12.1]                                                                                        
> [pixma-0.12.1] Current status: paper=1 cal=0
> lamp=0                                                   
> [pixma-0.12.1] OUT  T=0.270
> len=20                                                                    
> [pixma-0.12.1]  00000000:cf 60 00 00 00 00 00 00  0a 00 01 00 00 00 00
> 00                             
> [pixma-0.12.1]  00000010:00 00 00
> ff                                                                  
> [----------snipped-------------]
> [pixma-0.12.1] Current status: paper=1 cal=0
> lamp=0                                                   
> [pixma-0.12.1] OUT  T=2.337
> len=20                                                                    
> [pixma-0.12.1]  00000000:cf 60 00 00 00 00 00 00  0a 00 01 00 00 00 00
> 00                             
> [pixma-0.12.1]  00000010:00 00 00
> ff                                                                  
> [pixma-0.12.1]                                                                                        
> [pixma-0.12.1] IN   T=2.341
> len=2                                                                     
> [pixma-0.12.1]  00000000:06
> 06                                                                        
> [pixma-0.12.1]                                                                                        
> [pixma-0.12.1]
> pixma_read_image():completed                                                           
> 100% done (21240 bytes
> written)                                                                       
> [pixma-0.12.1] pixma_close(): Canon MultiPASS
> MP730                                                   
> 
> 
> helot mp150-0.12.2 # ./scan -d 100 -r 150 -m color -x 0 -y 0 -w 10 -h
> 20 -W -F experiment /tmp/foo.pnm
> [pixma-0.12.2] Scanning devices under /dev/bus/usb
> Connected scanner(s):
> 1: Canon MultiPASS MP730 (SN:04A9262F_00000000F972)
> [pixma-0.12.2] pixma_open(): Canon MultiPASS MP730
> [pixma-0.12.2] Set interface 1,0
> [pixma-0.12.2] Found endpoints: 3 (OUT), 84 (IN), 85 (INTR,64)
> 
> ########## Page 1 ###########
> Scan mode: color
> DPI:       150x150
> Offset:    (0,0) = (0.00cm, 0.00cm)
> Dimension: 59x118 = 1.00cm x 2.00cm
> Size:      21 kiB (uncompressed, raw)
> Source:    Flatbed
> Press scan button to begin or Ctrl-C when finished!
> [pixma-0.12.2] INTR T=0.336 len=8
> [pixma-0.12.2]  00000000:00 00 00 00 00 08 00 00
> [pixma-0.12.2]
> [pixma-0.12.2] send_time() is not yet implemented.
> [pixma-0.12.2] INTR T=9.332 len=8
> [pixma-0.12.2]  00000000:00 00 00 00 00 08 00 00
> [pixma-0.12.2]
> [pixma-0.12.2] send_time() is not yet implemented.
> [pixma-0.12.2] pixma_close(): Canon MultiPASS MP730
> 
> 
> helot testsuite # PIXMA_EXPERIMENT=1 SANE_DEBUG_PIXMA=10 scanimage -d
> pixma:04A9262F_00000000F972 --resolution 150 --mode Color --format pnm
> -x 10 -y 20 > /tmp/foo.pnm
> [sanei_debug] Setting debug level of pixma to 10.
> [pixma] pixma version 0.13.1
> [pixma] pixma_collect_devices() found Canon MultiPASS MP730 at
> libusb:002:004
> [pixma] pixma_open(): Canon MultiPASS MP730
> [pixma] Trying to clear the interrupt buffer...
> [pixma]   no packets in buffer
> [pixma] Reader task id=3979 (forked)
> [pixma] Reader task started
> [pixma]
> [pixma] pixma_scan(): start
> [pixma]   line_size=180 image_size=21240 channels=3 depth=8
> [pixma]   dpi=150x150 offset=(0,0) dimension=59x118
> [pixma]   gamma_table=0x61b3d0 source=0
> [pixma] INTR T=0.286 len=8
> [pixma]  00000000:00 00 00 00 00 08 00 00
> [pixma]
> [pixma] send_time() is not yet implemented.
> [pixma] raw_width = 60
> [pixma] WARNING:pixma_write(): count(0) != len(10)
> [pixma] OUT  T=0.307 len=-1
> [pixma]  00000000:f3 20 00 00 00 00 00 00  0c 00
> [pixma]   ERROR: EIO
> [pixma]
> [pixma] pixma_scan() failed EIO
> [pixma] Reader task terminated: EIO
> [pixma] read_image():reader task closed the pipe:0 bytes received,
> 21240 bytes expected
> scanimage: sane_read: Error during device I/O
> [pixma] pixma_close(): Canon MultiPASS MP730
> 
> -- 
> 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





More information about the sane-devel mailing list