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

r. a. schmied uwppp at flash.net
Wed Jun 12 13:11:05 BST 2019


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

oh -- don't read too much into the option x value line(s).
do consider the option y value line however.  if this
'at runtime' backend.conf option setting feature works
by setting y to 1 inch the scan time will be less than
1/11.7 of the time to scan the entire length of an a4 
sheet which is what the y default value is.  it is just
to speed up testing.

so far no luck.

bigger picture:
i'm operating under the belief, could be incorrect, that there
isn't a simple way to alter the default paper size defaults
(as a primary example, but not the only one) for scanimage at
compile time, at least not via configure.  i'm ok with that
but it would be nice if there was a way at runtime to have
options other than the defaults without having to enter them
all on the command line.  there isn't an envvar or group of
envvars that scanimage uses to preset args at runtime.
advance frontends like xsane might/do provide these features
in one form or another, but i'm still at the getting to know
(and love) scanimage and it's interaction with my canoscan
lide-200 stage. 

and even as a horrible typist i'm still a command liner so
the future of actually using an advanced gui'zed frontend is
bleak indeed, but not out of the realm of possibility either.


aloha

ras



 I expect almost no backends to allow
> you to set command line options in the config file. But, I'm not sure that
> is really what you are looking for. Can you explain exactly what you are
> trying to do?
> 
> 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