[sane-devel] reverse engineering / usbsnoop

Frank Zago fzago@austin.rr.com
Sat, 11 Sep 2004 11:19:44 -0500

Mbosowo I Sampson wrote:
> After reading reams of documentation, I think I have a grasp on how the 
> USB protocol works. I started snooping the usb traffic of my hp scanjet 
> 3970 so I can start writing the backend for it. I have a couple of 
> questions...
> With Snoopy Pro it seems to stop logging information once the actual 
> scan begins. Someone else posted something on SF page about it stopping 
> once the bulk transfer began. I was wondering if anyone knew how to get 
> around this. I tried sniffit, but the documentation says it only works 
> for NT 2000.

sniffit is not a usb sniffer.
Try http://benoit.papillault.free.fr/usbsnoop/

> I was looking at a usb dump,
> http://reapoff.sourceforge.net/hpscanner/full_scan.dump.gz
> posted by this guy,
> http://reapoff.sourceforge.net/hpscanner/hp4470c.txt
> On this page he says that the chipset he was looking at had 244 
> registers. How exactly can you tell that by the logs?

May be because 243 is the highest register he saw?

> I'm looking at the logs, and I'm not sure where to start. I was to start 
> simple by writing a stand alone application that tuns on the lamp, then 
> build on it from there. I have a session log, but I have no idea how to 
> find out what register and values are needed to turn on the lamp. Any tips?

Are you sure your scanner has the same chipset than the 4470c?

You need to get an idea of what your scanner is based on:
  - open it and get the chipset names
  - running "strings" on the windows drivers may yield some data
  - check the windows driver .INF

You will have to get a usb trace for your scanner.