[sane-devel] Learning about USB and scanners

Stephen More stephen.more at gmail.com
Tue Jan 3 00:54:27 UTC 2006


On 1/2/06, Henning Meier-Geinitz <henning at meier-geinitz.de> wrote:

> Which scanner exactly?


Visioneer OneTouch 7600 USB


> > 4.  I am saving the output of usb_bulk_write to files
>
> So the files mentioned below is the data that is sent to the scanner?
> Or do you mean bulk_read?


Ahh ! I think this leads to a bug in :
http://protu.it.helsinki.fi/~lindi/usb/usbsnoop2libusb.pl

I gave it my snoop log and it only produced libusb code with usb_bulk_write
statements.

I guess OUT OUT should be usb_bulk_write and OUT IN should be usb_bulk_read

[60017 ms]  >>>  URB 537 going down  >>>
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
  PipeHandle           = c1bf3a28 [endpoint 0x00000081]
  TransferFlags        = 00000000 (USBD_TRANSFER_DIRECTION_OUT,
~USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 0000002a
  TransferBuffer       = edab2cc0
  TransferBufferMDL    = 00000000
    00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000020: 00 00 00 00 00 00 00 00 00 00
  UrbLink              = 00000000
[60169 ms] UsbSnoop - MyInternalIOCTLCompletion(ff1ad4c0) : fido=ed03ec38,
Irp=ed0577a0, Context=ed1d2e10, IRQL=2
[60169 ms]  <<<  URB 537 coming back  <<<
-- URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
  PipeHandle           = c1bf3a28 [endpoint 0x00000081]
  TransferFlags        = 00000001 (USBD_TRANSFER_DIRECTION_IN,
~USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 0000002a
  TransferBuffer       = edab2cc0
  TransferBufferMDL    = ed0b16a0
    00000000: 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00000020: 00 00 00 00 00 00 00 00 00 00
  UrbLink              = 00000000
[60170 ms] UsbSnoop - DispatchAny(ff1abd30) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[60170 ms] UsbSnoop - MyDispatchInternalIOCTL(ff1ad590) : fdo=c1bc7468,
Irp=ed0597b0, IRQL=0



> > So far I am only scanning a B&W 9 pixel x 9 pixle area ...I am expexting
> an
> > 81 byte file but I am getting much more than that.
> > Can some one help me take this raw output and convert in into an image
> file
> > I can view ?
>
> Well, that depends on the format of that data :-)
>
> Some general hints: If the scanner has a real black&white/lineart
> mode, the size of the image data itsself can be even smaller
> (something like 9 * ceil (9 / 8)).
>
> If the scanner uses its gray mode, the minimum is 81 bytes. However,
> the scanner may have a minimum size, so the driver may actually scan
> more data (e.g. 1"x1", or 256 pixels at minimum, or similar).
>
> Before you get scan data from the device you may receive calibration
> data, which can be much bigger than the 9x9 pixel. E.g. Full lines at
> full resolution, 16 bit/color.


Perhaps after I  generate some usb_bulk_read  I will be able to find  some
kind of image in those files.

-Thanks
Steve More
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060102/e5afdd51/attachment.htm


More information about the sane-devel mailing list