[sane-devel] check-usb-chip request for help

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 24 Jun 2004 18:55:47 +0200


Hi,

On Thu, Jun 24, 2004 at 12:05:26PM +0100, Ioan-Cosmin Pop wrote:
>   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),

What is this command or data intended to do?

> 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.

First you must know what to send. I.e. you must know the protocol of
the scanner and what commands to use or registers to set. Use a simple
command (e.g. read the device identification or write and read a
register value).

> 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?

Not really, at least if you want to be sure that you have correctly
identified a chipset. The whole idea of the descriptor test is to avoid sending
commands to a scanner that doesn't understand them. However, the final
test if we really have found a secific chipset is done by
communicating with the chipset.

>   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:

[...]

>   Does this mean I have to include tests specific to
> those chips, or they behave exactly like SQ113C?

They are all in the same scanner. Well, they ought to be there as
somebody told me that they are there :-)

Probably these chips are "helper chips" like a CCD driver,
analog frontend, motor driver, RAM, EPROM, USB interface etc.

So you don't need (and probably can't) test for them.

Bye,
  Henning