[sane-devel] dell 1600n

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 2 Jun 2005 19:39:07 +0200


Hi,

On Sun, May 29, 2005 at 10:17:45PM +0100, Jon Chambers wrote:
> Having spent some time with ethereal I have a working proof-of-concept
> driver for network scanning, written as a little perl script (it
> supports colour scanning in JPEG format - monochrome in PDF/TIFF requires
> some more messing about with file headers).

Could you upload this script to a website so we can link to it?

> I thought that the next obvious step would be to write a SANE driver.  I
> have never used SANE before (I have never owned a scanner before) but
> looking through the SANE docs I don't see any other network scanners
> listed which I might use as a starting point.

As far as I know, there is really no network scanner supported by SANE
directly.

> Additionally I wonder how well this scanner will fit into the SANE
> framework:  My (newbie) understanding of SANE is that it provides a
> standard API to a raster device whereby the caller initiates a scan and
> then reads back the raw raster data?  The Dell 1600n network scanning
> works in the following way:
> 
> - driver locates scanner by listening for multicast messages (In Windows
>   this is a "one off" when you set up your Dell 1600n)

So the scanner sends multicast messages continously? (I'm not a
network expert so my questions may be dumb :)

This "listening" could be done in sane_find_devices, but it should be
quite fast. Otherweise every user of other scanners would have to wait
for the network scanner to be found.

Or you need an external daemon running on the Unix system which
connects to the scanner and provides access for a SANE backend.

> - driver registers with scanner by sending a UDP message

Could be done in sane_open().

> - person walks up to scanner, presses "scan" button and selects named
>   driver from a list of available ones (those which have registered)
> - scanner sends driver UDP message asking for a TCP connection

The user must press the scan button of xsane before walking to
the scanner. He has to select the scanmode/resolution anyway.
Then the backend waits for the UDP message.

An alternative would be a process that's forked in sane_open which
waits for the UDP message. The scan could be done in the background
and the image is sent to the frontend when the scan button in the
frontend is pressed. This is quite messy, however, as the usual SANE
behaviour isn't used and you never know when the options you set up
are actually sent to the scanner.

> - driver opens TCP connection to printer and sends its preferred format
>   (eg: monochrome PDF 200 dpi)
> - person optionally selects actual desired format at scanner panel (eg:
>   colour JPEG 200 dpi)
> - person selects "start scanning" at scanner panel
> - scanner sends data to driver in JPEG/PDF/TIFF format.
> - person optionally answers "yes" to "more documents" prompt
> - scanner either closes TCP connection or sends more data
> 
> Is this behaviour suitable for a SANE backend?

I guess it's possible to use a SANE backend to do this but it's most
probably not elegant.

I find this model of setting up stuff at two locations quite unusual,
anyway. The network scanners I know do the complete setup on the
scanner itsself and provide the documents either by email or on an ftp
server/network share.

Bye,
  Henning