[sane-devel] Agfa Scanner

Daniel Glöckner daniel-gl at gmx.net
Sun Mar 2 22:21:27 UTC 2008


On Sun, Mar 02, 2008 at 03:04:12PM +0100, Roberto Rizzo wrote:
> Thanks for your answer but I would understand how to use umacer.c and
> snapscan-pp.diff files.
> Have you got some links to give me?
> And another thing...
> If I want get what Mirascan(driver for AcerScan 620p)sends to the scanner I
> must connect it through an inspection printed-board to drive signals both to
> scanner and this circuit or there's something easy like a software?

So you want to complete the driver?

The driver writes directly to the I/O addresses, so Portmon doesn't work.
Maybe one can use an emulator or virtual machine (Bochs, QEMU, VMWare, ...)
to log access to the ports.

I think it's easier to disassemble the Windows driver.
Use IDA Pro Freeware (http://www.hex-rays.com/idapro/idadownfreeware.htm)
on Eppenum.sys (280336 Bytes, distributed with MiraScan 3424P).
The interesting stuff starts at function EPPRunPhase.

The connect sequence tells the scanner to listen up. Prior to that
sequence it forwards everything to the printer. The sequence also tells
the scanner which bi-directional mode to use and I suspect it calibrates
the scanner for the timing of the computer. If there is no mode which
allows us to pause at any time for several milliseconds, we need to block
interrupts...

To understand the driver you need to know how SCSI works (reading
http://tldp.org/LDP/khg/HyperNews/get/devices/scsi.html up to
"Getting Started" is enough for the beginning).

And you need to know about the parallel port:
http://www.beyondlogic.org/spp/parallel.htm
http://www.beyondlogic.org/epp/epp.htm
http://www.beyondlogic.org/ecp/ecp.htm

http://technet.microsoft.com/de-de/sysinternals/bb896647(en-us).aspx
might help identify the chipset (7107P or 2103A). The driver prints
several strings using DbgPrint.

The actual SCSI commands used by the scanner are probably already
all implemented in the snapscan backend. Maybe it works to use the
Cygwin Sane build with the eppscsi driver to verify that.

  Daniel




More information about the sane-devel mailing list