[sane-devel] Learning about USB and scanners

Stephen More stephen.more at gmail.com
Tue Jan 3 14:11:13 UTC 2006

On 1/3/06, Henning Meier-Geinitz <henning at meier-geinitz.de> wrote:
> > Visioneer OneTouch 7600 USB
> Shouldn't it be possible to use the existing viceo backend at least to
> understand what's send to the scanner? That backend claims to support
> that scanner.

It should be possible...but this does not use libusb, it is a patch to the
scanner module. There is alot of code there I do not understand.

I am trying to follow the instructions in backend-writing.txt "write a
stand-alone scanning program first". By starting from scratch I am learning

Was it you who entered this bug/wishlist report?
> https://alioth.debian.org/tracker/index.php?func=detail&aid=302812&group_id=30186&atid=410366
> In this case, could you provide a description or documentation for
> this script?


Input to this perl script is the output from a windows usb snoop

This script generates c code using libusb that compiles and executes
the same USB commands that were captured in from the snoop.

> On the other hand, if it has such grave bugs it may be better not to
> link to it.

Just like all programs, it will get better as time goes on. It has been the
best tool I have found that gives me a jumpstart to understanding libusb.
Hopefully in the future this will get included in the libusb project tree.

> I guess OUT OUT should be usb_bulk_write and OUT IN should be
> usb_bulk_read
> Yes. These are URBs, not the actual physical data on the USB. That
> means that the data is just read and not that a buffer filled with
> zeros is sent to the scanner.
> Also, you can tell if its a read or write by looking at the endpoint
> number (if bit 7 is set (0x80), it's an IN endpoint).
I am going to write a patch and send it in to fix usbsnoop2libusb.pl

Steve More
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060103/23165e3d/attachment-0001.htm

More information about the sane-devel mailing list