[sane-devel] check-usb-chip request for help
Ioan-Cosmin Pop
picos132004@yahoo.co.uk
Thu, 24 Jun 2004 12:05:26 +0100 (BST)
Hello everyone!
I started (some time ago) to modify the program
check-usb-chip to detect my scanner. It's a Mustek
BearPaw 4800TA ProII. I know, I'm slow, but it's the
best I can :( I apologize to everyone.
Anyway, I came across one problem and I don't know
how to handle it. Let me explain.
I created the function "check_SQ113" to check the
chip
(http://picosconsult.topcities.com/downloads/check-usb-chip.c).
I test the device descriptor and the endpoints. After
that, I try to write a value (a four bytes array),
like this:
req[0] = 0x64;
req[1] = 0x64;
req[2] = 0x64;
req[3] = 0x64;
result = usb_bulk_write (handle, 0x01, req, 4,
TIMEOUT);
if (result <= 0)
{
if (verbose > 2)
printf (" this is not a SQ-113 (Error during bulk
write)\n");
finish_interface (handle);
return 0;
}
then read it:
result = usb_bulk_read (handle, 0x82, &res, 1,
1000);
if (result <= 0)
{
if (verbose > 2)
printf (" this is not a SQ-113 (Error during bulk
read)\n");
finish_interface (handle);
return 0;
}
but I get an error in usb_bulk_write() no matter what
I do. I tried to chage the endpoint (not to use bulk
but interrupt) but to no avail. So, my question is:
can I get rid of this test? I see there are other
functions that don't try to write/read something from
the device. Is it safe to do this? I mean, all the
other tests ("device descriptor" and "endpoints" pass
OK).
After some time, I looked over the page
http://www.sane-project.org/unsupported/mustek-bearpaw-4800ta-pro-ii.html
and I saw some other chips:
1.
SQ [brand]
SQ100A
A335-9901
---
2.
UTC QGOB
L6219
TB
[O in 1st line may be a Zero]
---
3.
ISSI [brand]
IS42S16100A1-7T
X11882000D 0336
----
4.
SQ [brand]
SQ113C
0335-1408
D0KNS-013
[Zeroes may be O]
Does this mean I have to include tests specific to
those chips, or they behave exactly like SQ113C?
Again, I apologise for being slow...
Thank you
Cosmin
___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com