# Re: Info Peripherals' ImageReaderISA

becka@rz.uni-duesseldorf.de
Sun, 28 Feb 1999 12:12:40 +0100 (MET)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: David Mosberger-Tang: "Re: Porting SANE backends"
- Previous message: Milon Firikis: "Re: Porting SANE backends"
- In reply to: Dennis Putnam: "Info Peripherals' ImageReaderISA"

HI !

> As I understand the supported devices list, the subject scanner is not
> supported by 'sane'. However, I have a couple of generic questions
> that I can't seem to get from the documentation which apparenly
> assumes a lot of knowledge on the part of the reader.

Then we should improve the docs ... Suggestions welcome.

> 1) It appears that 'sane' expects the Linux kernel to recognize the
> device, correct?

No. SANE supports mostly SCSI scanners, which due to the SCSI standard
have a method to query the devicetype.

Thus the Linux kernel "recognizes" the device as some generic SCSI device
with some vendor name given to it:

Host: scsi1 Channel: 00 Id: 06 Lun: 00
Vendor: MUSTEK Model: MFS-12000SP Rev: 1.00
Type: Scanner ANSI SCSI revision: 01

The Linux kernel has no idea of how to actually talk to the scanner.
That knowledge is in the SANE drivers.

> If so then where and how are the device drivers added?

Directly in the SANE source.

> Are the supported device drivers 'modprobe'd in (i.e. 'modprobe
> sane-xxxx') or is there some kernel option I missed that brings in
> drivers?

No. For the SCSI devices, you need support for the SCSI adapter and
for "generic SCSI support" in the kernel. The scanner driver itself
runs userspace from within SANE.
This may be a little different for other types of scanners, but usually
you do not need a per-scanner-type module for the kernel. Scanners with
proprietary adapter cards, like many handscanners, would be different
in that respect.

> Am I confusing the backend drivers with device drivers and if
> so where does one get the device drivers if not included in the 'sane'
> distribution?

They are in there. You need the SCSI-generic support, and that's it.
The backend _is_ the driver.

> 2) Where is the documentation for defining /dev/scanner?

There is none, because :

> I assume there probably is a symbolic link to the real /dev but how
> is it created and how is it identified?

ln -sf /dev/sg?? /dev/scanner

The appropriate dev/sg is identified by looking at /proc/scsi/scsi.
Count the entries, _all_ of them, starting at '0' or 'a' depending
on how your distribution names them (RedHat has both), and finding
the entry that comes from the scanner, like above.

> 3) Since the ImageReader is TWAIN compliant is there not a generic
> TWAIN backend that should work with TWAIN compliant scanners? Or is
> TWAIN an insufficiently defined standard to actually allow a generic
> software solution?

TWAIN isn't sane. Not at all. TWAIN defines how Win or Mac programs call
a scanner driver. The main API call is something like "bring up some nice
dialog, ask for user input, do the scan and give me the result".

So TWAIN says _nothing_ about the HW-Protocol.

CU, ANdy

    --
    = Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =
    ========  GGI - The Right Thing To Do : http://www.ggi-project.org/   ========

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

     Next message: David Mosberger-Tang: "Re: Porting SANE backends"
     Previous message: Milon Firikis: "Re: Porting SANE backends"
     In reply to: Dennis Putnam: "Info Peripherals' ImageReaderISA"