How SANE works
SANE (simplified) consists of 2 Parts. The
frontends and the
backends.
The frontends are the same for all scanners.
Frontends are for example:
scanimage.exe,
xscanimage.exe,
xcam.exe or
xsane.exe
The scanner-model-specific
backends are all in
libsane.dll.
To make SANE work you need a
backend.conf file that works for your hardware.
And this
backend.conf file has to be in the right place!
The steps needed to make SANE work on OS/2
- Which backend.conf file do you need?
To find out which backend.conf file you need, enter your Scanner-Model to the
SANE-Search-Engine
and see whether your scanner is supported at all and (if it is) which backend is
responsable for your scanner.
Be aware that scanner-name and backend-name do not match in all cases!
-
If your scanner is supported create a directory for your sane-configuration-file(s)
SANE comes from the unix-world and so the natural place for this directory would be
x:\home\.sane where HOME is the value of an environement-variable set in config.sys.
So normally you need in config.sys the following lines:
SET HOME=x:\home
SET SANE_CONFIG_DIR=x:\home\.sane
where x: has to be replaced with your real drive-letter and
x: should be the same letter to which you unpacked your
sane-package and where eventually your other gnu-unix-software lives.
-
If you have a SCSI-scanner you additionally need the
ASPIROUT.SYS
- device-driver from Paul Ratcliffe
and the lines
BASEDEV=OS2ASPI.DMD /ALL (or BASEDEV=OS2ASPI.DMD /ALL /SHARE)
DEVICE=X:\OS2\BOOT\ASPIROUT.SYS
in your config.sys
-
Now it's time to reboot.
-
Then run sane-findscanner.exe and see what it reports.
Example:
I have two scanners, both connected to differnt SCSI-adapters.
And in my case sane-findscanner.exe reports:
found SCSI processor "EPSON SCANNER GT-9500 1.12" at b0t6l0
found SCSI scanner "SCANNER 2.03" at b1t6l0
If your SCSI scanner is not found check if your scsi-driver finds
the scanner (cabling may be wrong, termination is critical or something
else does not work).
Example: In my case I had an adaptec-scsi-card installed and connected
my mustek-scanner to this adapter. I knew that configuration once worked
but after installing eCS or some device-driver-fixpack
sane-find-scanner did not find the scanner. So I added the /V switch
after the relevant BASEDEV=AIC7870.ADD in my config.sys and rebooted.
I could see that AIC7870.ADD did not detect my scanner and was not
loaded in consequence. I replaced the AIC7870.ADD file in \OS2\BOOT
with an older version an BINGO now the scanner was found and
sane-find-scanner.exe worked again
-
Now copy the *.conf file for your specific scanner(s) from
\usr\etc\sane.d
to your
SANE_CONFIG_DIR.
You eventually have to edit your backend.conf file in your SANE_CONFIG_DIR.
-
If your backend-code supports auto-detection your probably won't have
to edit your backend.conf file. The important line (for example):
scsi EPSON
will enable that your scanner will be found by the frontends.
(But in my case I you could also put
b0t6l0
into the epson.conf file instead of
scsi EPSON
and the scanner is also would be detected)
-
If your backend-code does not support auto-detection you have
to place the devicename (the six characters after 'at') that was
reported by sane-find-scanner.exe into your backend.conf file.
Example: In case of my mustek-scanner I have to place a line containing
b1t6l0
into the file mustek.conf
That's normally all what your backend.conf file needs.
Lines starting with # are comments.
For the extra options that could be placed into your
backend.conf file you have to study the man-page for
your scanner.
-
If you have a parallel-port scanner sane-find-scanner won't report
the device-name where your scanner is connected to. You have to
read the man-pages for the value you have to place to backend.conf
(That's the theory, but I personally don't know of any
parallelport-scanner that has been reported to work with SANE for OS/2,
but in theory it could work.)
-
The next thing you have to check is whether
scanimage -L
finds your scanner.
If everything is OK you will get something like:
D:\>scanimage.exe -L
[epson] Requesting extended status
[epson] No error
[epson] Checking for ADF: (00)
[epson] Checking for TPU: (00)
[epson] Device name = GT-9500
device `epson:b0t6l0' is a Epson GT-9500 flatbed scanner
device `test:0' is a Noname frontend-tester virtual device
device `test:1' is a Noname frontend-tester virtual device
device `mustek:b1t6l0' is a Mustek 600S/600 II CD flatbed scanner
and you will find those device lines reporting your scanner-model.
If not, something is wrong. Probably your backend.conf file doesn't
contain the right devicename or is not found by scanimage.exe
- If you get something like
SYS1804: File JPEG can not be found
jpeg.dll
is missing in your LIBPATH.
- Be shure that the correct version of jpeg.dll is found! Newer Java versions
install their own version of jpeg.dll somewhere in front in the LIBPATH.
This results in scanimage.exe leaving an entry in POPUPLOG.OS2 instead
of scanning images.
- With the help of the examples in the table below you now should get a file image.pnm
with
scanimage ...needed parameters... 1>image.pnm from
your scanner.
- If it doesn't work you could enable DEBUG-Messages. For details look into the
files in /usr/man/man5/
Example:
set SANE_DEBUG_SANEI_SCSI=3
set SANE_DEBUG_EPSON=3
scanimage --device=epson 1>image.pnm 2>errors.txt
- If it still doesn't work, there is a
OS/2 SANE Mailing-List,
where you can ask for help. You also can drop me a note.
-
Run
scanimage --help >scanimage-command-line-parameters.txt
to get a list of supported commandline-parameters for your scanner.
Sample configuration files and examples from scanners known to work with SANE for OS/2
| Scanner |
SANE-Version(s) known to work |
Name of configuration-file |
The important line(s) you need in the configuration-file See below! |
Example for how to call scanimage |
| Agfa SnapScan 1236 SCSI |
1.06 |
hp.conf |
bxtdl0
|
scanimage -d snapscan:bxtdl0 >image.pnm
|
| Epson ES-1000c |
1.0.7 |
epson.conf |
scsi epson
|
scanimage 1>image.pnm 2>errors.txt
|
| Epson GT-9500 |
1.0.5 - 1.0.13 |
epson.conf |
scsi epson
|
scanimage 1>image.pnm 2>errors.txt
|
| HP ScanJet IIC (HP C1750A) revision 3125 |
0.74 |
hp.conf |
scsi HP
|
scanimage -d hp bxtdl0 --mode lineart -l 0 -t 0 -x 190 -y 260 --resolution 300 > image.pnm
|
| HP ScanJet 4p |
0.66.1 |
hp.conf |
bxtdl0
|
scanimage -d hp -l 0 -t 0 -x 215.8 -y 279.4 --mode Lineart --brightness 19 --contrast 0 --resolution 300 > image.pnm
|
| Medion MD9890 (OEM-version of Mustek 1200CP) |
1.0.11 - 1.0.12 |
mustek_pp.conf |
scanner MD9890 0x378 cis1200 option bw 127
|
scanimage --device=mustek_pp 1>image.pnm 2>errors.txt
|
| Microtek ScanMaker E6 |
1.0.9, 1.0.12 |
microtek.conf |
bxtdl0
|
scanimage -d microtek -l0 -t0 -x 102 -y 102 --resolution 100 --format tiff >Image.tif
|
| Microtek Scanmaker 330 |
1.0.9 |
microtek2.conf |
bxtdl0
|
|
| Microtek Scanmaker 630 |
1.0.5 - 1.0.13 |
microtek2.conf |
bxtdl0
|
scanimage -d microtek2:bxtdl0 -l2 -t2 -x60 -y60 --resolution 150 --format tiff 1>image.tif
|
| Microtek Scanmaker V6USL |
1.0.7 |
microtek2.conf |
bxtdl0
|
scanimage -d microtek2:bxtdl0 1>image.pnm 2>errors.txt
|
| Mustek 600 II CD |
1.0.3 - 1.0.13 |
mustek.conf |
bxtdl0
|
scanimage --device=mustek 1>image.pnm 2>errors.txt
|
| Nikon Coolscan LS-1000 |
1.0.15 |
coolscan.conf |
scsi Nikon
bxtdl0
|
scanimage -d coolscan:scsi:bxtdl0 1>image.pnm
|
| Nikon Coolscan LS-2000 |
1.0.9 |
coolscan2.conf |
auto
|
scanimage -d coolscan2:scsi:bxtdl0 --ae --autofocus --format=tiff 1>image.tif
|
| Nikon LS-30 |
1.0.13 |
coolscan2.conf |
auto
|
scanimage -d coolscan2:scsi:bxtdl0 --ae --autofocus --format=tiff 1>image.tif
|
| Pie Devcom9636Pro |
1.0.13 |
pie.conf |
bxtdl0
|
scanimage --device=pie 1>image.pnm
|
| Sharp Jx250 |
1.0.11 |
sharp.conf |
bxtdl0
|
|
| UMAX Astra 610S |
1.0.5 |
umax.conf |
scsi UMAX*
bxtdl0
|
scanimage.exe -d umax --resolution 300 1>image.pnm
|
| UMAX Astra 1220S |
|
umax.conf |
scsi UMAX*
|
|
IMPORTANT:
You have to replace
x with the logical bus-number of the scsi-adapter and
d
with scsi-device-ID of your scanner.
sane-find-scanner.exe should report the correct value. For example:
b0t6l0 means scanner is connected to the 1. logical scsi-card (
0) and has scsi-device-ID
6
b1t3l0 means scanner is connected to the 2. logical scsi-card (
1) and has scsi-device-ID
3
If you use wrong digits here, you might leave your hard-disk unusable!
For comments and additions to the table
drop me a note.
Last modified 7 December 2006, Franz Bakan