Re: Discussion about SANE and TWAIN...

Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Thu, 12 Aug 1999 00:08:32 +0200

Hello Mark,

thanks for your answer.

252353N@knotes.kodak.com wrote:

> From: Mark McLaughlin
>
> Hi Oliver...
>
> Many thanks for your reply.
>
> I'm glad that you also see a benefit from this interaction between
> SANE and TWAIN. The fact that TWAIN's user base is expressing
> an interest in UNIX is a little daunting in some ways, since not many
> of the current TWAIN members are doing anything with UNIX.
> So one of the opportunities we see from working with SANE is a
> chance to draw on your experience and expertise.
>
> As stated in my first message, I believe the principle benefit from
> SANE and TWAIN working together is a chance to help app
> writers cross from one OS to the other with less effort than it takes
> today. So, TWAIN runs on UNIX, SANE runs on Windows, and
> application writers have one less component to worry about
> when trying to build their source code on an alternate platform.
>
> Bearing that in mind, I propose that on UNIX TWAIN runs in
> communication with a generic Source that talks to SANE drivers.
> We would have to make some minor changes to our Source
> Manager to allow this to work properly, but such a TWAIN Source
> would be able to communicate with any SANE supported image
> capture device.

This sounds very good because TWAIN on UNIX will be able to
support all scanners / image acquiring devices that are supported by
SANE. SANE will benefit from this because the scanner
manufacturers will give better support to the SANE developers
(e.g. documentation about their protocols, hardware for doing some
tests).
If TWAIN does support the generic source that talks to SANE drivers
on Windows/Macinthos, we will be able to use a scanner that is
connected on a UNIX system and the TAWIN-GUI runs on a
Windows/Macintosh platform. That would be a benefit for a lot
of users because they can share one scanner for
UNIX/Windows/Mac.

> At this time I don't believe there is much to be gained from having
> a generic SANE driver that talks to TWAIN. Technically it is very
> doable, but TWAIN Sources have a history of relying heavily or
> even exclusively on their internal GUIs, which doesn't fit well into
> SANE's programmatic design. We are working to change this
> behavior (and have been since TWAIN 1.7 -- 1997), so in the
> future it might be advantageous to do this.

It would be nice if this would work one day.

If I understand it right there are "generic" GUIs for TWAIN
that are not positioned in the source driver level - right?
Are these GUIs positioned in the Application layer or in the
source managaer layer?

Would it be necessary to write an own GUI for the generic
SANE source driver?

> One question I have regarding SANE has to do with writing drivers
> for mulitple UNIX platforms. Writing a 'single' device driver for
> Solaris and AIX and Linux, etc must be appealing to some device
> manufacterers (nobody wants to have write one driver per OS for
> their device). Has SANE investigated an abstraction between
> it's interface and the actual communication with the OS? I'm kind of
> looking for something like ASPI (though wire independent). The
> idea being that me, as a driver writer, would be able to write a
> SANE driver that with a minimum of #ifdef's would be buildable on
> UNIX or Macintosh or Windows platforms.

Normally there are no OS dependend #ifdef's in the backend sources.
There is a common interface for scsi communication (sanei_scsi) used
by all backends. In sanei-scsi there are the OS dependend #ifdef's
that make sure that the backend authors do not have to care about
the OS.
The only machine dependant thing the backends have to care about
is the endianess of the machine on which the backend is running.

For parallel scanners there is no common interface because there are
only a few parallel scanners supported due to missing documentation for
parallel port scanners.

The support for USB scanners is not so simple because there are no
generic USB drivers for most UNIX platforms.

> If such a mechanism could be created, I would have a very good
> reason for running SANE on Windows and Macintosh platforms...

I don`t know anything about scsi-communtication on Windows
and Macintosh platforms, but I don`t see any problems to add
support for them to sanei-scsi.
SANE already works (at least a bit) with OS/2.

May be we have to do some minor changes in some backends
to make them work on Windows/Macintosh platforms, but that
shall not make big problems.

Bye
Oliver

--
EMAIL: Oliver.Rauch@Wolfsburg.DE
WWW: http://www.wolfsburg.de/~rauch

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com