[sane-devel] What Steps to write a backend

gerard klaver gerard@gkall.hobby.nl
Thu, 07 Apr 2005 23:03:38 +0200


On Thu, 2005-04-07 at 16:11 -0400, Rayudu Addagarla wrote:
> Thanks
>  I read that document.
> But the thing is if i have to give a customer a a sane backend how do i do that.
> I dont expect a customer to do all the steps as a developer.
> copying the C files and doing configure and make , make install
> 
> What I would like to have is, I have to give is  tar file and say run install.
> if i can copy the libraries in the corresponding places in 
> /usr/local/lib/sane/libsane-ray*
> and 
> /usr/local/etc/sane.d/ray.conf and make an entry in dll.conf
> will that work.
> 
> 
> thanks
> Rayudu
> On Apr 6, 2005 3:47 PM, gerard klaver <gerard@gkall.hobby.nl> wrote:
> > On Wed, 2005-04-06 at 15:26 -0400, Rayudu Addagarla wrote:
> > > Hello
> > >  I am starting to write a backend ,
> > >  but wanted to test if by renaming a library of the existing backend
> > > will it work.
> > >
> > > i have a hp 2200C scanner;
> > >  This works with a plustek backend
> > >
> > > scanimage -d plustek:libusb:001:002 works great.
> > >
> > >  scanimage -L
> > >  gives output 'plustek:libusb:001:002
> > >
> > > how does sane/scanimage know which backend to pickup.
> > >
> > > if the scanimage depends on the -d option, i should be able to say
> > > scanimage -dray:libusb:001:002
> > > and i have entry ray in dll.conf
> > > and moved plustek.conf to ray.conf
> > > and renamed all libsane-plustek.* to libsane-ray.*
> > >
> > > I thought it should pick up and scan.
> > > why would it not do.
> > >
> > > if i create my own backend, how ill sane know to check or try using
> > > the backend i made.
> > >
> > > say suppose; i create one ray.c and create libsane-ray.la and libsane-ray.so.1
> > > and copy into /usr/local/lib/sane where other backend are there.
> > > and add entry to dll.conf and copy the ray.conf to /usr/local/etc/sane.d/
> > >
> > > Will it work?
> > >
> > > where does sane look for entries.
> > > what are the paths it looks.
> > >
> > >
> > > thanks
> > > Ray
> > >
> > 
> > One document which may help you is in SANE CVS
> > experimental/genesys/README
> > 
> > it explains how a backend can be included in the SANE backend tree
> > 
> > --
> > --------
> > m.vr.gr.
> > Gerard Klaver
> > 
> > 
> 
> 

One step is to check the Debian libsane-extras package or check
how some other vendors have done that (like epkowa, hpiao, brother,
samsung backend)

-- 
--------
m.vr.gr.
Gerard Klaver