kopia lustrzana https://gitlab.com/sane-project/website
156 wiersze
6.2 KiB
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 "scan" button? Read this...</TITLE>
|
|
<META NAME="Author" CONTENT="abel deuring (adeuring@gmx.net)">
|
|
<META NAME="Subject" CONTENT="Re: Have a "scan" button? Read this...">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: Have a "scan" 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 "scan" 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"scan"%20button?%20Read%20this...&In-Reply-To=<3AA8115A.60B4700F@gmx.net>"><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 "scan" button? Read this..."</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0123.html">Frederik Ramm: "Re: Have a "scan" button? Read this..."</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0117.html">Frederik Ramm: "Have a "scan" button? Read this..."</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a "scan" button? Read this..."</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a "scan" 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>>
|
|
</EM><BR>
|
|
<EM>> Hi,
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> my scanner has a "scan" button that (at least using their Windows
|
|
</EM><BR>
|
|
<EM>> driver) can be used to launch certain programs on the host system.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> I've written something similar for the SANE environment. It's called
|
|
</EM><BR>
|
|
<EM>> "sensed" and works by sending a SCSI "REQUEST SENSE" command to the
|
|
</EM><BR>
|
|
<EM>> scanner in regular intervals (every 2 sec). If the response indicates
|
|
</EM><BR>
|
|
<EM>> that the scan button has been pressed, a program is launched. (This
|
|
</EM><BR>
|
|
<EM>> would usually mean scanadf or scanimage, maybe called by a shell
|
|
</EM><BR>
|
|
<EM>> script that stores the results away properly.)
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> The current, initial version is very crude, has only been tested with
|
|
</EM><BR>
|
|
<EM>> my Fujitsu M3091DCd scanner, and it doesn't even have a Makefile etc.
|
|
</EM><BR>
|
|
<EM>> (it relies on the SANE SCSI core so you'll have to stuff it into the
|
|
</EM><BR>
|
|
<EM>> "backend" directory, compile and link with libsanei.a).
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> 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>>
|
|
</EM><BR>
|
|
<EM>> Feel free to play with it. If anyone's willing to help me make this a
|
|
</EM><BR>
|
|
<EM>> proper part of SANE, including it in the "tools" directory, putting it
|
|
</EM><BR>
|
|
<EM>> in CVS and tweaking the Makefiles accordingly, you're most welcome.
|
|
</EM><BR>
|
|
<EM>> But perhaps that should wait for a version that is more configurable
|
|
</EM><BR>
|
|
<EM>> and supports more scanners.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> For the SCSI gurus out there, is there any potential disruption by
|
|
</EM><BR>
|
|
<EM>> sending REQUEST SENSE to a device every two seconds? I noticed that
|
|
</EM><BR>
|
|
<EM>> while someone has "grabbed" the device, the call blocks anyway (which
|
|
</EM><BR>
|
|
<EM>> doesn't hurt my program). sensed does not attempt to grab and release
|
|
</EM><BR>
|
|
<EM>> 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"scan"%20button?%20Read%20this...&In-Reply-To=<3AA8115A.60B4700F@gmx.net>">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 "scan" button? Read this..."</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0123.html">Frederik Ramm: "Re: Have a "scan" button? Read this..."</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0117.html">Frederik Ramm: "Have a "scan" button? Read this..."</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a "scan" button? Read this..."</A>
|
|
<LI><STRONG>Reply:</STRONG> <A HREF="0125.html">Juergen E. Fischer: "Re: Have a "scan" 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>
|