[sane-devel] Re: How to link the Scan Button of CX3100 to a linux application?

Olaf Meeuwissen olaf@epkowa.co.jp
Tue, 27 Jan 2004 15:02:23 +0900


Karl Heinz Kremer <khk@khk.net> writes:

> I assume this is an EPSON CX-3100. In this case, the scanner does not
> send anything when you press the button. The Windows software checks
> every half second or second or so to find out if the button was
> pressed.

With most of the more recent scanners and all-in-ones, including the
3200PHOTO and the CX-3100, pressing the scan button starts the EPSON
Smart Panel application under Windows.

Obviously, doing something like this under a Unix-like OS, or any true
multi-user OS for that matter, is just plain ... eh ... stupid because
there is absolutely no knowing for which user you need to fire up the
app.  Let alone trying to figure at on which terminal.

Per user daemons polling for a button event to start an application
won't work either because there may be any number of such daemons
running (so you might as well use a single system-wide one).

If anyone thinks otherwise, I'd like to know.

The best one can probably do is what Karl has done in the epson
backend (and I merged into the epkowa backend with iscan-1.6.0) is
have the user set up the scan and tell the backend to wait until the
button is pressed before commencing the scan.

We are contemplating additional GUI bells and whistles for "Image
Scan! for Linux" for this functionality but haven't quite made up our
minds as to the most natural way of doing this.  There's also the case
of the most desired behaviour when using the ADF ...

Needless to say, your suggestions are welcome ;-)

> The problem with handling buttons with Sane is that we don't have an
> API for this, so every backend would potentially handle this
> differently. Also, there is no official way to communicate a button
> event to a frontend.
>
> The EPSON backend has a mode where you can setup your scan, and then
> configure it to wait for a button event. This would not allow you to
> send the scans to another application, but it's a start :-)
>
>
> On Jan 26, 2004, at 2:12 PM, Till Kamppeter wrote:
>
>> I recommend that you post this on the SANE mailing list
>> (http://www.sane-project.org/), as this is a scanning problem. I am
>> CCing this posting to there.
>>
>> AFAIK noone has written a driver for scanner buttons yet (also not
>> for other scanner models). The scanner probably sends a certain
>> signal through the USB which is caught by a background process under
>> Windows. This process then starts a program to do the scan. The best
>> way to write a similar program under Linux is to use a USB sniffer
>> to analyze how the signal looks like and then write a daemon which
>> listens for such signals.
>>
>>    Till
>>
>> Alton Hernandez wrote:
>>> Hi,
>>> Can anyone tell me how I can link the Scan Button of CX3100 to a Linux
>>> application?  I believe in the Windows environment, you can just
>>> press this
>>> button and the printer will scan the document and send it to your
>>> application
>>> of choice.  But in Linux, this button seems to be useless because
>>> it does not
>>> do anything.

-- 
Olaf Meeuwissen                            EPSON KOWA Corporation, ECS
GnuPG key: 6BE37D90/AB6B 0D1F 99E7 1BF5 EB97  976A 16C7 F27D 6BE3 7D90
Penguin's lib!       -- I hack, therefore I am --               LPIC-2