[sane-devel] Possible bug in canon backend or > scanimage

stef stef.dev at free.fr
Mon Nov 8 21:35:57 UTC 2010


Le Monday 08 November 2010 12:54:11 Myroslav Kavatsyuk, vous avez écrit :
> Dear colleagues,
> 
> Thank you for your replies. I find that addition of the --all-options
> is a nice idea to improve the user interface. Unfortunately it
> does not solve my problem. This weekend I tried to debug sane
> to find the source of the error. Just to remind you the problem:
> 
> scanner canoscan 2700F is supposed to have extra options (reported
> when using --all-options flag, works with xsane) but this options
> are not accessible with a scanimage (reported error
> scanimage: unrecognized option '--af=yes')
> 
> As was pointed earlier, the message is coming from the getopt_long
> function (frontend/scanimage.c:2094). With my compilation, the glibc
> implementation of the getopt_long is used, therefore I could not
> debug it. However, I have modified the scanimage.c in a way, to
> printout all command-line parameters and the content of
> full_optstring and all_options -- parameters of getopt_long
> function (frontend/scanimage.c:2094). The output you can see in the
> attachment (scanimage.out.highlight and scanimage.out.af). What I do
> not like in the output is some (null) option-names in the printed
> all_options (see line 29 of scanimage.out.af). This (null) string
> is following after the "ae" option, which is still working.
> All options below that (null) line do not work.

	Option group don't have a name, so it's normal you get null for them. I 
see nothing obvious from the appended files. You can force the build and use 
of the internal getopt_long by undef'ing HAVE_GETOPT_LONG in 
include/sane/config.h, so you can really step in it with a debugger.


> 
> Here, just in case, few lines which I added to scanimage.c just before
> while loop at the line 2094 to print parameters:
> 
>       fprintf(stderr,"Full_options: %s\n",full_optstring);
>       for(i=0;i<all_options_len;i++)
> 	  fprintf(stderr,"ap: %s\n",all_options[i].name);
> 
> Please let me know your opinion on this "investigation".
> 
> I just noticed that there is active development of the genesys
> backend. I have a canoscan 8400F scanner which is build with
> the GL843 chip. I would like to help to make backend for this
> scanner. Please let me know how can I help you.
	
	To check how much it is different, we need a usbsnoop log of a preview 
done under windows. By processing it with scripts, I can extract the 
information needed to add it to the gl843 scanners.

> I also have a canoscan 3200F scanner, which I would like to
> rebuild to a "film" scanner. But before taking it completely
> apart I can try to see if we can make it ruining with sane.
> 
	In older CVS there was an experimental backend for this scanner. Maybe 
you could look at it.

> Please find attached the output of the sane-find-scanner
> utility.
> 
> Best regards,
> Myroslav
> 

Regards,
	Stef



More information about the sane-devel mailing list