[sane-devel] avision backend support of HP 8250
Anastas Giokov
agiokov at gmail.com
Mon Oct 3 12:58:16 UTC 2005
Hi!
On 10/3/05, Henning Meier-Geinitz <henning at meier-geinitz.de> wrote:
> Hi,
>
> On Mon, Oct 03, 2005 at 01:57:37PM +0300, Anastas Giokov wrote:
> > How can I look at the actual communication between the backend and the
> > scanner? I'd like to debug further if anybody has an idea where to go
> > next.
>
> export SANE_DEBUG_SANEI_USB=255
>
I have tried that, here is the result:
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] 0000: 00
................
[sanei_usb] sanei_usb_read_bulk: wanted 2 bytes, got 1 bytes
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 0000: 28 00 00 00 00 00 00 76 E0 00
(......v........
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[sanei_usb] sanei_usb_read_bulk: trying to read 30432 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
[sanei_usb] sanei_usb_write_bulk: trying to write 10 bytes
[sanei_usb] 0000: 28 00 00 00 00 00 00 76 E0 00
(......v........
[sanei_usb] sanei_usb_write_bulk: wanted 10 bytes, wrote 10 bytes
[sanei_usb] sanei_usb_read_bulk: trying to read 30432 bytes
[sanei_usb] sanei_usb_read_bulk: read failed: Resource temporarily unavailable
...
It seems to me that backend stops reading from scanner after trying to
read block of 30432 bytes. Could it be caused by wrong variable type?
I found and fixed the following in sanei_usb:
--- sanei_usb.c.bak 2005-07-16 00:00:57.000000000 +0300
+++ sanei_usb.c 2005-10-03 15:38:26.000000000 +0300
@@ -972,7 +972,7 @@
if (devices[dn].bulk_in_ep)
read_size = usb_bulk_read (devices[dn].libusb_handle,
devices[dn].bulk_in_ep, (char *) buffer,
- (int) *size, libusb_timeout);
+ (unsigned long) *size, libusb_timeout);
else
{
DBG (1, "sanei_usb_read_bulk: can't read without a bulk-in "
size is always type-cast as unsigned long except for this place, so
I'll give it a try.
> Comment everything but "avision" in dll.conf to reduce the amount of
> debug messages.
>
> Bye,
> Henning
>
I'll get back with more info later.
Anastas
More information about the sane-devel
mailing list