kopia lustrzana https://gitlab.com/sane-project/website
261 wiersze
9.8 KiB
HTML
261 wiersze
9.8 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: Writing Fujitsu M3091 backend</TITLE>
|
||
<META NAME="Author" CONTENT="Frederik Ramm (frederik@remote.org)">
|
||
<META NAME="Subject" CONTENT="Writing Fujitsu M3091 backend">
|
||
</HEAD>
|
||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
||
<H1>Writing Fujitsu M3091 backend</H1>
|
||
<!-- received="Tue Feb 27 05:25:02 2001" -->
|
||
<!-- isoreceived="20010227132502" -->
|
||
<!-- sent="Tue, 27 Feb 2001 13:42:17 +0000" -->
|
||
<!-- isosent="20010227134217" -->
|
||
<!-- name="Frederik Ramm" -->
|
||
<!-- email="frederik@remote.org" -->
|
||
<!-- subject="Writing Fujitsu M3091 backend" -->
|
||
<!-- id="20010227134217.A9112@aruba.remote.org" -->
|
||
<STRONG>From:</STRONG> Frederik Ramm (<A HREF="mailto:frederik@remote.org?Subject=Re:%20Writing%20Fujitsu%20M3091%20backend&In-Reply-To=<20010227134217.A9112@aruba.remote.org>"><EM>frederik@remote.org</EM></A>)<BR>
|
||
<STRONG>Date:</STRONG> Tue Feb 27 2001 - 05:42:17 PST
|
||
<P>
|
||
<!-- next="start" -->
|
||
<LI><STRONG>Next message:</STRONG> <A HREF="0233.html">Davis, Tom: "Fujitsu fi-4750C Backend Project"</A>
|
||
<UL>
|
||
<LI><STRONG>Previous message:</STRONG> <A HREF="0231.html">Marian Eichholz: "Poll:ScanMaker3600"</A>
|
||
<!-- nextthread="start" -->
|
||
<LI><STRONG>Next in thread:</STRONG> <A HREF="0234.html">Nick Lamb: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0234.html">Nick Lamb: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0237.html">Oliver Rauch: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0245.html">Mick Barry: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0247.html">Tom Martone: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<!-- reply="end" -->
|
||
<LI><STRONG>Messages sorted by:</STRONG>
|
||
<A HREF="date.html#232">[ date ]</A>
|
||
<A HREF="index.html#232">[ thread ]</A>
|
||
<A HREF="subject.html#232">[ subject ]</A>
|
||
<A HREF="author.html#232">[ author ]</A>
|
||
</UL>
|
||
<HR NOSHADE><P>
|
||
<!-- body="start" -->
|
||
<P>
|
||
Hi,
|
||
<BR>
|
||
<P> if anybody has (or is writing) a driver for the Fujitsu M3091,
|
||
<BR>
|
||
please send me an eMail and disregard the remainder of this message.
|
||
<BR>
|
||
Otherwise, read on:
|
||
<BR>
|
||
<P>My background:
|
||
<BR>
|
||
Reasonable C programming experience but no SCSI drivers or SANE
|
||
<BR>
|
||
stuff yet.
|
||
<BR>
|
||
<P>My scanner:
|
||
<BR>
|
||
Fujitsu M3091DCd, a scanner that looks more like a fax machine and
|
||
<BR>
|
||
is ADF-only, supports 50-300 by 50-600 dpi in line art, grayscale
|
||
<BR>
|
||
and 24bit color, 128 kB cache and duplex (!). I am in possession of
|
||
<BR>
|
||
the full SCSI command documentation for that specific scanner.
|
||
<BR>
|
||
<P>My goal:
|
||
<BR>
|
||
To get as much as possible of that working with SANE. Below is a
|
||
<BR>
|
||
report of my current progress, and I would be very happy about any
|
||
<BR>
|
||
and all sort of hints, tips, tricks, pitfalls, spiritual guidance,
|
||
<BR>
|
||
links to documentation etc :-)
|
||
<BR>
|
||
<P>With minor changes, I got Randolph Bentson's M3096 driver to work with
|
||
<BR>
|
||
this scanner supporting the full resolution but neither color nor
|
||
<BR>
|
||
duplex. I was thinking about using that driver as a basis and make
|
||
<BR>
|
||
extensions as necessary, but I have some questions for the SANE
|
||
<BR>
|
||
experts here before I go on.
|
||
<BR>
|
||
<P>Question 1 - How to do duplex scanning.
|
||
<BR>
|
||
<P>To use the duplex mode, I have to send an extended SET WINDOW command
|
||
<BR>
|
||
to the scanner which should be no problem. The question is, how do I
|
||
<BR>
|
||
then feed the two images into SANE? As far as I can see from the
|
||
<BR>
|
||
existing driver, a subprocess gets started to read more-or-less raw
|
||
<BR>
|
||
binary data from the scanner, which is then passed via a pipe to the
|
||
<BR>
|
||
calling program; it seems to "leave" the backend via the sane_read
|
||
<BR>
|
||
function. Since the scanner has dual scan heads and only 128 kB of
|
||
<BR>
|
||
cache, in duplex mode it will send a data stream that contains two
|
||
<BR>
|
||
interspersed images. I would be able to separate them on reading, but
|
||
<BR>
|
||
what next? How do I tell the SANE middleware (or front-end for that
|
||
<BR>
|
||
matter) that I actually have TWO images? How would a front-end (like
|
||
<BR>
|
||
scanimage, the only one I've used so far) cope?
|
||
<BR>
|
||
<P>If SANE doesn't support that, I could introduce a new parameter that
|
||
<BR>
|
||
controls whether the front or rear side is to be scanned, and each
|
||
<BR>
|
||
page would have to be run through the scanner twice. A waste, but
|
||
<BR>
|
||
possible.
|
||
<BR>
|
||
<P>I've grepped for "duplex" in the existing backends (1.0.4) but found
|
||
<BR>
|
||
nothing.
|
||
<BR>
|
||
<P>Question 2 - How to do the color thing.
|
||
<BR>
|
||
<P>This is just a quick question in case somebody has noticed something
|
||
<BR>
|
||
similar with their scanners. When I read color data from the scanner,
|
||
<BR>
|
||
I get one row of "R" values, then one row of "G" values, then one row
|
||
<BR>
|
||
of "B" values, and so on. These are slightly offset, e.g. the first
|
||
<BR>
|
||
row of "R" values have to be paired with the fifth row of "G" and the
|
||
<BR>
|
||
ninth row of "B" values or so (the documentation is detailed but at
|
||
<BR>
|
||
the same time not very clear on that - <A HREF="http://www.fujitsu-europe.com/">http://www.fujitsu-europe.com/</A>
|
||
<BR>
|
||
home/support/scanner/manuals/M3091dc.scsi.en.pdf, pp. 75-77). So far,
|
||
<BR>
|
||
so good, but in reality it seems that after a certain number of these
|
||
<BR>
|
||
R row/G row/B row groups I suddenly get TWO R rows following each
|
||
<BR>
|
||
other, and then on like before, and the same phenomenon again every x
|
||
<BR>
|
||
blocks. I haven't fully investigated that and don't really know what
|
||
<BR>
|
||
to make of it yet.
|
||
<BR>
|
||
<P>I do understand that I'll have to get all the bytes into the right
|
||
<BR>
|
||
order before passing them on to the SANE middleware. Once I found out
|
||
<BR>
|
||
what the correct order is, that should be no problem. However I don't
|
||
<BR>
|
||
know how the scanner deals with the specified window size in relation
|
||
<BR>
|
||
to the sensor offset. If, as stated above, the R/G/B sensors are
|
||
<BR>
|
||
offset by 4 lines each, that means that there are 8 lines of
|
||
<BR>
|
||
incomplete data at the beginning and the end of the data stream. If I
|
||
<BR>
|
||
request an image of, say, 100 pixels in height, will the scanner then
|
||
<BR>
|
||
give me 100 of which only 84 are fully usable, or will it give me 116?
|
||
<BR>
|
||
<P>Randolph has suggested looking at the SP15C driver which contains
|
||
<BR>
|
||
color support, and I'll do that.
|
||
<BR>
|
||
<P>Question 3 - How to support the "hot button(s)"
|
||
<BR>
|
||
<P>This is probably beyond the scope of SANE but maybe somebody knows
|
||
<BR>
|
||
something. The scanner has the following controls: a "scan" button, a
|
||
<BR>
|
||
"duplex" button, a "send to" button, and a number dial that can select
|
||
<BR>
|
||
numbers 0-9. The scanner does nothing with these buttons; the obvious
|
||
<BR>
|
||
purpose (as supported by some Windows software that comes with it) is
|
||
<BR>
|
||
that you can insert a document and then, by pressing one of them, have
|
||
<BR>
|
||
your computer launch a program that does something. (My idea of use
|
||
<BR>
|
||
would be assigning categories to the numbers, i.e. 1=bills, 2=bank
|
||
<BR>
|
||
letters, 3=personal letters, etc., and then use the number dial and
|
||
<BR>
|
||
"send" button on the scanner to store documents away in the proper
|
||
<BR>
|
||
folders on my Linux box.)
|
||
<BR>
|
||
<P>The SCSI docs tell me that there are some extended fields in the
|
||
<BR>
|
||
scanner's response to the INQUIRY command that tell you if one of
|
||
<BR>
|
||
these buttons has been pressed. The respective fields are "true" for
|
||
<BR>
|
||
three seconds after button press. So I imagine I'd need some sort of
|
||
<BR>
|
||
"inquiry daemon" that sends the command to the scanner every 2 seconds
|
||
<BR>
|
||
or so and then launches whatever program has been defined when certain
|
||
<BR>
|
||
fields in the response data have certain values.
|
||
<BR>
|
||
<P>Does such a program already exist? If not, can somebody point me to a
|
||
<BR>
|
||
very very simple program that (outside of the SANE context) sends a
|
||
<BR>
|
||
simple SCSI command to a device and evaluates the response, so that I
|
||
<BR>
|
||
could work from there?
|
||
<BR>
|
||
<P>Bye
|
||
<BR>
|
||
Frederik
|
||
<BR>
|
||
<P><PRE>
|
||
--
|
||
Frederik Ramm ## eMail <A HREF="mailto:frederik@remote.org?Subject=Re:%20Writing%20Fujitsu%20M3091%20backend&In-Reply-To=<20010227134217.A9112@aruba.remote.org>">frederik@remote.org</A> ## N57<35>48.10' W005<30>40.32'
|
||
<P><P>--
|
||
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:%20Writing%20Fujitsu%20M3091%20backend&In-Reply-To=<20010227134217.A9112@aruba.remote.org>">majordomo@mostang.com</A>
|
||
</PRE>
|
||
<P><!-- body="end" -->
|
||
<HR NOSHADE>
|
||
<UL>
|
||
<!-- next="start" -->
|
||
<LI><STRONG>Next message:</STRONG> <A HREF="0233.html">Davis, Tom: "Fujitsu fi-4750C Backend Project"</A>
|
||
<LI><STRONG>Previous message:</STRONG> <A HREF="0231.html">Marian Eichholz: "Poll:ScanMaker3600"</A>
|
||
<!-- nextthread="start" -->
|
||
<LI><STRONG>Next in thread:</STRONG> <A HREF="0234.html">Nick Lamb: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0234.html">Nick Lamb: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0237.html">Oliver Rauch: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0245.html">Mick Barry: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<LI><STRONG>Reply:</STRONG> <A HREF="0247.html">Tom Martone: "Re: Writing Fujitsu M3091 backend"</A>
|
||
<!-- reply="end" -->
|
||
<LI><STRONG>Messages sorted by:</STRONG>
|
||
<A HREF="date.html#232">[ date ]</A>
|
||
<A HREF="index.html#232">[ thread ]</A>
|
||
<A HREF="subject.html#232">[ subject ]</A>
|
||
<A HREF="author.html#232">[ 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>Tue Feb 27 2001 - 05:27:08 PST</EM>
|
||
</EM>
|
||
</SMALL>
|
||
</BODY>
|
||
</HTML>
|