[sane-devel] saned/network scanner

Thiago Milczarek Sayão thiago.sayao at gmail.com
Fri Jan 22 20:43:13 GMT 2021

Thanks for the reply.

Another approach is to use the C api directly and map it to java using JNI.

I'm looking at scanimage.c file, but it deals with lots of things. Is there
a high level api?

Em sex., 22 de jan. de 2021 às 16:21, Alexander Pevzner <pzz at apevzner.com>

> On 1/22/21 9:38 PM, Thiago Milczarek Sayão wrote:
> > I've been getting lots of attention to make my scanner work, thanks!
> >
> > But one question remains: Is it possible to make saned list network
> > scanners?
> With existent saned - no. It requires some patching, though minimal.
> saned obtains list of devices from the configured backends, using
> sane_get_devices() call of each backend. The second parameter of this
> call tells backend, should it return all devices, or only local devices.
> saned hardcodes this parameter to SANE_TRUE. Network backends consider
> their devices as non-local, and return empty list.
> The simple trick could be to set this parameter to SANE_FALSE. However,
> if sane-net backend is configured, it may discover itself, reexport
> itself and so on - until saned crashed due to lack of memory. It needs
> to be handled somehow.
> The simplest possible approach is to add an option, that sets second
> parameter of sane_get_devices() to SANE_FALSE, and document, that if
> this option is set, sane-net backend must be disabled. More robust
> approach would be to patch sane-net to ignore discovered addresses that
> match local interfaces.
> --
>         Wishes, Alexander Pevzner (pzz at apevzner.com)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20210122/6b782e03/attachment.html>

More information about the sane-devel mailing list