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

129 wiersze
5.7 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: Have a &quot;scan&quot; button? Read this...</TITLE>
<META NAME="Author" CONTENT="Frederik Ramm (frederik@remote.org)">
<META NAME="Subject" CONTENT="Have a &quot;scan&quot; button? Read this...">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Have a &quot;scan&quot; button? Read this...</H1>
<!-- received="Thu Mar 8 11:59:50 2001" -->
<!-- isoreceived="20010308195950" -->
<!-- sent="Thu, 8 Mar 2001 20:19:20 +0000" -->
<!-- isosent="20010308201920" -->
<!-- name="Frederik Ramm" -->
<!-- email="frederik@remote.org" -->
<!-- subject="Have a &quot;scan&quot; button? Read this..." -->
<!-- id="20010308201920.A7828@aruba.remote.org" -->
<STRONG>From:</STRONG> Frederik Ramm (<A HREF="mailto:frederik@remote.org?Subject=Re:%20Have%20a%20&quot;scan&quot;%20button?%20Read%20this...&In-Reply-To=&lt;20010308201920.A7828@aruba.remote.org&gt;"><EM>frederik@remote.org</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu Mar 08 2001 - 12:19:20 PST
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0118.html">Douglas Gilbert: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0116.html">Ulrich Deiters: "Re: 3091 backend: Brightness, Contrast etc."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0118.html">Douglas Gilbert: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0118.html">Douglas Gilbert: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0119.html">Tim Waugh: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0124.html">abel deuring: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#117">[ date ]</A>
<A HREF="index.html#117">[ thread ]</A>
<A HREF="subject.html#117">[ subject ]</A>
<A HREF="author.html#117">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>&nbsp;&nbsp;&nbsp;my scanner has a &quot;scan&quot; button that (at least using their Windows
<BR>
driver) can be used to launch certain programs on the host system.
<BR>
<P>I've written something similar for the SANE environment. It's called
<BR>
&quot;sensed&quot; and works by sending a SCSI &quot;REQUEST SENSE&quot; command to the
<BR>
scanner in regular intervals (every 2 sec). If the response indicates
<BR>
that the scan button has been pressed, a program is launched. (This
<BR>
would usually mean scanadf or scanimage, maybe called by a shell
<BR>
script that stores the results away properly.)
<BR>
<P>The current, initial version is very crude, has only been tested with
<BR>
my Fujitsu M3091DCd scanner, and it doesn't even have a Makefile etc.
<BR>
(it relies on the SANE SCSI core so you'll have to stuff it into the
<BR>
&quot;backend&quot; directory, compile and link with libsanei.a).
<BR>
<P>It's here: <A HREF="http://www.remote.org/frederik/projects/software/sane/">http://www.remote.org/frederik/projects/software/sane/</A>
<BR>
<P>Feel free to play with it. If anyone's willing to help me make this a
<BR>
proper part of SANE, including it in the &quot;tools&quot; directory, putting it
<BR>
in CVS and tweaking the Makefiles accordingly, you're most welcome.
<BR>
But perhaps that should wait for a version that is more configurable
<BR>
and supports more scanners.
<BR>
<P>For the SCSI gurus out there, is there any potential disruption by
<BR>
sending REQUEST SENSE to a device every two seconds? I noticed that
<BR>
while someone has &quot;grabbed&quot; the device, the call blocks anyway (which
<BR>
doesn't hurt my program). sensed does not attempt to grab and release
<BR>
the device; should it?
<BR>
<P>Bye
<BR>
Frederik
<BR>
<P><PRE>
--
Frederik Ramm ## eMail <A HREF="mailto:frederik@remote.org?Subject=Re:%20Have%20a%20&quot;scan&quot;%20button?%20Read%20this...&In-Reply-To=&lt;20010308201920.A7828@aruba.remote.org&gt;">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:%20Have%20a%20&quot;scan&quot;%20button?%20Read%20this...&In-Reply-To=&lt;20010308201920.A7828@aruba.remote.org&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0118.html">Douglas Gilbert: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0116.html">Ulrich Deiters: "Re: 3091 backend: Brightness, Contrast etc."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0118.html">Douglas Gilbert: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0118.html">Douglas Gilbert: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0119.html">Tim Waugh: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0124.html">abel deuring: "Re: Have a &quot;scan&quot; button? Read this..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#117">[ date ]</A>
<A HREF="index.html#117">[ thread ]</A>
<A HREF="subject.html#117">[ subject ]</A>
<A HREF="author.html#117">[ 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 - 12:04:00 PST</EM>
</EM>
</SMALL>
</BODY>
</HTML>