[sane-devel] Why sane_read() always returns SANE_STATUS_GOOD?

Peter Chen peterchenn at hotmail.com
Sun Apr 27 17:35:35 BST 2003


Hi,

Thanks for your suggestion. The problem is I setup the usb scanner manually,
so when I ran scanimage -L, it only showed me the "real" scanner, but not
the testbed.

While using kylix gives me a lot of power to debug my program (I can add
watches when debugging), sometimes it's very difficult to set up kylix,
especially while working with RedHat 9 rather than RedHat 7.2 which I am
using now.

I sent in two other emails including the debug output from running
scanimage, SANE_DEBUG_FUJITSU set to 128 and 255, respectively.

I also sent another email on how to set tl_x, tl_y, br_x, br_y, it seems
quite straightforward to set these options, but it did not work for me. I am
very confused, could you pls help me with that also?

Thanks,

Peter

----- Original Message -----
From: "abel deuring" <a.deuring at satzbau-gmbh.de>
To: <sane-devel at mostang.com>
Sent: Sunday, April 27, 2003 9:28 AM
Subject: Re: [sane-devel] Why sane_read() always returns SANE_STATUS_GOOD?


> Peter Chen wrote:
> >
> > Hi,
> >
> > I will probably do more tests this afternoon. Since I am using kylix, it
> > might be something wrong with kylix configuration.
> >
> > I copied a lot of codes from scanimage, except I did not write the image
to
> > stdout like scanimage did. I could not make sane_start work properly if
I
> > called fopen() before sane_start(). Again, it might be something wrong
with
> > my kylix configuration.
>
> Peter, it is a bit difficult to make guesses about possibles causes of
> the problems you have with your frontend, when you don't give any
> details. Most if not all Sane backends contain many debug statements.
> While they are mainly intended to help finding bugs in the backend, they
> can also be useful to find in bugs in frontends. And it would help if
> you could provide at least excerpts from your sources, preferably
> combined with the output of a few fprintf(stderr,...) statements placed
> near the Sane API calls. With all this information, it will be easier to
> get a clue, what goes wrong.
>
> And I must emphazise Henning's hint to use the test backend. Some months
> ago, I worked a bit on Andrew Kuchling's Python bindings for Sane. The
> test backend was incredibly helpful. It is way faster than any real
> scanner, it provides more types of options than any other Sane backend,
> it allows to setup a number of uncommon cases, like choosing the number
> of bytes received. Without all these test cases, my work on the the
> Python Sane module would have been far less successful and would have
> taken far more time.
>
> Abel
> _______________________________________________
> Sane-devel mailing list
> Sane-devel at www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel
>



More information about the sane-devel mailing list