[sane-devel] Possible bug in canon backend or > scanimage
m.kavatsyuk at yahoo.com
Wed Nov 10 08:55:10 UTC 2010
I did not manage to compile SANE with the internal getopt_long. At
least with my distribution (Ubuntu 10.10) SANE was always built with
the glibc getopt_long and disregarding the definitions in the config.h.
However I modified the fetch_options function (scanimage.c:859) by
adding a line
if(opt->name == NULL) continue;
at 895. After this modification scanimage works as expected, namely
it recognizes all options! May be this is a bug in the glibc
implementation of getopt_long (it stops once it reaches NULL option).
But I would suggest to modify the scanimage.c.
Please find attached the usb log file of the canoscan 8400F.
I am not sure if it is complete (the log was recorded while scanner
reset and preview, but during the preview I notice that number
of recorded packets was not changing). Please let me know if you
need more information/tests.
The canoscan 3200F I will try during the Christmas holidays.
--- On Mon, 11/8/10, stef <stef.dev at free.fr> wrote:
> From: stef <stef.dev at free.fr>
> Subject: Re: [sane-devel] Possible bug in canon backend or > scanimage
> To: sane-devel at lists.alioth.debian.org
> Cc: "Myroslav Kavatsyuk" <m.kavatsyuk at yahoo.com>
> Date: Monday, November 8, 2010, 9:35 PM
> 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
> > 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
> > full_optstring and all_options -- parameters of
> > 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
> > 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
> include/sane/config.h, so you can really step in it with a
> > 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,"ap:
> > Please let me know your opinion on this
> > I just noticed that there is active development of the
> > 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
> > apart I can try to see if we can make it ruining with
> In older CVS there was an experimental
> backend for this scanner. Maybe
> you could look at it.
> > Please find attached the output of the
> > utility.
> > Best regards,
> > Myroslav
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14969 bytes
Desc: not available
More information about the sane-devel