Written by Bruce Milner <>; Additions by Andreas Mohr <andi@rhlx01.fht-esslingen.de>
(Extracted from wine/documentation/aspi)
This file describes setting up the Windows ASPI interface.
Warning/Warning/Warning!!!!!! |
This may trash your system if used incorrectly. It may even trash your system when used correctly! |
Now that I have said that. ASPI is a direct link to SCSI devices from windows programs. ASPI just forwards the SCSI commands that programs send to it to the SCSI bus.
If you use the wrong SCSI device in your setup file, you can send completely bogus commands to the wrong device - An example would be formatting your hard drives (assuming the device gave you permission - if you're running as root, all bets are off).
So please make sure that all SCSI devices not needed by the program have their permissions set as restricted as possible !
Cookbook for setting up scanner: (At least how mine is to work) (well, for other devices such as CD burners, MO drives, ..., too)
The scanner software needs to use the "Adaptec" compatible drivers (ASPI). At least with Mustek, they allow you the choice of using the builtin card or the "Adaptec (AHA)" compatible drivers. This will not work any other way. Software that accesses the scanner via a DOS ASPI driver (e.g. ASPI2DOS) is supported, too. [AM]
You probably need a real windows install of the software to set the LUN's/SCSI id's up correctly. I'm not exactly sure.
Your SCSI card must be supported under Linux. This will not work with an unknown SCSI card. Even for cheap'n crappy "scanner only" controllers some special Linux drivers exist on the net. If you intend to use your IDE device, you need to use the ide-scsi emulation. Read http://www.linuxdoc.org/HOWTO/CD-Writing-HOWTO.html for ide-scsi setup instructions.
Compile generic SCSI drivers into your kernel.
This seems to be not required any more for newer (2.2.x) kernels: Linux by default uses smaller SCSI buffers than Windows. There is a kernel build define SG_BIG_BUFF (in sg.h) that is by default set too low. The SANE project recommends 130560 and this seems to work just fine. This does require a kernel rebuild.
Make the devices for the scanner (generic SCSI devices) - look at the SCSI programming HOWTO at http://www.linuxdoc.org/HOWTO/SCSI-Programming-HOWTO.html for device numbering.
I would recommend making the scanner device writable by a group. I made a group called scanner and added myself to it. Running as root increases your risk of sending bad SCSI commands to the wrong device. With a regular user, you are better protected.
For Win32 software (WNASPI32), Wine has auto-detection in place. For Win16 software (WINASPI), you need to add a SCSI device entry for your particular scanner to ~/.wine/config. The format is [scsi cCtTdD] where "C" = "controller", "T" = "target", D=LUN
For example, I set mine up as controller 0, Target 6, LUN 0.
[scsi c0t6d0] "Device" = "/dev/sgi" |
The mustek scanner I have was shipped with a package "ipplus". This program uses the TWAIN driver specification to access scanners.
(TWAIN MANAGER)
ipplus.exe <-> (TWAIN INTERFACE) <-> (TWAIN DATA SOURCE.ASPI) -> WINASPI |
The biggest is that it only works under Linux at the moment.
The ASPI code has only been tested with:
a Mustek 800SP with a Buslogic controller under Linux [BM]
a Siemens Nixdorf 9036 with Adaptec AVA-1505 under Linux accessed via DOSASPI. Note that I had color problems, though (barely readable result) [AM]
a Fujitsu M2513A MO drive (640MB) using generic SCSI drivers. Formatting and ejecting worked perfectly. Thanks to Uwe Bonnes for access to the hardware ! [AM]
I make no warranty to the ASPI code. It makes my scanner work. Your devices may explode. I have no way of determining this. I take zero responsibility!