[sane-devel] SniffUSB: URB direction and TransferFlags IN/OUT confusion

Gernot Hassenpflug aikishugyo at gmail.com
Fri Feb 26 03:03:42 UTC 2010


On Fri, Feb 26, 2010 at 11:56 AM, m. allan noah <kitno455 at gmail.com> wrote:
> On Thu, Feb 25, 2010 at 9:17 PM, Gernot Hassenpflug
> <aikishugyo at gmail.com> wrote:
>> On Fri, Feb 26, 2010 at 12:38 AM, m. allan noah <kitno455 at gmail.com> wrote:
>>> Do you find that the machine actually makes any control packets once
>>> it starts scanning? Many scanners only use those at initial
>>> configuration, which is taken care of by the host OS, and calls to set
>>> interface, etc. I have found that I generally only use bulk packets
>>> with most scanners...

Hello,

If it is so simple, should I go for using sanei at once, maybe with an
existing SANE driver as starting point? I've still got to read up on
SANE in the next few days. I'll look first at an existing SANE
backend. I'm not sure what is best since I do not have any particular
chipset-based backend to go for as first choice. So I am guessing I
should try using a backend that is as simple as possible.

> yes- looks pretty simple. Gamma tables in urb 64, 66 and 68. image
> data in urb 235 to 250.

Thanks.

>>
>> Two questions, from reading the USB specs so far:
>>
>> 1) in usbsnoop endpoint numbers show up as 0, 7 (bulk OUT), 88 (bulk
>> IN), and 89 (interrupt IN). But there are only 4 bits for endpoint
>
> It does not matter. You are confusing yourself with details. You read
> from 0x8*, and you write to 0x0*. Do whatever the windows driver does.

OK.

>> 2) I'm confused what the order of bits is in usbsnoop output. I
>
> these are regular MSb to LSb bytes. 7 6 5 4 3 2 1 0. Whether each pair
> of bytes is big or little endian is dependent on the scanner.

Thanks.

If no-one has any particular recommendation on a "simple backend to
start hacking on" I'll select one on my own. Or go with a skeleton
driver to mimic the Windows actions if I get stuck.

Cheers,
Gernot



More information about the sane-devel mailing list