[sane-devel] sane_get_devices ?

Bertrik Sikken bertrik at zonnet.nl
Sun Oct 28 09:49:07 GMT 2001


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



More information about the sane-devel mailing list