On 1/2/06, Henning Meier-Geinitz <[email protected]> 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 From [email protected] Tue Jan 3 05:42:08 2006 From: [email protected] (=?UTF-8?Q?Parag_N=28=E0=A4=AA=E0=A4=B0=E0=A4=BE=E0=A5=9A=29?=) Date: Tue Jan 3 05:42:13 2006 Subject: [sane-devel] Re: problem resetting register In-Reply-To: <[email protected]> References: <[email protected]> Message-ID: <[email protected]> Hi, On 1/2/06, Parag N(????) <[email protected]> wrote: > Hello, > This is with reference to my previous mails for Hp 2400 > genesys backend development. what i am getting is that after 1755 > lines head moves other end and instead of moving back it tries to move > furhter. genesys code calulates that head has to scan 3510 lines which > must be actually 1755 lines. so i modified code so that to reset head > to move back after 1755 lines scanned. but besides i am writing to > 0x02 register 53 decimal value it scanning further after 1755 and > after lines count drop to 0 head automatically resets to home by > moving backwards. code is included in sane_read in genesys.c > heres the whole modified function > > SANE_Status > sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, > SANE_Int * len) > { > Genesys_Scanner *s = handle; > SANE_Status status; > size_t local_len; > unsigned int channels,depth,lines; > if (!s) > { > DBG (DBG_error, "sane_read: handle is null!\n"); > return SANE_STATUS_INVAL; > } > > if (!buf) > { > DBG (DBG_error, "sane_read: buf is null!\n"); > return SANE_STATUS_INVAL; > } > > if (!len) > { > DBG (DBG_error, "sane_read: len is null!\n"); > return SANE_STATUS_INVAL; > } > > *len = 0; > > if (!s->scanning) > { > DBG (DBG_warn, "sane_read: scan was cancelled, is over or has not been " > "initiated yet\n"); > return SANE_STATUS_CANCELLED; > } > > DBG (DBG_proc, "sane_read: start\n"); > channels = s->dev->current_setup.channels; > depth = s->dev->current_setup.depth; > lines=(((s->dev->total_bytes_to_read - s->dev->total_bytes_read)*8)/ > (s->dev->settings.pixels*channels*depth)); > > DBG (DBG_info, "genesys_sane_read: %d lines left by output\n",lines); > if(lines==(lines/2)) > { > status =sanei_genesys_write_register (s->dev, 0x02, 53); > if (status != SANE_STATUS_GOOD) > { > DBG (DBG_error, > "sanei_genesys_fe_write_data: Failed while bulk writing > registers: %s\n", > sane_strstatus (status)); > return status; > } > } > local_len = max_len; > status = genesys_read_ordered_data (s->dev, buf, &local_len); > > *len = local_len; > return status; > } > > Can anybody point out where the things are going wrong? > Thanks & regards, > Parag. > Anybody knows answer to above question please? regards, Parag. From [email protected] Tue Jan 3 09:06:12 2006 From: [email protected] (=?UTF-8?Q?Parag_N=28=E0=A4=AA=E0=A4=B0=E0=A4=BE=E0=A5=9A=29?=) Date: Tue Jan 3 09:06:22 2006 Subject: [sane-devel] Require Windows USB log for HP 2300C scanner Message-ID: <[email protected]> hello, I want to check how HP 2300C scanner got its values(hard coded) in sane genesys backend. so i want if anybody have HP 2300C scanner can oyu please send me USB log of scanner just after its power up using http://benoit.papillault.free.fr/stats/get.php?location=../usbsnoop/sniff-bin-1.8.zip I will be thankful if anybody will send it to me early. regards, Parag.
