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

210 wiersze
8.0 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Mon Nov 30 15:07:44 1998 PST" -->
<!-- sent="Mon, 30 Nov 1998 22:49:26 +0000" -->
<!-- name="Collin Tree" -->
<!-- email="coltree@key.net.au" -->
<!-- subject="Re: Mustek 600 II N" -->
<!-- id="" -->
<!-- inreplyto="Mustek 600 II N" -->
<title>sane-devel: Re: Mustek 600 II N</title>
<h1>Re: Mustek 600 II N</h1>
<b>Collin Tree</b> (<a href="mailto:coltree@key.net.au"><i>coltree@key.net.au</i></a>)<br>
<i>Mon, 30 Nov 1998 22:49:26 +0000</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#297">[ date ]</a><a href="index.html#297">[ thread ]</a><a href="subject.html#297">[ subject ]</a><a href="author.html#297">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0298.html">John Brush: "Microtek E3 and sane OS/2, anyone??"</a>
<li> <b>Previous message:</b> <a href="0296.html">Georg Huettenegger: "Re: question concerning mustek paragon 600 II CD"</a>
<li> <b>Maybe in reply to:</b> <a href="0178.html">Collin Tree: "Mustek 600 II N"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
This is a multi-part message in MIME format.<br>
--------------FB12669CA40E756163819389<br>
Content-Type: text/plain; charset=us-ascii<br>
Content-Transfer-Encoding: 7bit<br>
<p>
Andreas Czechanowski wrote:<br>
<p>
<i>&gt; Try this one mustek.conf:</i><br>
<i>&gt; </i><br>
<i>&gt; 0x2ab</i><br>
<i>&gt; option strip-height 1</i><br>
<i>&gt; option linedistance-fix</i><br>
<i>&gt; option lineart-fix</i><br>
<i>&gt; </i><br>
<i>&gt; Note the "0x" before the I/O address, and also note that it is the</i><br>
<i>&gt; first line in the mustek.conf that contains the address.</i><br>
<i>&gt; I don't know if 0x2ab is valid, bui I think you got it from the docs</i><br>
<p>
Thanks Andreas the address was 0x32b for my setup<br>
The scanner now lights up, but when I attempt a scan<br>
it just sits there. The light stays on in the scanner<br>
but no movement. <br>
<p>
Then I read the message from Hakan Lennestal re:Paragon 600IIN<br>
about applying patches by Henning Meier-Geinitz - 14 April 1998.<br>
<p>
It covers a patch to mustek.c to fix the colour scan problem, <br>
and the patch to sanei_ab306.c which gets it scanning consistently.<br>
<p>
<p>
<p>
I am using Debian 2.0 which has sane 0.72 installed.<br>
I downloaded sane-0.72.tar.gz, extracted, patched, ./configure, make,<br>
make install, then cp -f /usr/local/lib/libsane-mustek* /usr/lib,<br>
deleted the new install, and away we go<br>
mustek.conf -<br>
0x32b <br>
<p>
<p>
Thanks to all,<br>
Colin<br>
--------------FB12669CA40E756163819389<br>
Content-Type: text/plain; charset=us-ascii; name="600IIN.txt"<br>
Content-Transfer-Encoding: 7bit<br>
Content-Disposition: inline; filename="600IIN.txt"<br>
<p>
line-distance correction and mustek 600 II N<br>
<p>
Henning Meier-Geinitz (<a href="mailto:henningmg@gmx.de">henningmg@gmx.de</a>)<br>
Tue, 14 Apr 1998 00:01:46 +0200<br>
<p>
* Messages sorted by: [ date ][ thread ][ subject ][ author ]<br>
* Next message: Henning Meier-Geinitz: "Performance mustek 600 II N"<br>
* Previous message: Oliver.Rauch@Wolfsburg.DE: "Re: /proc/scsi/scsi"<br>
<p>
I looked into the line-distance correction code for the mustek 600 II<br>
N in mustek.c. Some details are explained in an earlier article. With<br>
the patch color works somewhat, but there are missing lines at the<br>
end. The problem is: The scanner sends data one line after the other<br>
in the following manner (Example):<br>
<p>
R-R-R-R-B-B-R-B-G-R-B-G ... R-G-B-R-G-B<br>
<p>
If n is the distance between two CCD lines, sane loses 3*n data lines<br>
at the end of the scan. The line-distance code in sane asumes the<br>
following:<br>
<p>
R-R-R-R-B-B-R-B-G-R-B-G ... R-G-B-G-B-G-B-G-G-G<br>
<p>
If I understood correctly, mustek.c would have to scan n more lines<br>
then specified to get the full sized image. I don't know most<br>
internals of mustek.c so I can't do this.<br>
<p>
By the way: My 600 II N doesn't need the line-distance-fix, the<br>
line-distance values which it sends are correct. I don't know, if this<br>
applies for all 600 II N.<br>
<p>
The following patch corrects the color scanning problem with the 600<br>
II N as far as I can do it. It will (hopefully) fix the problem with<br>
not ignoring empty lines in mustek.conf. And I put a usleep in<br>
sanei_ab306.c. This will allow to run sane without turning on<br>
debugging (which was the only way to get sane with the 600 II N to<br>
work for me). I don't know, why it works, but it does.<br>
<p>
diff -ru sane-0.72.orig/backend/mustek.c sane-0.72/backend/mustek.c<br>
--- sane-0.72.orig/backend/mustek.c Tue Mar 3 04:02:43 1998<br>
+++ sane-0.72/backend/mustek.c Mon Apr 13 21:25:53 1998<br>
@@ -1394,7 +1394,7 @@<br>
}<br>
}<br>
<p>
- num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[2];<br>
+ num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[1];<br>
if (num_saved_lines &gt; 0)<br>
/* restore the previously saved lines: */<br>
memcpy (out, s-&gt;ld.buf[0], num_saved_lines * bpl);<br>
@@ -1404,10 +1404,10 @@<br>
if (++s-&gt;ld.lmod3 &gt;= 3)<br>
s-&gt;ld.lmod3 = 0;<br>
<p>
- c = color_seq[s-&gt;ld.lmod3];<br>
+ c = s-&gt;ld.lmod3;<br>
if (s-&gt;ld.index[c] &lt; 0)<br>
++s-&gt;ld.index[c];<br>
- else if (s-&gt;ld.index[c] &lt; s-&gt;params.lines)<br>
+ else /*if (s-&gt;ld.index[c] &lt; s-&gt;params.lines)*/<br>
{<br>
s-&gt;ld.c[c].Qk += s-&gt;ld.peak_res;<br>
if (s-&gt;ld.c[c].Qk &gt; s-&gt;ld.max_value)<br>
@@ -1421,17 +1421,17 @@<br>
DBG (1, "fix_line_distance_pp: lmod3=%d, index=(%d,%d,%d)\n",<br>
s-&gt;ld.lmod3,<br>
s-&gt;ld.index[0], s-&gt;ld.index[1], s-&gt;ld.index[2]);<br>
- num_lines = s-&gt;ld.index[2] - s-&gt;ld.ld_line;<br>
+ num_lines = s-&gt;ld.index[1] - s-&gt;ld.ld_line;<br>
<p>
/* copy away the lines with at least one missing<br>
color component, so that we can interleave them<br>
with new scan data on the next call */<br>
- num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[2];<br>
+ num_saved_lines = s-&gt;ld.index[0] - s-&gt;ld.index[1];<br>
memcpy (s-&gt;ld.buf[0], out + num_lines * bpl,<br>
num_saved_lines * bpl);<br>
<p>
/* notice the number of lines we processed */<br>
- s-&gt;ld.ld_line = s-&gt;ld.index[2];<br>
+ s-&gt;ld.ld_line = s-&gt;ld.index[1];<br>
/* return number of complete (r+g+b) lines */<br>
return num_lines;<br>
}<br>
@@ -2048,11 +2048,11 @@<br>
continue;<br>
<p>
len = strlen (cp);<br>
- if (cp[len - 1] == '\n')<br>
- cp[--len] = '\0';<br>
-<br>
if (!len)<br>
continue; /* ignore empty lines */<br>
+<br>
+ if (cp[len - 1] == '\n')<br>
+ cp[--len] = '\0';<br>
<p>
if (strncmp (cp, "option", 6) == 0 &amp;&amp; isspace (cp[6]))<br>
{<br>
diff -ru sane-0.72.orig/sanei/sanei_ab306.c sane-0.72/sanei/sanei_ab306.c<br>
--- sane-0.72.orig/sanei/sanei_ab306.c Tue Mar 3 03:13:25 1998<br>
+++ sane-0.72/sanei/sanei_ab306.c Mon Apr 13 15:58:02 1998<br>
@@ -196,6 +196,8 @@<br>
ab306_inb (p, base + 1));<br>
while ((ab306_inb (p, base + 1) &amp; 0x20) == 0);<br>
<p>
+ usleep(100000);<br>
+<br>
DBG(4, "ab306_write: writing data\n");<br>
for (i = 0; i &lt; len; ++i)<br>
{<br>
<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>
<p>
* Next message: Henning Meier-Geinitz: "Performance mustek 600 II N"
* Previous message: Oliver.Rauch@Wolfsburg.DE: "Re: /proc/scsi/scsi"
<p>
<p>
<p>
<p>
--------------FB12669CA40E756163819389--
<p>
<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="0298.html">John Brush: "Microtek E3 and sane OS/2, anyone??"</a>
<li> <b>Previous message:</b> <a href="0296.html">Georg Huettenegger: "Re: question concerning mustek paragon 600 II CD"</a>
<li> <b>Maybe in reply to:</b> <a href="0178.html">Collin Tree: "Mustek 600 II N"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>