[sane-devel] UMAX 1200S on NetBSD

Henning Meier-Geinitz henning at meier-geinitz.de
Fri Sep 12 14:57:47 BST 2003


On Fri, Sep 12, 2003 at 09:10:58AM -0400, Greg Troxel wrote:
> I can certainly accept that I did things wrong.  But given that I'm a
> long time sane user, I'd say this is an indication that things are too
> hard.
> It is pretty counterintuitive to me that device on the command line is
> not simply a pathname to a device special file.

scanimage or any other frontend doesn't know anything about device
files. So it wouldn't know what to do with it. Only the backends know
about device files. So if you want to specify a SANE device, you must
tell SANE which backend to use. In principle, a device can be even
supported by two different backends.

But you are right concerning "things too hard". With other operating
systems, you don't need to set any link or specify anything on the
command line if you have only one scanner. 

> Once I put in the /dev/scanner link, xscanimage worked fine.  Clearly
> then, I did not have to tell xscanimage that my scanner was a umax.

You didn't and xscanimage didn't know. xscanimage is linked against
libsane, which is in fact libsane-dll. That dll backend asks all
backends for a list of devices they can find. Each backend now scans
all the device files it knows about (usually /dev/scanner is included
in this list) for devices it knows. So you get a list with e.g.
umax:/dev/scanner because the umax backend has found your scanner.

> So perhaps there should be an OS-dependent notion of a list of default
> files to check for (SCSI and usb scanners, or pass/ugen things that
> probe as scanners).

That's done in the sanei_scsi.c code for some operating systems (at
least Linux, FreeBSD, MacOS X). The code for NetBSD is just not
implemented yet. Patches are welcome.

With that code, the devices are autodetected by the "scsi" lines in
the config files. But that only works, if there is an implementation
of sanei_scsi_find_devices() in sanei/sanei_scsi.c. It's missing for
NetBSD (BSD_INTERFACE) as far as I can see so the empty stub at the
end of the file is used. If you set the envirinment variable
SANE_DEBUG_SANEI_SCSI to at least 1, you should get a warning about

> Basically, I think it comes down to that if sane-find-scanners can find
> the scanner, then xscanimage and scanimage should find them as well
> when started with no arguments.

Some of the implementations in sanei_scsi are similar to the one in
sane-find-scanner. The Linux one is different and much faster by using


More information about the sane-devel mailing list