[sane-devel] Help on SANE.

Rupesh Tarpara rupesh.tarpara at patni.com
Fri Jun 2 05:32:59 UTC 2006


Hi,

I am developing backend for USB hand held scanner, for Fedora Core-5.
I have gone through the documentation of SANE standard. I am still not clear
about how communication happens between Front-end<=>backend<=>Device.
Can any one help me with the implementation of backend?

Regards,

Rupesh Tarpara


-----Original Message-----
From: sane-devel-bounces at lists.alioth.debian.org
[mailto:sane-devel-bounces at lists.alioth.debian.org]On Behalf Of
sane-devel-request at lists.alioth.debian.org
Sent: Thursday, June 01, 2006 8:46 PM
To: sane-devel at lists.alioth.debian.org
Subject: sane-devel Digest, Vol 12, Issue 2

Send sane-devel mailing list submissions to
        sane-devel at lists.alioth.debian.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.alioth.debian.org/mailman/listinfo/sane-devel
or, via email, send a message with subject or body 'help' to
        sane-devel-request at lists.alioth.debian.org

You can reach the person managing the list at
        sane-devel-owner at lists.alioth.debian.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of sane-devel digest..."


Today's Topics:

   1. saned with latest fujutsu backend broken (Jim McQuillan)
   2. Where can I find a port of SANE Backend for Windows?
      (Kerry Menzel)
   3. Re: Where can I find a port of SANE Backend for Windows?
      (Henning Meier-Geinitz)
   4. Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
      (Henning Meier-Geinitz)
   5. Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
      (m. allan noah)
   6. Re: libsane.usermap entry Epson Perfection 1660 Photo
      (Henning Meier-Geinitz)
   7. Re: Sane Network with Niash (Henning Meier-Geinitz)
   8. Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
      (Henning Meier-Geinitz)
   9. Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
      (m. allan noah)


----------------------------------------------------------------------

Message: 1
Date: Thu, 01 Jun 2006 08:25:05 -0400
From: Jim McQuillan <jam at McQuil.com>
Subject: [sane-devel] saned with latest fujutsu backend broken
To: sane-devel at lists.alioth.debian.org
Message-ID: <447EDCA1.7090101 at McQuil.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I've got a Fujitsu 5120C, and with M. Allan Noah's help and his latest
fujitsu backend from cvs, it's working great, using scanimage to talk
directly to the backend.

But, if I use scanimage to connect to saned, it's not working.  I get an
'Invalid argument'

When running saned with 'SANE_DEBUG_FUJITSU=128' set, here's a few lines
of output:

    [fujitsu]       depth 1
    [fujitsu]       lines 6600
    [fujitsu]       pixels_per_line 5104
    [fujitsu]       bytes_per_line 638
    [fujitsu] sane_get_parameters: finish
    [fujitsu] sane_read: start
    [fujitsu] read_from_scanner: start
    [fujitsu] read_from_scanner: ERROR side:0 want:4203144
room:528/65536 doing:0 done:7656
    [fujitsu] sane_read: finish
    [fujitsu] sane_close: start
    [fujitsu] do_cancel: start
    [fujitsu] do_cancel: finish

The complete logs can be found here:

    http://www.McQuil.com/saned_debug.txt
    http://www.McQuil.com/saned_debug_B.txt   (scanimage with the -B option)

The above test was with a SCSI connection (Adaptec 2906). But, I get
very similar results when using USB.


This is a test machine that I loaded Ubuntu dapper on last night,
WITHOUT any sane packages.

I then grabbed the latest from cvs (May 31, 2006 10:30pm EDT), and
built/installed it.

This only seems to be a problem when using saned, which I *really* need.

Any pointers on how to resolve this issue?

Thanks,
Jim McQuillan
jam at Ltsp.org





------------------------------

Message: 2
Date: Wed, 31 May 2006 13:03:41 -0400
From: "Kerry Menzel" <kmenzel at cfl.rr.com>
Subject: [sane-devel] Where can I find a port of SANE Backend for
        Windows?
