[sane-devel] Possible to make test backend to slow down?

r. a. schmied uwppp at flash.net
Wed Jun 12 02:11:21 BST 2019


m. allan noah wrote:
> You seem to be prone to X/Y problems.

not sure i understand that

 I expect almost no backends to allow
> you to set command line options in the config file.

if that is the case then i'm misunderstanding the first couple of
messages on this thread -- it sounded to me that one could alter,
at runtime, scanimage command line option arguments on a per
scanner basis with the *.conf file. (re olaf message 06/10/19 02:28)

    "They should be available with any self-respecting SANE frontend.
     These options are not marked as advanced."


 But, I'm not sure that
> is really what you are looking for. Can you explain exactly what you are
> trying to do?

aloha allan

well i guess i'm a lazy bad typist, so i'd like a way to tweak scanimage
defaults at runtime without having to construct a long complex command line.

i'm experimenting right now with --mode=color as the default is gray, but
really i'd probably change -x and -y if this feature really works

so far no joy -=- seems sanei_configure_attach never enters into the
/* search for a matching descriptor */ loop

ras

> 
> allan
> 
> On Tue, Jun 11, 2019, 6:34 PM r. a. schmied <uwppp at flash.net> wrote:
> 
> 
>>Povilas Kanapickas wrote:
>>
>>>Hi,
>>>
>>>On 2019-06-10 19:26, r. a. schmied wrote:
>>>
>>>
>>>>saners
>>>>
>>>>in particular genesys_gl847
>>>>
>>>>a query or two about <backend>.conf file
>>>>
>>>>1) do all, most, some backends support such runtime argument
>>>>   alterations?
>>>
>>>
>>>Looks like the genesys backend reads this genesys.conf configuration
>>>file by calling sanei_configure_attach. It's called by 10 backends, so I
>>>suppose that many backends support this functionality.
>>>
>>>
>>>>2) i see scanimage is checking for and reading ./genesys.conf
>>>>   and /opt/csw/etc/sane.d/genesys.conf
>>>>
>>>>3) i've tried to enter options in ./genesys.conf, but have
>>>>   not been able to get them to a) work or b) cause an
>>>>   error or warning.  is there anyplace in the sane documentation
>>>>   world that defines/describes the format for these arguments
>>>>   placed in a <backend.conf> file?
>>>>
>>>>   i seem to think i've seen something like that but i'm not
>>>>   able to re-find it!  rtfm'ed sane.7, scanimage, sane-genesys
>>>>   sane-test and grep'ed around looking for '\.conf'
>>>>
>>>>   ah-ha! sane-u12 -- but those lines don't work either
>>>>
>>>>   tried lots of variations including
>>>>         option='flag:arg'
>>>>         option flag arg
>>>>         option -flag=arg
>>>>         option="-flag arg"
>>>
>>>
>>>I don't know this area at all, but from the documentation of
>>>sanei_configure_attach:
>>>
>>>'''
>>>Parse configuration file, reading configuration options and trying to
>>>attach devices found in file.
>>>
>>>The option are gathered in a single configuration structure. Each time a
>>>line holds a value that is not an option, the attach function is called
>>>with the name found and the configuration structure with it's current
>>>values.
>>>'''
>>>
>>>The reason you're not seeing any error messages is that their severity
>>>is low. Try setting SANE_DEBUG_SANEI_CONFIG=8 environment variable
>>>before running scanimage.
>>>
>>>
>>>
>>>>if anyone provides guidance even if pointer(s) to relevant code
>>>>i will take/make time to write-up a manpageish file and submit
>>>>for incorporation ...
>>>
>>>
>>>That would be great, thank you.
>>>
>>>Regards,
>>>Povilas
>>>
>>>
>>>
>>
>>Povilas and interested saners
>>
>>so it looks to me like the genesys usb conf file is not consistent
>>with the processing expected and coded in sanei_configure_attach
>>(sanei/sanei_config.c)
>>
>>seems sanei_configure_attach looks only for the token 'option' and
>>when finding 'usb 0x04a9 0x1905' or any of the other lines it calls
>>attach.  why it fails to recognize the option lines in ./genesys.conf
>>is still unclear maybe my sun sol10 is using a broken strncmp
>>-- so i need to check that
>>
>>what attach does or attempts to do is still to be determined.
>>
>>notice that the u12.conf file (example) has usb in sqr brackets [usb]
>>and then lists option lines.  plus the test.conf file as an example
>>does not include the token 'option' at all, instead listing the
>>option name followed by the option value to use.
>>
>>still looking ...
>>
>>ras
>>
>>--
>>sane-devel mailing list: sane-devel at alioth-lists.debian.net
>>https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/sane-devel
>>Unsubscribe: Send mail with subject "unsubscribe your_password"
>>             to sane-devel-request at lists.alioth.debian.org
> 
> 




More information about the sane-devel mailing list