[sane-devel] sane_get_devices ?

Bertrik Sikken bertrik@zonnet.nl
Sun, 28 Oct 2001 10:49:07 +0100


Major A wrote:
> I have started writing a backend, but have the following problem: why
> is sane_get_devices not called on "scanimage -L"? The backend
> currently does nothing except to pretend there is a scanner
> there. What makes the frontend call the sane_get_devices function in
> other backends?

Are you returning the correct version in sane_init?
I think the minimum implementation of sane_init could look
something like this:

SANE_Status
sane_init(SANE_Int *piVersion, SANE_Auth_Callback pfnAuth)
{
  DBG_INIT();

  DBG(DBG_MSG, "sane_init\n");

  if (piVersion != NULL) {
    *piVersion = SANE_VERSION_CODE (V_MAJOR, V_MINOR, BUILD);
  }
  pfnAuth = pfnAuth;

  return SANE_STATUS_GOOD;
}

(you have to define 'DBG_MSG' and 'BUILD' yourself).

Also be very sure that your backend is listed in dll.conf

Further you could try to run strace to see if your backend is
opened at all by scanimage.
strace scanimage -L 2>strace.log

Bertrik