[sane-devel] Highlevel USB/FireWire bsd/linux/atheos scanner driver getgo & best practices.

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 18 Aug 2002 12:57:44 +0200


Hi,

I'll try to answer a few questions even if I haven't understood
everything:

On Sun, Aug 18, 2002 at 03:07:54AM -0500, Steve Nordquist wrote:
>   1)  kernel architecture of sane wrt userland/kernel/devfs on various OS,
> 	and hence how firewire/usb scanners would work on OpenBSD
> 	in theory.

The backends themselves mostly aren't interested in the low level
details. They are able to send and receive buffers to/from SANE internal
functions (sanei_*) like sanei_scsi_* and sanei_usb_*. These functions
do the low level stuff and contact libraries or the operating system.

Documentation for SANEI is here: http://sanei.meier-geinitz.de/

So if you want to get e.g. USB running on a specific operating system
you would add support to sanei/sanei_usb.c for that system. The BSDs
are supported anyway by either direct kernel drivers (uscanner) or
libusb (via ugen). I'm talking about the SANE CVS version here.

So for USB access you need either a Linux-like USB scanner driver or a
port of libusb to the operating system of your choice. Some details
are in man sane-usb.

There is no SANEI interface for firewire, but some backends seem to
able to uses such scanners, too (epson, coolscan2). Maybe their
authors can talk about that.

>   2)  middleware architecture available in same; what if I want to do a retake
> 	on the same scanner data with different driver parameters or go
> 	use pipefs on same, expecting the SANE client on the other end to
> 	cope?  Doable?  Userland?

What is "pipefs"? Most backends don't buffer the complete data in
memory so there is no way to retransmit it with changed parameters.
Usually that's a job for the frontend which has the complete image data.

>   4)   Are there other open source scanner efforts of note?

I don't know of any. There is vuescan, but that's commercial and
Windows/Linux-only.

>   5)  Where's the feature wishlist,

For SANE? No new features will be added to the current standard. There
is a draft for a new standard, called SANE2:
http://www.xsane.org/sane2/index.html , some remarks are also in the
LEVEL2 and TODO files in CVS. For xsane: http://www.xsane.org/xsane-future.html

>       are tools more sophisticated than CVS
> 	(Rational, say) used in code designation, and is there a way
> 	to use WINE to acquire more drivers?  (I mean, I can use
> 	CygWin or User Mode Linux in WinXP, but how about folding
> 	that around with a provided  windows driver and praying
> 	the Crusoe CPU happens to refactor correctly?)

WINE and similar approaches are used to develop SANE drivers but I
don't know of anyone using it as a SANE-TWAIN gateway or similar. That
looks too compilcated (and unstable?) to me.

>   6)  What does OS porting look like for projects like this now, (with 
> 	Plan9 and AtheOS in the testable wild) anyhow?

I don't know one of those. SANE (the code, not the standard) is based
on the assumption of a running unix of some sort. So if these os are
too different, porting will be difficult. On the other hand, if there
is a "unix interface" lyke cygwin on Windows, it's doable.

>       Is there a
> 	good knowledge authority online for that work (where people
> 	who got make config to work in Plan9 say so, etc.)

No idea. If anyone got (parts of) SANE running on a system not
mentioned on http://panda.mostang.com/sane/sane-support.html I would
like to know in any case.

Bye,
  Henning