[sane-devel] How to read the usb-snoopy log?

Frank Zago fzago@austin.rr.com
Sun, 29 Sep 2002 13:12:32 -0500

Hi list member Gerhard,

If you read the usb logs, you should be able to detect the pp commands. What 
might be confusing is that a lot of usb packet may be sent/received just for one 
command. The bridge chip may also need some inititialisation.

You can look into umax-usb.c. This file is used to send scsi commands through 
usb. The function sanei_umaxusb_cmd() is where all the work is done. Basically 
there a dialogue like

host: i'm going to send a cdb. tell me whenever you're ready.
scanner: i'm ready
host: here is the cdb. tell me whenever you've received it.
scanner: i got it.
host: i also have to sending some data. tell me when you got them.
scanner: i got them
host: tell me when the command is completed
scanner: it is now

and so on.

So for just a single CDB, the host has sent about 30 messages.

Does your scanner uses only bulk messages or both bulk and control messages?
Control messages can be used to prepare a command and bulk message can be used 
to send/receive the real data. You should see that in the logs.

You should post your logs somewhere. It is possible that your scanner uses an 
already know bridge, and someone could identify it.

Hope that helps,

> Hi list,
> I have a small problem, you guys out there might help:
> The problem is ,that I have the Plustek parallel-port driver suitable
> for a specific ASIC, so I know which registers need to be set to work.
> Then I also have the USBsnoopy log of a device which contains this ASIC
> too, but the protocol has been mapped to USB. My problem is to find
> out, how the communication over USB is done. Ain't it possible, that this
> communication is transparent, I mean, simply write to the USB and read 
> back? 
> Thanks in advance for any hints.
>   Gerhard