[sane-devel] Canon CS 8000F, USB and VMWare

Henning Meier-Geinitz henning@meier-geinitz.de
Mon, 9 Jun 2003 10:42:57 +0200


On Sun, Jun 08, 2003 at 03:12:41PM -0700, Sergey Berezin wrote:
> I recently acquired Canon CanoScan 8000F (USB 2.0), which is not
> supported by SANE yet, and I'm thinking of writing a backend for it.
> Or at least try to reverse-engineer the protocol...

Very good! Have you looked at the SANE list of scanners if there are
any othere canon scanners with the same output of
/proc/bus/usb/devices? Maybe they use the same chip for diffferent
scanners and only chage the ids.

> Now, about breaking the protocol.  I'm running VMWare (win2k) through
> USB v.1, and the scanner seems to be working fine.  I installed
> SnoopyPro on the Windows side, but it stops snooping after the the
> first 120+ tiny control messages right after the scanner is plugged
> in.  No data is logged when it actually scans.  According to some
> other random source, it probably gets confused by the first bulk
> transfer.

I've heard about similar behaviour from several people. It doesn't
happen with my USB scanners, however. Maybe it's also related to USB2?

> As an alternative, I've read in many places (including the archives of
> this mailing list) that it's possible to log USB messages from VMWare
> directly from the linux kernel module.  Since I'm not familiar with
> the kernel code, I wonder if someone has already done this and can
> share the experience or a hacked usb module with me.

I haven't used vmware. Can you find out how it uses the Linux USB
system exactly? Does it use the Kernel scanner driver? Or does it use
libusb or even the /proc/bus/usb/001/* devices directly?

Anyway, adding some printk messages in usb_bulk_msg()
(drivers/usb/usb.c) that print the buffer of the bulk message may be
worth a try.

If vmware uses the USB scanner driver, there are already some debug
macros in scanner.c/.h, just enable them.