[sane-devel] Mac OS X - xsane and Microtek Scanmaker II

abel deuring a.deuring@satzbau-gmbh.de
Fri, 29 Aug 2003 18:41:04 +0200


David B Brown wrote:
> 
> Hi
> 
>         Thanks for the response.
> 
>         As mentioned in my original note, I have another native Mac OS X tool
> called VueScanX  from which I can do 3 pass color scans from, so my
> SCSI bus and the Adaptec driver must be ok. The reason I'm trying to
> get sane working is that I only have a demo version of vuescan and is
> VERY slow to scan.

David,

we don't need an excuse that you want to use Sane ;) Bugs should be
fixed. But I don't have a MacOS X system available, so I can give mainly
a sort of backseat driver comments, though I know a bit of sanei-scsi.c
and of Sane in general...

> 
>         here's some trace using the environment variables you suggested. In
> this case I have just done a greyscale preview, and have now hit the
> scan button and here is what I get :-

A preview scan is quite similar to a normal scan; hence the situation is
similar to the three pass color scan, where the first pass works, and
the start of the second scan fails.

> 
> [microtek] sane_start...
> [microtek] sane_get_parameters...
> [microtek] sane_get_parameters:  non-color
> [microtek] sane_get_parameters:  res_code = 100 (64)
> [microtek] sane_get_parameters:  dots_per_mm:  11.811024
> [microtek] sane_get_parameters:  units_per_mm:  11.811024
> [microtek] WIDTHPIX:  before exp: 2540
> [microtek] sane_get_parameters:  lines: 4188  ppl: 2540  bpl: 2540
> [sanei_debug] Setting debug level of sanei_scsi to 255.
> [microtek] .wait_ready 0...
> [microtek] wait_ready failed (0)
> [microtek] wait_ready failed (1)
> [microtek] wait_ready failed (2)
> [microtek] wait_ready failed (3)
> [microtek] wait_ready failed (4)
> [microtek] wait_ready failed (5)
> [microtek] wait_ready failed (6)

I had a _very_ quick look into microtek.c; it seems that the function
wait_ready sends the first SCSI command after the device file opened (or
whatever other mechanism is used on MacOS to "connect" the scanner).
This function sends only the SCSI command TEST UNIT READY, which should
succeed in any case, if a device works correctly. From the syslog output
from your previous mail it seems that the scanner does not accept any
command.

A wild guess: It could be that the last SCSI command from the preview
scan resp. from the first pass of the color scan got stuck somewhere in
the pipeline Sane backend -> MacOS SCSI system -> scanner -> MacOS SCSI
-> Sane backend. Unfortunately the MacOS X part of sanei_scsi.c does not
seem to produce any debug output, so it's really hard to make any
further comments. 

I hope that Matt (the maintainer of the Microtek backend) will correct
any errors in my understanding of the Mircoek backend, and that Guy
Brooker <guy_brooker@mac.com> or Mattias Ellert
<mattias.ellert@tsl.uu.se>, who wrote the SCSI support for MacOS X, can
give better comments.

Abel