To: <sane-devel at lists.alioth.debian.org>
Message-ID: <022401c684d4$30bc7c70$5f00a8c0 at rx30.com>
Content-Type: text/plain; charset="us-ascii"

I have a C application that runs on Window and Linux. I would like to use
SANE to access a scanner on both windows and Linux so I have a consistent
backend. I've been trying to follow links to SANE on windows, but most of
the links are broken or they are for the front end.



Is there a live Windows SANE backend project or port?



Or is there a better alternative so that my application can have a
consistent backend for scanning? SANE looks great on Linux!



Thanks for the help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20060531/ff0
9cf49/attachment-0001.html

------------------------------

Message: 3
Date: Thu, 1 Jun 2006 16:21:09 +0200
From: Henning Meier-Geinitz <henning at meier-geinitz.de>
Subject: Re: [sane-devel] Where can I find a port of SANE Backend for
        Windows?
To: sane-devel at lists.alioth.debian.org
Message-ID: <20060601142109.GA12469 at meier-geinitz.de>
Content-Type: text/plain; charset=us-ascii

Hi,

On 2006-05-31 13:03, Kerry Menzel wrote:
> I have a C application that runs on Window and Linux. I would like to use
> SANE to access a scanner on both windows and Linux so I have a consistent
> backend. I've been trying to follow links to SANE on windows, but most of
> the links are broken or they are for the front end.

At least in principle, sane-backends can be built on Windows
out-of-the-box. See the README.windows that comes with the
sane-backends distribution. However I haven't checked if that works
for some time.

Bye,
  Henning



------------------------------

Message: 4
Date: Thu, 1 Jun 2006 16:29:28 +0200
From: Henning Meier-Geinitz <henning at meier-geinitz.de>
Subject: Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
To: sane-devel at lists.alioth.debian.org
Message-ID: <20060601142928.GB12469 at meier-geinitz.de>
Content-Type: text/plain; charset=us-ascii

Hi,

On 2006-05-31 09:07, m. allan noah wrote:
> On Tue, 30 May 2006, Jim McQuillan wrote:
>
> >Ok, I tried using scanimage without saned, and it works !!!!!
> >Now, I need to figure out how to get saned working with this backend.
>
> Anyone here can give me any pointers? i wont rule out a bug in the
> backend, but i dont know enough about saned to even start troubleshooting.
>
> what we see is that scanimage via saned is giving random buffer sizes to
> the calls to sane_read.

Thats ok. Any buffer size is acceptable by the SANE standard, even
only one byte. You may get a similar error when running scanimage -T.

The fujitsu backend seems to assume that the buffer is at least one
scan line:

 bytes -= (bytes % s->params.bytes_per_line);

Bye,
  Henning




------------------------------

Message: 5
Date: Thu, 1 Jun 2006 10:46:04 -0400 (EDT)
From: "m. allan noah" <anoah at pfeiffer.edu>
Subject: Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
To: sane-devel at lists.alioth.debian.org
Message-ID: <Pine.LNX.4.61.0606011040320.17939 at limos.pfeiffer.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 1 Jun 2006, Henning Meier-Geinitz wrote:

> Hi,
>
> On 2006-05-31 09:07, m. allan noah wrote:
>> On Tue, 30 May 2006, Jim McQuillan wrote:
>>
>>> Ok, I tried using scanimage without saned, and it works !!!!!
>>> Now, I need to figure out how to get saned working with this backend.
>>
>> Anyone here can give me any pointers? i wont rule out a bug in the
>> backend, but i dont know enough about saned to even start
troubleshooting.
>>
>> what we see is that scanimage via saned is giving random buffer sizes to
>> the calls to sane_read.
>
> Thats ok. Any buffer size is acceptable by the SANE standard, even
> only one byte. You may get a similar error when running scanimage -T.
>
> The fujitsu backend seems to assume that the buffer is at least one
> scan line:
>
> bytes -= (bytes % s->params.bytes_per_line);

yes- the code is simplistic, and assumes that the frontend is not trying
to fill an arbitrary buffer size exactly.

