[sane-devel] Need help analyzing USBSnoopy logs for Microtek Scanmaker 5600

Bertrik Sikken bertrik@zonnet.nl
Wed, 15 Sep 2004 21:15:36 +0200

Susheel Yadav wrote:
> Hi,
> I am trying to write the linux driver for Microtek
> Scanmaker 5600 scanner. I used USBSnoopy to generate
> these logs from VMWare/Win2k. I have filtered out the
> big bulk transfers. The log files are still in ~200KB
> range. I am providing a link below with the log files.
> I have made some progress in identifying the status
> check packets, and some pattern in the bulk transfers,
> but I have no idea what those medium sized control
> packets mean. I would appreciate any help.
> http://blanca.homelinux.com/usblogs/
> Thank you very much!

What medium sized control packets do you mean?

I looked a bit at the logs and noticed 10 unique patterns:

* request=0x12, value=0x00: read version info?
The data returned by this transfer contains the strings
"ScanMaker 5600  1.30"

* request=0x24, value=0x00: write 0x45 bytes of scan settings?
This transfer contains numbers like 1200, 600, 300, which are likely
DPI or LPI resolutions. I think that scan area is also coded in this
transfer. It noticed this transfer happens twice (once for calibration,
then once for the actual scan?)

* request=0x26, value=0x00: prepare bulk read (index = length)
This transfer always seems to happen just before a bulk read

* request=0x28, value=0x80: get a bunch of bytes (don't know what)

* request=0x28, value=0x81: read some 9-byte buffer

* request=0x28, value=0x82: read scan capabilities?
This transfer also has typical DPI numbers, but always seem to be
the same (not always same length though)

* request=0x28, value=0x83: read status byte?
(00 = ready, 08 = not ready?)

* request=0x29, value=0x2101: prepare bulk write (index=length=20400)
Not sure yet what is written here, looks like 16-bit data.
Could be calibration data.

* request=0x2A, value=0x81: write some 9-byte buffer
Same buffer as read by request=0x28,value=0x81

* request=0x40, value=0x00: read scanner status
This transfer seems to happen after about any other transfer.

I think a good transfer to concentrate on is the one with request=0x24.
This one seems to indicate scan settings, so try out some different
scan area's, resolutions, etc. and see if you can spot any log changes
in this transfer that match with your settings.
The stuff written to the scanner using the transfer with request=0x29
could be calibration data. I think that in initial tests you can get
away with just writing some constant data like 0xFF.

Hope this helps (and that I'm not telling you anything you knew