sane-project-website/old-archive/1999-12/0188.html

115 wiersze
6.2 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="Tue Dec 28 13:35:35 1999 PST" -->
<!-- sent="Tue, 28 Dec 1999 16:36:45 -0600 (CST)" -->
<!-- name="David E. Nelson" -->
<!-- email="dnelson@jump.net" -->
<!-- subject="Re: Volunteer for back end development - excellent info in this msg" -->
<!-- id="" -->
<!-- inreplyto="199912282028.MAA18037@mail11.bigmailbox.com" -->
<title>sane-devel: Re: Volunteer for back end development - excellent info in this msg</title>
<h1>Re: Volunteer for back end development - excellent info in this msg</h1>
<b>David E. Nelson</b> (<a href="mailto:dnelson@jump.net"><i>dnelson@jump.net</i></a>)<br>
<i>Tue, 28 Dec 1999 16:36:45 -0600 (CST)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#188">[ date ]</a><a href="index.html#188">[ thread ]</a><a href="subject.html#188">[ subject ]</a><a href="author.html#188">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0189.html">Ekkard Gerlach: "Re: can't compile sane 1.00 with pgcc-2.91.66"</a>
<li> <b>Previous message:</b> <a href="0187.html">Adrian Perez Jorge: "Re: Volunteer for back end development - excellent info in this msg"</a>
<li> <b>In reply to:</b> <a href="0187.html">Adrian Perez Jorge: "Re: Volunteer for back end development - excellent info in this msg"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0195.html">Adrian Perez Jorge: "Re: Volunteer for back end development - excellent info in this msg"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Hi Adrian,<br>
<p>
Comments below...<br>
<p>
On Tue, 28 Dec 1999, Adrian Perez Jorge wrote:<br>
<p>
<i>&gt; Dear Mat,</i><br>
<i>&gt; Dear David,</i><br>
<i>&gt; </i><br>
<i>&gt; I would be very pleased if you, Mat, could tell me who are you trying</i><br>
<i>&gt; to read/write `lm9830' registers. Initialy, I was confused and I</i><br>
<i>&gt; thought HP4200C was using `lm9831'---because it has an USB interface---</i><br>
<i>&gt; and I was trying to read/write &lt;reg address&gt;+&lt;value&gt; to the</i><br>
<i>&gt; `/dev/usbscanner' file. Now, I know I was wrong. I can't believe my</i><br>
<i>&gt; HP4200C scanner is really a parallel port scanner hacked with some USB</i><br>
<i>&gt; interface... (but it's quick!)</i><br>
<p>
Funky ain't it....<br>
<p>
<i>&gt; Well.. the main problem is: then how this interface works?</i><br>
<i>&gt; </i><br>
<i>&gt; I have been tracing (debugger) the Windowze driver (`hpad32.dll').</i><br>
<i>&gt; I have the initial values of `lm9830' registers that this driver</i><br>
<i>&gt; writes (from 08-5f), and I have seen the driver sending the '99 66 cc</i><br>
<i>&gt; 33' sequence (switching transparent mode).</i><br>
<p>
Good. The lm9830 docs support this.<br>
<p>
<i>&gt; Now, I think write/read operations to lm930 registers doesn't use bulk</i><br>
<i>&gt; transfers; the Windoze driver uses `control vendor requests' (note</i><br>
<i>&gt; that I'm not an USB expert at all.), and I think (David, correct me)</i><br>
<i>&gt; Linux usbscanner driver uses bulk transfers to communicate with the</i><br>
<i>&gt; scanner.</i><br>
<p>
Hmmmm...control xfers. This could be interesting. Yes, scanner.c uses<br>
bulk in/out devices when xfering the images.<br>
<p>
If control xfers are in fact being used, I could send those chars when the<br>
4200 is detected and configured. I wonder if this would take the 9830 out<br>
of transparency mode and allow the bulk pipes to be accessible. Sounds<br>
like an experiment for this evening. Why else would the device report two<br>
bulk endpoints (one each for input and output). Besides, ctrl endpoints<br>
aren't designed for large data xfers.<br>
<p>
<i>&gt; Well... as far as I have read in the SANE Standard Version (1.01), yes</i><br>
<i>&gt; you can switch sane backends using dynamic linking (See `Attaching to a</i><br>
<i>&gt; SANE backend', Section 3.1).</i><br>
<i>&gt; </i><br>
<i>&gt; I don't know if you mean, for example, that developing a sane backend</i><br>
<i>&gt; for `lm9830', using an USB interface like the HP4200C, should also work</i><br>
<i>&gt; with a `lm9830-based' scanner but with a parallel port interface.</i><br>
<i>&gt; </i><br>
<i>&gt; If the above is what you mean, I think the best/normal way to do this</i><br>
<i>&gt; is to separate the device communication protocol implementing a kernel</i><br>
<i>&gt; device driver, like the `scanner.o' module. This device driver should</i><br>
<i>&gt; supply a `/dev/&lt;iface&gt;' file, and then the SANE backend would</i><br>
<i>&gt; write/read to this file in an uniform way. This file should be</i><br>
<i>&gt; supplied to the backend as an option. For example, using a parallel</i><br>
<i>&gt; port interface, a module called `ppscanner.o' could support a</i><br>
<i>&gt; `/dev/ppscanner' file, and then, a parameter in `lm9830.conf' for the</i><br>
<i>&gt; `lm9830.so' SANE backend could point to this file. If we were using</i><br>
<i>&gt; an USB inteface, this option should then point to `/dev/usbscanner'.</i><br>
<i>&gt; </i><br>
<i>&gt; What do you (all) think about this?</i><br>
<p>
I think that when the 4200 is plugged in, the device driver should take it<br>
out of transparency mode (if the above works w/ regards to taking it out<br>
of xparency mode). The only difference between the 9830 and 9831 is the<br>
interface method so the backend should not care. If a backend were to be<br>
developed, this difference should be hidden, don't you think?<br>
<p>
Regards,<br>
/\/elson<br>
<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="0189.html">Ekkard Gerlach: "Re: can't compile sane 1.00 with pgcc-2.91.66"</a>
<li> <b>Previous message:</b> <a href="0187.html">Adrian Perez Jorge: "Re: Volunteer for back end development - excellent info in this msg"</a>
<li> <b>In reply to:</b> <a href="0187.html">Adrian Perez Jorge: "Re: Volunteer for back end development - excellent info in this msg"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0195.html">Adrian Perez Jorge: "Re: Volunteer for back end development - excellent info in this msg"</a>
<!-- reply="end" -->
</ul>