kopia lustrzana https://gitlab.com/sane-project/website
220 wiersze
7.5 KiB
HTML
220 wiersze
7.5 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>sane-devel: Re: HP 7400c info / Minolta Scan Dual II</TITLE>
|
||
|
<META NAME="Author" CONTENT="EdHamrick@aol.com (EdHamrick@aol.com)">
|
||
|
<META NAME="Subject" CONTENT="Re: HP 7400c info / Minolta Scan Dual II">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
|
<H1>Re: HP 7400c info / Minolta Scan Dual II</H1>
|
||
|
<!-- received="Thu May 3 13:07:27 2001" -->
|
||
|
<!-- isoreceived="20010503200727" -->
|
||
|
<!-- sent="Thu, 3 May 2001 16:16:38 EDT" -->
|
||
|
<!-- isosent="20010503201638" -->
|
||
|
<!-- name="EdHamrick@aol.com" -->
|
||
|
<!-- email="EdHamrick@aol.com" -->
|
||
|
<!-- subject="Re: HP 7400c info / Minolta Scan Dual II" -->
|
||
|
<!-- id="b9.dcd34b0.282316a6@aol.com" -->
|
||
|
<!-- inreplyto="HP 7400c info / Minolta Scan Dual II" -->
|
||
|
<STRONG>From:</STRONG> <A HREF="mailto:EdHamrick@aol.com?Subject=Re:%20HP%207400c%20info%20/%20Minolta%20Scan%20Dual%20II&In-Reply-To=<b9.dcd34b0.282316a6@aol.com>"><EM>EdHamrick@aol.com</EM></A><BR>
|
||
|
<STRONG>Date:</STRONG> Thu May 03 2001 - 13:16:38 PDT
|
||
|
<P>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0053.html">Stephen Williams: "Re: SANE API & file format"</A>
|
||
|
<UL>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0051.html">Henning Meier-Geinitz: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#52">[ date ]</A>
|
||
|
<A HREF="index.html#52">[ thread ]</A>
|
||
|
<A HREF="subject.html#52">[ subject ]</A>
|
||
|
<A HREF="author.html#52">[ author ]</A>
|
||
|
</UL>
|
||
|
<HR NOSHADE><P>
|
||
|
<!-- body="start" -->
|
||
|
<P>
|
||
|
In a message dated 5/3/2001 4:52:31 AM EST, <A HREF="mailto:Oliver.Neukum@lrz.uni-muenchen.de?Subject=Re:%20HP%207400c%20info%20/%20Minolta%20Scan%20Dual%20II&In-Reply-To=<b9.dcd34b0.282316a6@aol.com>">Oliver.Neukum@lrz.uni-muenchen.de</A>
|
||
|
<BR>
|
||
|
writes:
|
||
|
<BR>
|
||
|
<P><EM>> Our disagreement seems to be rather in the type of scanners that should
|
||
|
</EM><BR>
|
||
|
<EM>> appear as scsi devices to user space.
|
||
|
</EM><BR>
|
||
|
<EM>> If I understand Ed correctly, to him that would be all of them.
|
||
|
</EM><BR>
|
||
|
<P>That's correct - but I'd make it a generic scsi->usb driver that
|
||
|
<BR>
|
||
|
could easily be modified to add support for other usb peripherals
|
||
|
<BR>
|
||
|
that encapsulate scsi over usb.
|
||
|
<BR>
|
||
|
<P>The reason USB is so messed up on Linux is that too many people
|
||
|
<BR>
|
||
|
took the easy way out instead of planning for the future. For instance,
|
||
|
<BR>
|
||
|
whoever wrote the scanner.c driver didn't even add the capability to
|
||
|
<BR>
|
||
|
ask the device what it's VID/PID is or to allow reading the interrupt
|
||
|
<BR>
|
||
|
channel. As a result, there are a slew of barely working drivers
|
||
|
<BR>
|
||
|
for scanners, and even these are kludges that are poorly tested
|
||
|
<BR>
|
||
|
(i.e. the HP5300 driver doesn't work with the Scan Dual II).
|
||
|
<BR>
|
||
|
<P>The right way to handle USB scanners in the kernel is a single
|
||
|
<BR>
|
||
|
device driver that does scsi->usb translation.
|
||
|
<BR>
|
||
|
<P><EM>> Firewire is a better design. There is no question about that.
|
||
|
</EM><BR>
|
||
|
<EM>> USB has no common protocol for transfering SCSI commands.
|
||
|
</EM><BR>
|
||
|
<EM>> In fact I know of _six_ incompatible protocols to do that.
|
||
|
</EM><BR>
|
||
|
<P>These are the ones I know of:
|
||
|
<BR>
|
||
|
<P> 1) HP/Epson (read/write bulk endpoints)
|
||
|
<BR>
|
||
|
2) Avision
|
||
|
<BR>
|
||
|
3) Acer/AGFA SnapScan
|
||
|
<BR>
|
||
|
4) Nikon LS-40
|
||
|
<BR>
|
||
|
5) Microtek (actually at least 2 different types)
|
||
|
<BR>
|
||
|
6) Canon FB-series
|
||
|
<BR>
|
||
|
<P>For #1, the driver needs to emulate the scsi INQUIRY
|
||
|
<BR>
|
||
|
command based on the VID/PID, but this is only a few
|
||
|
<BR>
|
||
|
lines of code.
|
||
|
<BR>
|
||
|
<P><EM>> The attempt to unify them leads to a monster like usb-storage.
|
||
|
</EM><BR>
|
||
|
<EM>> I wanted to add the microtek protocol to usb-storage, but Matt vetoed that.
|
||
|
</EM><BR>
|
||
|
<P>It's open source - you can add what you want to whatever you
|
||
|
<BR>
|
||
|
want. Working code (if it's more elegant than the code it replaces) rules.
|
||
|
<BR>
|
||
|
<P><EM>> I could trivially merge microtek and hp5300 to a common driver.
|
||
|
</EM><BR>
|
||
|
<EM>> However there would still be the generic driver (scanner.c) and
|
||
|
</EM><BR>
|
||
|
<EM>> the two drivers currently under development for even stranger scanners.
|
||
|
</EM><BR>
|
||
|
<P>The only thing remaining for scanner.c is Epson and HP, and
|
||
|
<BR>
|
||
|
these are better done in the single scsi->usb driver.
|
||
|
<BR>
|
||
|
<P><EM>> Reducing the number of drivers from 5 to 4 isn't IMHO worth the trouble.
|
||
|
</EM><BR>
|
||
|
<EM>> Unless you go to one, you need to look it up anyway, thus simplicity in
|
||
|
</EM><BR>
|
||
|
<EM>> kernel is more important.
|
||
|
</EM><BR>
|
||
|
<P>Yes, going to one scsi->usb driver is the way to go (including
|
||
|
<BR>
|
||
|
storage).
|
||
|
<BR>
|
||
|
<P><EM>> As for configuration, loading a driver for your usb scanner is the same
|
||
|
</EM><BR>
|
||
|
<EM>> trouble as loading a driver for the controller your scsi scanner is
|
||
|
</EM><BR>
|
||
|
attached
|
||
|
<BR>
|
||
|
<EM>> to.
|
||
|
</EM><BR>
|
||
|
<P>The problem is that there's too much user-configuration that needs
|
||
|
<BR>
|
||
|
to be done. A user should just run a scanner program, and the
|
||
|
<BR>
|
||
|
scanner program should determine what scanners are connected
|
||
|
<BR>
|
||
|
to the system.
|
||
|
<BR>
|
||
|
<P><EM>> After that for microtek and hp5300 then you can probe as for conventional
|
||
|
</EM><BR>
|
||
|
<EM>> scsi. Generic usb scanners are a problem though.
|
||
|
</EM><BR>
|
||
|
<P>They're only a problem because the user-mode interface to the
|
||
|
<BR>
|
||
|
usb subsystem is so primitive on Linux, and you can't even get
|
||
|
<BR>
|
||
|
the VID/PID of a scanner from user space.
|
||
|
<BR>
|
||
|
<P><EM>> For generic scanners you _could_ go the easy route.
|
||
|
</EM><BR>
|
||
|
<EM>> Emulate INQUIRY based on a table of vend./prod. ids and
|
||
|
</EM><BR>
|
||
|
<EM>> map read/write over usb to SCSI_READ/SCSI_WRITE.
|
||
|
</EM><BR>
|
||
|
<P>Yes, this is what I do in VueScan on Windows and Mac OS.
|
||
|
<BR>
|
||
|
It works quite nicely. Just run VueScan on Windows, Linux
|
||
|
<BR>
|
||
|
or Mac OS with any USB scanner and turn on the log file (a
|
||
|
<BR>
|
||
|
dump of the scsi commands) and you'll see this. VueScan
|
||
|
<BR>
|
||
|
works with scanner.c on Linux, but you have to tell it the
|
||
|
<BR>
|
||
|
device name, the VID and the PID. It doesn't work with
|
||
|
<BR>
|
||
|
Avision scanners (Scan Dual II, 5300C, 7400C) on Linux
|
||
|
<BR>
|
||
|
because scanner.c doesn't allow reading the interrupt
|
||
|
<BR>
|
||
|
pipe.
|
||
|
<BR>
|
||
|
<P><EM>> It can be done. Even the unusual scanners could be handled with vendor
|
||
|
</EM><BR>
|
||
|
<EM>> specific commands. However at some point you end up with a scsi
|
||
|
</EM><BR>
|
||
|
interpreter
|
||
|
<BR>
|
||
|
<EM>> in kernel.
|
||
|
</EM><BR>
|
||
|
<P>It's all very simple table-driven, finite state machine stuff.
|
||
|
<BR>
|
||
|
<P>Regards,
|
||
|
<BR>
|
||
|
Ed Hamrick
|
||
|
<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?Subject=Re:%20HP%207400c%20info%20/%20Minolta%20Scan%20Dual%20II&In-Reply-To=<b9.dcd34b0.282316a6@aol.com>">majordomo@mostang.com</A>
|
||
|
</PRE>
|
||
|
<P><!-- body="end" -->
|
||
|
<HR NOSHADE>
|
||
|
<UL>
|
||
|
<!-- next="start" -->
|
||
|
<LI><STRONG>Next message:</STRONG> <A HREF="0053.html">Stephen Williams: "Re: SANE API & file format"</A>
|
||
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0051.html">Henning Meier-Geinitz: "Re: New backend: UMAX 1220P sane'ification take 1"</A>
|
||
|
<!-- nextthread="start" -->
|
||
|
<!-- reply="end" -->
|
||
|
<LI><STRONG>Messages sorted by:</STRONG>
|
||
|
<A HREF="date.html#52">[ date ]</A>
|
||
|
<A HREF="index.html#52">[ thread ]</A>
|
||
|
<A HREF="subject.html#52">[ subject ]</A>
|
||
|
<A HREF="author.html#52">[ author ]</A>
|
||
|
</UL>
|
||
|
<!-- trailer="footer" -->
|
||
|
<HR NOSHADE>
|
||
|
<P>
|
||
|
<SMALL>
|
||
|
<EM>
|
||
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
||
|
: <EM>Thu May 03 2001 - 13:07:48 PDT</EM>
|
||
|
</EM>
|
||
|
</SMALL>
|
||
|
</BODY>
|
||
|
</HTML>
|