# How to support a scanner without documentation

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Sun Jun 18 2000 - 11:26:30 PDT

- Next message: John Fremlin: "Re: How to support a scanner without documentation"
  - Previous message: Henning Meier-Geinitz: "New Mustek backend released (1.0-86)"
  - Next in thread: John Fremlin: "Re: How to support a scanner without documentation"
  - Reply: Simon Edwards: "Re: How to support a scanner without documentation"
  - Reply: Jochen Eisinger: "Re: How to support a scanner without documentation"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Hello SANE developers,

  as Mustek doesn't provide any programming documentation for their scanners I
  had to use different methods more then once. Maybe other developers can take
  advantage of them. Don't hesitate to add more experiences.

  The Problem:
  I have a Scanner supplied with a MS Windows driver and want to
  support it by a SANE backend. I need to know the SCSI commands and
  buffers the driver sends to the scanner (and the scanner's response).
  The same goes for USB and parallel port scanners.
  (Maybe-) solutions:

  1) WINE: Some Windows drivers can be used with WINE.

  SCSI:
  I had success with a Mustek ScanExpress 12000SP. This works if the
  scanner driver is able to connect to a SCSI adapter using ASPI
  (Adaptec's "standard" for talking directly to SCSI devices; similar to
  sg driver for Linux). If the Windows driver can only use the SCSI
  adapter supplied by the manufacturer we are out of luck. Otherwise the
  WINE ASPI libs can be used. There is some information about this in the
  documentation directory of WINE. Be sure WINE's libs are used
  (wine.conf). Debugging can be enabled by wine --debugmsg aspi progname.
  If this is not sufficient more debug output can be added in WINE or
  the kernel driver (e.g. drivers/scsi/sg.c for Linux).

  Parallel port:
  I haven't tried this but there is support for similar tricks for
  parallel port devices: read documentation/ioport-trace-hints.
  USB:
  I haven't found anything about USB in WINE but as my Windows 95 doesn't
  have any USB support I didn't try hard.

  2) VMWARE: This doesn't work at the moment because only SCSI disks and
  tapes are supported. According to VMWARE this may change in future.
  I haven't checked parallel and USB devices.
  3) Windows spy programs: I could only find one such program. It's in the
  aspisdk from Adaptec ("aspispy.exe"). This program connects to the ASPI
  layer and records any ASPI commands sent to a device. That's nice, but
  it doesn't seem to be able to print the buffers sent by drivers. Maybe
  there are commercial solutions but I couldn't find information about
  this type of program.
  I don't know about parallel port and USB spies.

  4) Wrapper SCSI dll: I have written a small dll which wraps the Windows
  winaspi.dll and sends all the SCSI commands and the beginnings of the
  buffers to a text file. This was pretty helpful for supporting the
  Mustek Paragon 1200 A3 Pro. It only works if the scanner driver can
  connect to ASPI complient SCSI adapters and doesn't insist on their own
  adapter. The wrapper dll is written in Delphi 1 and is for the 16 bit
  winaspi.dll only (not wnaspi32.dll). If somebody is interested I can
  email the dll and source code.

  5) Disassembling the Windows driver: I have never done this, other people
  on this list may talk about this. I think it's a lot of work and needs
  good understatement of assembler and the windows API.
  6) Hardware solutions: There are SCSI hardware debuggers but they seem
  to be pretty expensive. Same goes for USB and parallel port.

  hope this helps,

  Henning

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

  - Next message: John Fremlin: "Re: How to support a scanner without documentation"
  - Previous message: Henning Meier-Geinitz: "New Mustek backend released (1.0-86)"
  - Next in thread: John Fremlin: "Re: How to support a scanner without documentation"
  - Reply: Simon Edwards: "Re: How to support a scanner without documentation"
  - Reply: Jochen Eisinger: "Re: How to support a scanner without documentation"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Sun Jun 18 2000 - 12:11:29 PDT