saned requests 8188 bytes, backend only returns 7656, cause that is an
even number of scanlines. the difference is 532. then saned asks for 528
bytes on the next attempt? why not 532? why not just transmit the 7656?

i will buffer a block in the backend and return pieces of it.

allan

--
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera



------------------------------

Message: 6
Date: Thu, 1 Jun 2006 16:45:27 +0200
From: Henning Meier-Geinitz <henning at meier-geinitz.de>
Subject: Re: [sane-devel] libsane.usermap entry Epson Perfection 1660
        Photo
To: sane-devel at lists.alioth.debian.org
Message-ID: <20060601144527.GC12469 at meier-geinitz.de>
Content-Type: text/plain; charset=us-ascii

Hi,

On 2006-05-25 23:38, Andreas G. Filzer wrote:
> Please add this to libsane.usermap and
> have a lot of fun ;-)

Thanks. It's already in that file in the development version of SANE.

Bye,
  Henning



------------------------------

Message: 7
Date: Thu, 1 Jun 2006 16:52:09 +0200
From: Henning Meier-Geinitz <henning at meier-geinitz.de>
Subject: Re: [sane-devel] Sane Network with Niash
To: sane-devel at lists.alioth.debian.org
Message-ID: <20060601145209.GD12469 at meier-geinitz.de>
Content-Type: text/plain; charset=us-ascii

Hi,

On 2006-05-24 00:19, Mike Petersen wrote:
> I got a problem with sane using it via network. I just got a new scanner
an HP
> scanjet 3400C which works on the machine with the niash backend. I want to
> use the scanner also over network (the other scanner (parallel) works),
but
> it doesn't work. I got the following info out of the logs :

Enabling more debugging may help to locate the problem:

On the client:
export SANE_DEBUG_NET=255 scanimage ... >image.pnm

On the server (avoid starting saned from (x)inetd, instead run it
manually):

export SANE_DEBUG_NIASH=255
saned -d128

Bye,
  Henning



------------------------------

Message: 8
Date: Thu, 1 Jun 2006 16:53:37 +0200
From: Henning Meier-Geinitz <henning at meier-geinitz.de>
Subject: Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
To: sane-devel at lists.alioth.debian.org
Message-ID: <20060601145337.GE12469 at meier-geinitz.de>
Content-Type: text/plain; charset=us-ascii

Hi,

On 2006-06-01 10:46, m. allan noah wrote:
> saned requests 8188 bytes, backend only returns 7656, cause that is an
> even number of scanlines. the difference is 532. then saned asks for 528
> bytes on the next attempt? why not 532? why not just transmit the 7656?

IIRC, saned uses the first 4 bytes in the data stream for the size of
the data that is transmitted.

Bye,
  Henning



------------------------------

Message: 9
Date: Thu, 1 Jun 2006 11:14:09 -0400 (EDT)
From: "m. allan noah" <anoah at pfeiffer.edu>
Subject: Re: saned help? (was Re: [sane-devel] Fujitsu 5120C)
To: sane-devel at lists.alioth.debian.org
Message-ID: <Pine.LNX.4.61.0606011112550.17939 at limos.pfeiffer.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 1 Jun 2006, Henning Meier-Geinitz wrote:

> Hi,
>
> On 2006-06-01 10:46, m. allan noah wrote:
>> saned requests 8188 bytes, backend only returns 7656, cause that is an
>> even number of scanlines. the difference is 532. then saned asks for 528
>> bytes on the next attempt? why not 532? why not just transmit the 7656?
>
> IIRC, saned uses the first 4 bytes in the data stream for the size of
> the data that is transmitted.

does that mean that if i actually gave it 8188 bytes, it would drop 4 of
them? i need to look at saned more closely...

allan

--
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera



------------------------------

_______________________________________________
sane-devel mailing list
sane-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/sane-devel


End of sane-devel Digest, Vol 12, Issue 2
*****************************************



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin at patni.com and delete this mail. 
_____________________________________________________________________


More information about the sane-devel mailing list