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.

aloha Povilas

thanks for the reply

so i'm using a static version of sane-backends-master with the git
extension of e13b80fa (i've not got git, but use rcs on my dinosaur)

   with canoscan lide-200 (genesys_gl847) (genesys:libusb:/dev/usb:4a9.1905/1)
   and a colorful sheet (usletter 8.5x11) on it

   so using the basic command line:
      ( SANE_DEBUG_SANEI_CONFIG=8   ./frontend/scanimage   --calibration-file \
        $HOME/.sane/.default_canon-lide-200.cal -o  4x1exxon_page_opts_13.png )

with any of these variations in ./genesys.conf which is being read based on the
SANE_DEBUG_SANEI_CONFIG log data i'm unable to change --mode to color. image is
always gray the default.
note: each commented outline attempted in turn.

# Canon LiDE 200
usb 0x04a9 0x1905
# /dev/usb:4a9.1905/1
# /dev/usb:4a9.1905
# option mode Color
# option mode:Color
option --mode:Color
# option --mode=Color
# option --mode Color
# option mode=Color

have i missed reasonable combination?

so either the parsing is not working (but more importantly not generating
any sort of message) or something else is over-riding my attempt to change
the argument value.

note: /opt/csw/etc/sane.d/genesys.conf does not have any option lines
everything is commented out but this one line for # Canon LiDE 200
usb 0x04a9 0x1905


i will look over the code for function sanei_configure_attach and see if
i can puzzle out what might be not happening, maybe hack in some parsing
failure messages, etc.

more if and when i learn it.

aloha

ras



here is the SANE_DEBUG_SANEI_CONFIG log output

[sanei_debug] Setting debug level of sanei_config to 8.
[sanei_config] sanei_config_get_paths: using config directories  
.:/opt/csw/etc/sane.d
[sanei_config] sanei_config_get_paths: using config directories  
.:/opt/csw/etc/sane.d
[sanei_config] sanei_config_open: attempting to open `./dll.conf'
[sanei_config] sanei_config_open: attempting to open 
`/opt/csw/etc/sane.d/dll.conf'
[sanei_config] sanei_config_open: using file `/opt/csw/etc/sane.d/dll.conf'
[sanei_config] sanei_config_get_paths: using config directories  
.:/opt/csw/etc/sane.d
[sanei_config] sanei_config_open: attempting to open `./dll.aliases'
[sanei_config] sanei_config_open: attempting to open 
`/opt/csw/etc/sane.d/dll.aliases'
[sanei_config] sanei_config_open: could not find config file `dll.aliases'
[sanei_config] sanei_configure_attach: start
[sanei_config] sanei_config_get_paths: using config directories  
.:/opt/csw/etc/sane.d
[sanei_config] sanei_config_open: attempting to open `./genesys.conf'
[sanei_config] sanei_config_open: using file `./genesys.conf'
[sanei_config] sanei_configure_attach: trying to attach with 'usb 0x04a9 0x1905'
[sanei_config] sanei_configure_attach: trying to attach with 'option mode Color'
[sanei_config] sanei_configure_attach: trying to attach with 'option y 25.4'
[sanei_config] sanei_configure_attach: exit
[sanei_config] sanei_configure_attach: start
[sanei_config] sanei_config_get_paths: using config directories  
.:/opt/csw/etc/sane.d
[sanei_config] sanei_config_open: attempting to open `./genesys.conf'
[sanei_config] sanei_config_open: using file `./genesys.conf'
[sanei_config] sanei_configure_attach: trying to attach with 'usb 0x04a9 0x1905'
[sanei_config] sanei_configure_attach: trying to attach with 'option mode Color'
[sanei_config] sanei_configure_attach: trying to attach with 'option y 25.4'
[sanei_config] sanei_configure_attach: exit
[sanei_config] sanei_config_get_paths: using config directories  
.:/opt/csw/etc/sane.d
[sanei_config] sanei_config_open: attempting to open `./net.conf'
[sanei_config] sanei_config_open: attempting to open 
`/opt/csw/etc/sane.d/net.conf'
[sanei_config] sanei_config_open: using file `/opt/csw/etc/sane.d/net.conf'



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





--
sane-devel mailing list: [email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
            to [email protected]

Reply via email to