[sane-devel] Canon MF4140
Nicolas
nicolas.martin at freesurf.fr
Mon Sep 1 19:52:52 UTC 2008
This is a surrealistic!
Could you load again the file pixma_mp730.c from CVS, and inside, just
change one of the PIDs declared at the beginning, by MF4150 one's :
Original pixma_mp730.c:
#define IMAGE_BLOCK_SIZE (0xc000)
#define CMDBUF_SIZE 512
#define MP360_PID 0x263c
#define MP370_PID 0x263d
#define MP390_PID 0x263e
#define MP700_PID 0x2630
#define MP740_PID 0x264c /* Untested */
#define MP710_PID 0x264d
#define MP730_PID 0x262f
Just change the line for MP700:
#define IMAGE_BLOCK_SIZE (0xc000)
#define CMDBUF_SIZE 512
#define MP360_PID 0x263c
#define MP370_PID 0x263d
#define MP390_PID 0x263e
#define MP700_PID 0x26a3
#define MP740_PID 0x264c /* Untested */
#define MP710_PID 0x264d
#define MP730_PID 0x262f
Then, before running your scanimage -L , activate a full usb trace log:
$ export SANE_DEBUG_SANEI_USB=255
$ export SANE_DEBUG=255
$ export SANE_DEBUG_PIXMA=20
$ scanimage -L
You should get a very "verbose" trace.
Nicolas
Le lundi 01 septembre 2008 à 11:28 -0500, Bob Dronski a écrit :
> Nicolas,
>
>
>
> I really don't understand what may be happening. Here are the
> appropriate sections in the 2 files with my changes:
> ---------------------------------------
>
>
> pixma_imageclass.c:
> #define IMAGE_BLOCK_SIZE (0xffff)
> #define MAX_CHUNK_SIZE (0x1000)
> #define MIN_CHUNK_SIZE (0x0200)
> #define CMDBUF_SIZE 512
>
>
> #define MF4200_PID 0x26b5
> /* the following are all untested */
> #define MF5630_PID 0x264e
> #define MF5650_PID 0x264f
> #define MF8100_PID 0x2659
> #define MF5730_PID 0x265d
> #define MF5750_PID 0x265e
> #define MF5770_PID 0x265f
> #define MF3110_PID 0x2660
> #define MF3200_PID 0x2684
> #define MF6500_PID 0x2686
> //#define MF4100_PID 0x26a3
> #define MF4600_PID 0x26b0
> #define MF4010_PID 0x26b4
>
>
> enum iclass_state_t
>
>
>
>
> AND
>
>
> const pixma_config_t pixma_iclass_devices[] = {
> DEV ("Canon imageCLASS MF4270", MF4200_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> /* FIXME: the following capabilities all need updating/verifying */
> DEV ("Canon imageCLASS MF5630", MF5630_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon laserBase MF5650", MF5650_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF8170c", MF8100_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF5730", MF5730_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF5750", MF5750_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF5770", MF5770_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF3110", MF3110_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF3240", MF3200_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon MF6500 Series", MF6500_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> // DEV ("Canon imageCLASS MF4150", MF4100_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF4690", MF4600_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV ("Canon imageCLASS MF4010", MF4010_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
> DEV (NULL, 0, 0, 0, 0, 0)
> };
>
>
> -----------------
> pixma_mp730.c:
>
>
> #define IMAGE_BLOCK_SIZE (0xc000)
> #define CMDBUF_SIZE 512
>
>
> #define MP360_PID 0x263c
> #define MP370_PID 0x263d
> #define MP390_PID 0x263e
> #define MP700_PID 0x2630
> #define MP730_PID 0x262f
> #define MF4100_PID 0x26a3
>
>
>
>
> enum mp730_state_t
> {
>
>
>
>
>
> AND
>
>
>
>
> const pixma_config_t pixma_mp730_devices[] = {
> /* TODO: check area limits */
> DEVICE ("Canon SmartBase MP360", MP360_PID, 1200, 636, 868, 0),
> DEVICE ("Canon SmartBase MP370", MP370_PID, 1200, 636, 868, 0),
> DEVICE ("Canon SmartBase MP390", MP390_PID, 1200, 636, 868, 0),
> DEVICE ("Canon MultiPASS MP700", MP700_PID, 1200, 638, 877 /*1035
> */ , 0),
> DEVICE ("Canon MultiPASS MP730", MP730_PID, 1200, 637, 868,
> PIXMA_CAP_ADF),
> DEVICE ("Canon imageCLASS MF4150", MF4100_PID, 600, 640, 877,
> PIXMA_CAP_ADF),
>
>
> DEVICE (NULL, 0, 0, 0, 0, 0)
> };
>
>
> -----------------
> When I implement those changes, here are the results:
>
>
>
>
> Monster:sane bob$ scanimage -T -vv
> [sanei_debug] Setting debug level of pixma to 20.
> [pixma] pixma version 0.14.5
> [pixma] pixma_find_scanners() found 0 devices
> scanimage: no SANE devices found
> Calling sane_exit
> scanimage: finished
> Monster:sane bob$
>
>
>
>
> Here is the debug output on the unmodified code:
>
>
> Monster:sane bob$ scanimage -T -vv
> [sanei_debug] Setting debug level of pixma to 20.
> [pixma] pixma version 0.14.5
> [pixma] pixma_collect_devices() found Canon imageCLASS MF4150 at
> libusb:003:004-04a9-26a3-00-00
> [pixma] pixma_find_scanners() found 1 devices
> [pixma] pixma_collect_devices() found Canon imageCLASS MF4150 at
> libusb:003:004-04a9-26a3-00-00
> [pixma] pixma_open(): Canon imageCLASS MF4150
> [pixma] Trying to clear the interrupt buffer...
>
>
> and it hangs....
>
>
> Wandering into dangerous territory, since I know nothing about the
> code, I commented out the code to clear the buffer:
> PDBG (pixma_dbg (3, " Trying to clear the interrupt buffer...\n"));
> /* if (handle_interrupt (s, 200) == 0)
> {
> PDBG (pixma_dbg (3, " no packets in buffer\n"));
> }*/
> return 0;
> }
>
>
> And got this result:
>
>
> Monster:sane bob$ scanimage -T -vv
> [sanei_debug] Setting debug level of pixma to 20.
> [pixma] pixma version 0.14.5
> [pixma] pixma_collect_devices() found Canon imageCLASS MF4150 at
> libusb:003:004-04a9-26a3-00-00
> [pixma] pixma_find_scanners() found 1 devices
> [pixma] pixma_collect_devices() found Canon imageCLASS MF4150 at
> libusb:003:004-04a9-26a3-00-00
> [pixma] pixma_open(): Canon imageCLASS MF4150
> [pixma] Trying to clear the interrupt buffer...
> [pixma] Reader task started
> [pixma]
> [pixma] pixma_scan(): start
> [pixma] line_size=1920 image_size=1683840 channels=3 depth=8
> [pixma] dpi=75x75 offset=(0,0) dimension=640x877
> [pixma] gamma_table=0x8125f0 source=0
> [pixma] Reader task id=-267907072 (threaded)
> scanimage: scanning image of size 640x877 pixels at 24 bits/pixel
> scanimage: acquiring RGB frame, 8 bits/sample
> scanimage: reading one scanline, 1920 bytes...
>
>
> before it hangs.
>
>
> Next step?
>
>
> Thanks,
> bob
>
>
>
>
> On Aug 31, 2008, at 2:12 PM, Nicolas wrote:
>
>
>
> > Moving the USB PID to pixma_mp730.c and adding a line declaration
> > at
> > the end of this file (in pixma_mp730_devices[]) should be enough to
> > have
> > the scanner detected by scanimage. Don't forget to remove both from
> > pixma_imageclass.c
> >
> > Bob, if you don't succeed doing this, please activate the trace logs
> > to
> > see what's going on:
> >
> > $ export SANE_DEBUG_PIXMA=20
> > $ scanimage -T -vv
> >
> > Nicolas
> >
> > Le samedi 30 août 2008 à 19:15 -0700, Dennis Lou a écrit :
> >
> > > Nicolas,
> > >
> > > I told Bob to move the USB PID macro and device entry from
> > > pixma_imageclass.c to pixma_mp730.c and see if that works.
> > > He did that but then he wasn't able to see the scanner any more.
> > > Any
> > > ideas?
> > >
> > > -Dennis
> > >
> > >
> > > ----- Original Message ----
> > > From: Bob Dronski <dronski at gmail.com>
> > > To: Dennis Lou <dlou99 at yahoo.com>
> > > Cc: sane-devel at lists.alioth.debian.org
> > > Sent: Saturday, August 30, 2008 8:49:24 AM
> > > Subject: Re: [sane-devel] Canon MF4140
> > >
> > > So much for the lark....
> > >
> > >
> > > scanimage -L no longer finds the scanner after the patch. Now I
> > > am
> > > working off of a newer build than you are (7-20-CVS), but I only
> > > changed the 2 files by hand, and when changing back, it was once
> > > again
> > > able to find the device.
> > >
> > >
> > > bob
> > >
> > > On Aug 25, 2008, at 12:18 AM, Dennis Lou wrote:
> > >
> > >
> > > > Just on a lark, can you try commenting out the MF4100 PID and
> > > > device
> > > > entry from pixma_imageclass.c and add it to pixma_mp730.c?
> > > > Here's
> > > > the patch:
> > > >
> > > > Index: pixma_imageclass.c
> > > > ===================================================================
> > > > RCS
> > > > file: /cvsroot/sane/sane-backends/backend/pixma_imageclass.c,v
> > > > retrieving revision 1.4
> > > > diff -u -r1.4 pixma_imageclass.c
> > > > --- pixma_imageclass.c 25 Jun 2008 20:54:16 -0000 1.4
> > > > +++ pixma_imageclass.c 25 Aug 2008 05:17:37 -0000
> > > > @@ -78,7 +78,7 @@
> > > > #define MF3110_PID 0x2660
> > > > #define MF3200_PID 0x2684
> > > > #define MF6500_PID 0x2686
> > > > -#define MF4100_PID 0x26a3
> > > > +//#define MF4100_PID 0x26a3
> > > > #define MF4600_PID 0x26b0
> > > > #define MF4010_PID 0x26b4
> > > >
> > > > @@ -612,7 +612,7 @@
> > > > DEV ("Canon imageCLASS MF3110", MF3110_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > DEV ("Canon imageCLASS MF3240", MF3200_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > DEV ("Canon MF6500 Series", MF6500_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > - DEV ("Canon imageCLASS MF4150", MF4100_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > +// DEV ("Canon imageCLASS MF4150", MF4100_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > DEV ("Canon imageCLASS MF4690", MF4600_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > DEV ("Canon imageCLASS MF4010", MF4010_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > DEV (NULL, 0, 0, 0, 0, 0)
> > > > Index: pixma_mp730.c
> > > > ===================================================================
> > > > RCS file: /cvsroot/sane/sane-backends/backend/pixma_mp730.c,v
> > > > retrieving revision 1.7
> > > > diff -u -r1.7 pixma_mp730.c
> > > > --- pixma_mp730.c 22 Feb 2008 21:40:32 -0000 1.7
> > > > +++ pixma_mp730.c 25 Aug 2008 05:17:37 -0000
> > > > @@ -69,6 +69,7 @@
> > > > #define MP740_PID 0x264c /* Untested */
> > > > #define MP710_PID 0x264d
> > > > #define MP730_PID 0x262f
> > > > +#define MF4100_PID 0x26a3
> > > >
> > > > enum mp730_state_t
> > > > {
> > > > @@ -638,5 +639,6 @@
> > > > DEVICE ("Canon MultiPASS MP710", MP710_PID, 1200, 637, 868,
> > > > 0),
> > > > DEVICE ("Canon MultiPASS MP730", MP730_PID, 1200, 637, 868,
> > > > PIXMA_CAP_ADF),
> > > > DEVICE ("Canon MultiPASS MP740", MP740_PID, 1200, 637, 868,
> > > > PIXMA_CAP_ADF),
> > > > + DEVICE ("Bob's MF4150", MF4100_PID, 600, 640, 877,
> > > > PIXMA_CAP_ADF),
> > > > DEVICE (NULL, 0, 0, 0, 0, 0)
> > > > };
> > > >
> > > >
> > > >
> > > > ----- Original Message ----
> > > > From: Bob Dronski <dronski at gmail.com>
> > > > To: Dennis Lou <dlou99 at yahoo.com>
> > > > Sent: Saturday, August 23, 2008 1:20:22 PM
> > > > Subject: Re: [sane-devel] Canon MF4140
> > > >
> > > > Got a couple more. 150dpi color from the bottom of the scan and
> > > > 300
> > > > dpi b/w along the left edge.
> > > >
> > > >
> > > > This enough to get you started?
> > > > bob
> > > >
> > > > On Sat, Aug 23, 2008 at 3:07 PM, Bob
> > > > Dronski <dronski at gmail.com> wrote:
> > > > Dennis,
> > > >
> > > >
> > > > Parallels, the scanner, and USB sniffer are a
> > > > bit temperamental together. I've been playing, and I
> > > > have
> > > > one greyscale log so far. If the log got too big, I
> > > > apologize. LIke I said, it was really tricky. I'll
> > > > continue to play to get some more stuff out for you
> > > >
> > > >
> > > > bob
> > > >
> > > >
> > > >
> > > > On Sat, Aug 23, 2008 at 2:34 PM, Dennis
> > > > Lou <dlou99 at yahoo.com> wrote:
> > > > For the first one, empty is fine. Later, might
> > > > want
> > > > to try different colors of paper. But I'm
> > > > guessing
> > > > that the protocol will be similar enough to
> > > > another
> > > > existing supported scanner that it probably might
> > > > not be necessary.
> > > >
> > > > -Dennis
> > > >
> > > >
> > > > ----- Original Message ----
> > > > From: Bob Dronski <dronski at gmail.com>
> > > > To: Dennis Lou <dlou99 at yahoo.com>
> > > >
> > > >
> > > > Sent: Saturday, August 23, 2008 7:09:55 AM
> > > > Subject: Re: [sane-devel] Canon MF4140
> > > >
> > > > dumb quick question--I'll try to look it up, but
> > > > I
> > > > figured I'd check with you as well. Is it better
> > > > to
> > > > scan an empty flatbed or put a doc on it? I
> > > > don't
> > > > know what data would be easier to work with (or
> > > > if
> > > > it makes a difference)
> > > >
> > > >
> > > > Otherwise, I'm hooked up to parallels and am
> > > > functioning. I'll start w/ an empty bed and go
> > > > from
> > > > there.
> > > >
> > > >
> > > > bob
> > > >
> > > >
> > > > On Fri, Aug 22, 2008 at 1:16 PM, Dennis
> > > > Lou <dlou99 at yahoo.com> wrote:
> > > > Well, I'm very confident somebody can do
> > > > something with the logs and get it
> > > > working.
> > > > Whether that person is me depends (that
> > > > was
> > > > my first time doing a scanner). But even
> > > > if
> > > > that person is not me, the SANE guys are
> > > > pretty smart from what I've seen and
> > > > consumer-grade scanners seem pretty well
> > > > understood at this point.
> > > >
> > > > Especially if the protocol isn't much
> > > > more
> > > > complicated than the MF4270, then I'm
> > > > pretty
> > > > sure I can get something going.
> > > >
> > > > BTW, where are you located? I'm in the
> > > > Silicon Valley.
> > > >
> > > > -Dennis
> > > >
> > > >
> > > > ----- Original Message ----
> > > > From: Bob Dronski <dronski at gmail.com>
> > > > To: Dennis Lou <dlou99 at yahoo.com>
> > > > Sent: Friday, August 22, 2008 10:40:15 AM
> > > > Subject: Re: [sane-devel] Canon MF4140
> > > >
> > > > Dennis,
> > > >
> > > >
> > > > I've got a crazy day or two ahead of me.
> > > > I'm going to really try to get you
> > > > something tonight or tomorrow.
> > > >
> > > >
> > > > Do you think the odds will be good to get
> > > > the driver working if I get you the data
> > > > (and I presume a few more dumps)?
> > > >
> > > >
> > > > Just trying to prioritize my time. If
> > > > you're not sure, I need to get it to you
> > > > ASAP, as I only have through thursday to
> > > > return easily. If you're pretty
> > > > confident,
> > > > I'll believe in you and not worry about
> > > > the
> > > > date.
> > > >
> > > >
> > > > take care,
> > > > bob
> > > >
> > > >
> > > >
> > > > On Aug 22, 2008, at 12:15 AM, Dennis Lou
> > > > wrote:
> > > >
> > > >
> > > > > Great, thanks!
> > > > >
> > > > > 1. Unplug the device
> > > > > 2. Install the Canon drivers
> > > > > 3. Install a USB sniffer. I used
> > > > > SniffUSB v1.7 because my VM is Win2k. You
> > > > > can certainly do better if you are running
> > > > > a more recent version of Windows.
> > > > > 4. Plug in the device and direct it to the
> > > > > virtual machine (select the device from
> > > > > the "Device" menu in VMWare)
> > > > > 5. Start the USB sniffer (on mine, there
> > > > > are four possible devices/subdevices; I
> > > > > select "Canon MF4200 Series" and click the
> > > > > "Install" button)
> > > > > 6. If you are using XP or Win2k, click
> > > > > Start->Programs->Accessories->WindowsImaging then
> > > > > File->Acquire
> > > > > 7. Pick 75 DPI, grayscale and select a
> > > > > small area to scan, preferably full width
> > > > > and minimal height then hit "Scan".
> > > > > 8. Save the log file. In SniffUSB 1.7,
> > > > > this means clicking the "Uninstall"
> > > > > button, copying the log file somewhere
> > > > > else, then clicking the "Delete" button.
> > > > > 9. Repeat steps 5-8 (possibly step 4 if
> > > > > your setup is as finicky as mine) using
> > > > > different color and dpi settings and
> > > > > different areas.
> > > > > 10. Send me and/or the SANE list the log
> > > > > file(s).
> > > > >
> > > > > Thanks again for your help.
> > > > >
> > > > > -Dennis
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message ----
> > > > > From: Bob Dronski <dronski at gmail.com>
> > > > > To: Dennis Lou <dlou99 at yahoo.com>
> > > > > Sent: Thursday, August 21, 2008 2:47:26 PM
> > > > > Subject: Re: [sane-devel] Canon MF4140
> > > > >
> > > > > Dennis,
> > > > >
> > > > > May have missed the message. Sorry.
> > > > >
> > > > > Yes, I have a MacBookPro running parallels
> > > > > I can use to sniff for you. As I haven't
> > > > > done this before, please tell me what to
> > > > > do.
> > > > >
> > > > > Thanks,
> > > > > bob
> > > > >
> > > > >
> > > > > On Thu, Aug 21, 2008 at 4:32 PM, Dennis
> > > > > Lou <dlou99 at yahoo.com> wrote:
> > > > > Hi Bob,
> > > > >
> > > > > I sent you a private email
> > > > > regarding this but apparently you
> > > > > didn't get it.
> > > > >
> > > > > I wrote the Imageclass section and
> > > > > Allan is correct. Your all-in-one
> > > > > shares the same Windows front-end
> > > > > stuff from Canon as mine. But
> > > > > beyond that, I have no idea
> > > > > whether the base USB
> > > > > communications protocol is the
> > > > > same or not. What's really needed
> > > > > are USB snoop logs, preferably
> > > > > from a Windows scan. Can you run
> > > > > Parallels or Bootcamp into Win2k
> > > > > or higher?
> > > > >
> > > > > -Dennis
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > 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
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080901/2762c5ad/attachment-0001.htm
More information about the sane-devel
mailing list