[sane-devel] Questions from new backend developers

Henning Meier-Geinitz henning@meier-geinitz.de
Fri, 10 Aug 2001 19:35:11 +0200


Hi,

On Fri, Aug 10, 2001 at 08:16:35PM +1000, Simon Krix wrote:
> Our Canon parallel scanner project has recently finished (almost)
> our SANE backend. 
> 
> We've got a couple of things to ask the list about issues of
> policy -

The first thing is to wrire a new message and don't answer to an
existing one with a changed subject :-)

> a) The scanner needs to be recalibrated every now and then (which
> entails storing an 80k file somewhere). Where should the file be
> saved? 

I think something like ~/.sane/backendname-calibration is ok. Or if
you have more then one file, create ~/.sane/backendname and put your
files there.

> b) The driver is linked against libieee1284. This is a linux-only
> library at the moment. Is there a requirement that all backends
> must compile on all architechtures?

No, but you must insure that sane-backends compiles on all platforms. So
put a test in configure(.in) and disable the backend if the test fails
(see test for v4l). Or put some #ifdefs in the backend code itsself.

> On an aside, I noticed there have been a few questions about
> running parallel scanners non-root today. Has anyone got any ideas
> about this? Since I use libieee1284, my backend runs perfectly as
> a user.

How does it work? Does it use a kernel driver?

>Tim Waugh, the author of libieee1284, responded on this
> list in June:
> 
> > In the future it would be nice if SANE could use libieee1284 for
> > the parallel port devices.  Then all the smarts for how
> different OSes
> > do parallel port access end up in one place.
> > (If you'd like to help me add OS/2 support to libieee1284, pleae
> > contact me in private mail.)
> 
> He has a good point. SANE could really benefit from this kind of
> centralisation. It would also make it easier to support new
> scanners (I wouldn't have had to write my own implementation of
> IEEE 1284 nibble mode if I had known about it) and allow
> everything to be run as non-root on architechtures which support
> that. What does anyone else think? 

I think it's ok to include libieee1284 into SANE. But before the
backend authors will use it instead of their own impementations, it
should support the platforms that are currently supported (at least
that would be my opinion, if I maintained a parport backend).

I'm not sure if this works for all the parport backends/drivers (e.g.
sanei_ab306 or sanei_pa4s2).

Bye,
  Henning