sane-project-website/old-archive/1998-11/0176.html

123 wiersze
6.7 KiB
HTML

<!-- received="Fri Nov 20 04:45:23 1998 PST" -->
<!-- sent="Fri, 20 Nov 1998 13:41:21 +0100 (MET)" -->
<!-- name="Sebastian Erdmann" -->
<!-- email="serdmann@cs.tu-berlin.de" -->
<!-- subject="Re: Patch for Microtek ScanMaker X6 (microtek2 backend)" -->
<!-- id="199811201241.NAA19923@elephant.cs.tu-berlin.de" -->
<!-- inreplyto="19981119233131.2879.qmail@aquila.muc.de" -->
<title>sane-devel: Re: Patch for Microtek ScanMaker X6 (microtek2 backend)</title>
<h1>Re: Patch for Microtek ScanMaker X6 (microtek2 backend)</h1>
<b>Sebastian Erdmann</b> (<a href="mailto:serdmann@cs.tu-berlin.de"><i>serdmann@cs.tu-berlin.de</i></a>)<br>
<i>Fri, 20 Nov 1998 13:41:21 +0100 (MET)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#176">[ date ]</a><a href="index.html#176">[ thread ]</a><a href="subject.html#176">[ subject ]</a><a href="author.html#176">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0177.html">Oliver Rauch: "Re: forwarded message from Richard Stallman"</a>
<li> <b>Next message:</b> <a href="0177.html">Oliver Rauch: "Re: forwarded message from Richard Stallman"</a>
<li> <b>Previous message:</b> <a href="0175.html">Christian Grigis: "Re: Patch for Microtek ScanMaker X6 (microtek2 backend)"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0182.html">Bernd Schroeder: "Re: Patch for Microtek ScanMaker X6 (microtek2 backend)"</a>
<li> <b>Reply:</b> <a href="0182.html">Bernd Schroeder: "Re: Patch for Microtek ScanMaker X6 (microtek2 backend)"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
On Fri, 20 Nov 1998 00:31:31 +0100, Bernd Schroeder wrote:<br>
<i>&gt;</i><br>
<i>&gt; This sounds indeed strange. Normally the scanner should be in reset state </i><br>
<i>&gt; after it is switched on. Or are the colors wrong if the scanner is switched</i><br>
<i>&gt; on before the system is booted (or the SCSI driver is loaded) ? Then</i><br>
<i>&gt; the SCSI driver sends one or more commands to the device, but these</i><br>
<i>&gt; commands should not affect the results of a scan.</i><br>
<p>
I tried every computer/scanner power-up sequence I could think of :-)<br>
I also tried loading/unloading the SCSI driver, but the problem occurs<br>
every time. It doesn't seem to be related to SCSI, since it occurs on<br>
both the Adaptec AVA-1505 host adapter (supplied with the scanner)<br>
and my NCR 53C810 controller.<br>
<p>
[...] <br>
<i>&gt; &gt; I fixed it anyway to prevent potential problems: The scanner seems</i><br>
<i>&gt; &gt; to come up with random values for the NTRACK and NCALIB bits in</i><br>
<i>&gt; &gt; the system status. The fix (included in the patch below) was to</i><br>
<i>&gt; &gt; explicitly set these bits to zero in sane_start().</i><br>
<i>&gt; </i><br>
<i>&gt; NCALIB set to 1 prevents the scanner from calibration before a scan.</i><br>
<i>&gt; This is explicitly set (and later reset) in the do_dummy_scan()-function.</i><br>
<i>&gt; Please check, whether the differences for this bit result from these</i><br>
<i>&gt; different settings.</i><br>
<p>
Note that my patch places the call to do_dummy_scan() (and therefore<br>
the call to scsi_send_diagnostic()) in sane_start() before the call<br>
to scsi_send_system_status(). I did this because I'm not sure whether<br>
the system status is preserved across a self test. Therefore I need<br>
to set NTRACK and NCALIB in sane_start().<br>
<p>
[...]<br>
<i>&gt; I experimented with this command myself a while ago as a replacement for</i><br>
<i>&gt; this "do_dummy_scan" stuff, but it has some disadvantages.</i><br>
<i>&gt; </i><br>
<i>&gt; In particular this command is used for every scan if scanimage is used, and</i><br>
<i>&gt; as you wrote the execution of this command takes some time. On my</i><br>
<i>&gt; own ScanMaker 630 every second "send diagnostics" fails, BTW, with</i><br>
<i>&gt; sense code "lamp failure" :/ .</i><br>
<p>
:-/ ... well, this bug doesn't occur on my scanner.<br>
<br>
Yes, this "send diagnostics" command is annoying, because it keeps<br>
the scanner busy for a rather long time. This is the reason for the<br>
did_self_test flag in my patch. Of course, this flag doesn't help<br>
with scanimage. On the other hand, my patch shouldn't affect your<br>
ScanMaker 630, because do_dummy_scan() returns early for this model.<br>
<p>
<i>&gt; I suggest not to include this patch into sane-1.00, but to remove the</i><br>
<i>&gt; NTRACK and NCALIB changes, and also to introduce an option in the</i><br>
<i>&gt; configuration file to enable/disable the "send diagnostics" command</i><br>
<i>&gt; (but in a later release of the backend).</i><br>
<i>&gt; </i><br>
<i>&gt; Bernd</i><br>
<p>
It would be sufficient to issue the "send diagnostics" command just<br>
once after switching on the scanner. But I didn't find a way to<br>
determine in software whether the scanner acts weirdly or not --<br>
the only method seems to be to manually inspect a scanned image.<br>
<p>
As an alternative, I could write a small stand-alone program that<br>
just issues a "send diagnostics" command. But such a program would<br>
duplicate a lot of functionality of the SANE microtek2 backend and<br>
the SCSI layer. Yet another alternative would be an option settable<br>
via sane_control_option(). But those alternatives would all require<br>
user intervention.<br>
<p>
If you like, I could go ahead and implement the configuration file<br>
option as per your suggestion. I think a similar option to control<br>
do_dummy_scan would also be useful.<br>
<p>
Sebastian<br>
<p>
<pre>
--
___
Sebastian Erdmann /
<a href="mailto:serdmann@cs.tu-berlin.de">serdmann@cs.tu-berlin.de</a> ___|__
<a href="mailto:se@pobox.com">se@pobox.com</a> (_ |
<a href="http://pobox.com/~se">http://pobox.com/~se</a> __) \___
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0177.html">Oliver Rauch: "Re: forwarded message from Richard Stallman"</a>
<li> <b>Next message:</b> <a href="0177.html">Oliver Rauch: "Re: forwarded message from Richard Stallman"</a>
<li> <b>Previous message:</b> <a href="0175.html">Christian Grigis: "Re: Patch for Microtek ScanMaker X6 (microtek2 backend)"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0182.html">Bernd Schroeder: "Re: Patch for Microtek ScanMaker X6 (microtek2 backend)"</a>
<li> <b>Reply:</b> <a href="0182.html">Bernd Schroeder: "Re: Patch for Microtek ScanMaker X6 (microtek2 backend)"</a>
<!-- reply="end" -->
</ul>