sane-project-website/old-archive/2001-03/0124.html

156 wiersze
6.2 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: Have a &quot;scan&quot; button? Read this...</TITLE>
<META NAME="Author" CONTENT="abel deuring (adeuring@gmx.net)">
<META NAME="Subject" CONTENT="Re: Have a &quot;scan&quot; button? Read this...">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Have a &quot;scan&quot; button? Read this...</H1>
<!-- received="Thu Mar 8 14:39:19 2001" -->
<!-- isoreceived="20010308223919" -->
<!-- sent="Fri, 09 Mar 2001 00:10:18 +0100" -->
<!-- isosent="20010308231018" -->
<!-- name="abel deuring" -->
<!-- email="adeuring@gmx.net" -->
<!-- subject="Re: Have a &quot;scan&quot; button? Read this..." -->
<!-- id="3AA8115A.60B4700F@gmx.net" -->
<!-- inreplyto="20010308201920.A7828@aruba.remote.org" -->
<STRONG>From:</STRONG> abel deuring (<A HREF="mailto:adeuring@gmx.net?Subject=Re:%20Have%20a%20&quot;scan&quot;%20button?%20Read%20this...&In-Reply-To=&lt;3AA8115A.60B4700F@gmx.net&gt;"><EM>adeuring@gmx.net</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu Mar 08 2001 - 15:10:18 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0123.html">Frederik Ramm: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0117.html">Frederik Ramm: "Have a &quot;scan&quot; button? Read this..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#124">[ date ]</A>
<A HREF="index.html#124">[ thread ]</A>
<A HREF="subject.html#124">[ subject ]</A>
<A HREF="author.html#124">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Frederik Ramm wrote:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Hi,
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; my scanner has a &quot;scan&quot; button that (at least using their Windows
</EM><BR>
<EM>&gt; driver) can be used to launch certain programs on the host system.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; I've written something similar for the SANE environment. It's called
</EM><BR>
<EM>&gt; &quot;sensed&quot; and works by sending a SCSI &quot;REQUEST SENSE&quot; command to the
</EM><BR>
<EM>&gt; scanner in regular intervals (every 2 sec). If the response indicates
</EM><BR>
<EM>&gt; that the scan button has been pressed, a program is launched. (This
</EM><BR>
<EM>&gt; would usually mean scanadf or scanimage, maybe called by a shell
</EM><BR>
<EM>&gt; script that stores the results away properly.)
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; The current, initial version is very crude, has only been tested with
</EM><BR>
<EM>&gt; my Fujitsu M3091DCd scanner, and it doesn't even have a Makefile etc.
</EM><BR>
<EM>&gt; (it relies on the SANE SCSI core so you'll have to stuff it into the
</EM><BR>
<EM>&gt; &quot;backend&quot; directory, compile and link with libsanei.a).
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; It's here: <A HREF="http://www.remote.org/frederik/projects/software/sane/">http://www.remote.org/frederik/projects/software/sane/</A>
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Feel free to play with it. If anyone's willing to help me make this a
</EM><BR>
<EM>&gt; proper part of SANE, including it in the &quot;tools&quot; directory, putting it
</EM><BR>
<EM>&gt; in CVS and tweaking the Makefiles accordingly, you're most welcome.
</EM><BR>
<EM>&gt; But perhaps that should wait for a version that is more configurable
</EM><BR>
<EM>&gt; and supports more scanners.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; For the SCSI gurus out there, is there any potential disruption by
</EM><BR>
<EM>&gt; sending REQUEST SENSE to a device every two seconds? I noticed that
</EM><BR>
<EM>&gt; while someone has &quot;grabbed&quot; the device, the call blocks anyway (which
</EM><BR>
<EM>&gt; doesn't hurt my program). sensed does not attempt to grab and release
</EM><BR>
<EM>&gt; the device; should it?
</EM><BR>
<P>Frederik,
<BR>
<P>Two minor two problems might occur:
<BR>
<P>1. Older versions of the Linux aha152x driver refused to accept a
<BR>
REQUEST SENSE command. This is fixed in recent versions; I don't know,
<BR>
if other adapter driver have similar restrictions.
<BR>
<P>2. sanei_scsi_open opens the device file O_EXCL. So, if a frontend is
<BR>
started independently from you daemon, this call might fail, if this
<BR>
call happens, while your daemon is accessing the scanner.
<BR>
<P>Abel
<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:%20Have%20a%20&quot;scan&quot;%20button?%20Read%20this...&In-Reply-To=&lt;3AA8115A.60B4700F@gmx.net&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0123.html">Frederik Ramm: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0117.html">Frederik Ramm: "Have a &quot;scan&quot; button? Read this..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#124">[ date ]</A>
<A HREF="index.html#124">[ thread ]</A>
<A HREF="subject.html#124">[ subject ]</A>
<A HREF="author.html#124">[ 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 Mar 08 2001 - 14:40:23 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>