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 <[email protected]> escreveu: > 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 ([email protected]) > >
