summaryrefslogtreecommitdiff
path: root/README.os2
blob: 978f1d3c761370146ce96223239d99e792c447d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
2002-01-03

Look at http://home.tiscalinet.de/fbakan/sane-os2.htm for information about
compiling SANE on OS/2 (from Franz Bakan).


The following text was for 1.0.3, but it may help nevertheless.


   SANE 1.03 for OS/2 - build 1
   ----------------------------
   09 Jul 2000, Yuri Dario <mc6530@mclink.it>


WARNING:
--------
This release of has been compiled with EMX 0.9D, so it doesn't work with
the previous runtime. You must upgrade to the latest runtime before running
SANE (actually EMX 0.9D fix 03).


SANE (Scanner Access Now Easy)
------------------------------
For more info about the SANE Project, please visit

	http://www.sane-project.org/

You should also check the main site for an updated list of supported scanners.

Note that I can't say you if your scanner is supported; check SANE homepage
instead.


SUPPORT
-------
I'm sorry to tell you that it is hard for me to help you: if your scanner
doesn't work or your problem can't be reproduced on my pc, there are high
choices that I can't fix the bug. Most problems are specific to same PC/scanner
combinations, and can't be solved without having a full development environment
and programming experience.

I have setup a mailing list for users, where I hope most people can find an
answer to their questions. You will find that I answer only sometimes, because
I'm too busy.
To subscribe please visit

	http://www.egroups.com

and look for sane-os2, or fill the form available on my site.


DOCUMENTATION
-------------
To read docs with correct format, you should type

	more < doc\sane-epson.txt

If someone has more ideas on how to get a correct .txt starting from a .man
file, he is welcome (actually I'm using groff).


INSTALLATION
------------
If you already didn't it, install the correct driver for your scsi adapter.
The drivers has usually a .ADD extension and looks like

	BASEDEV=AHA154X.ADD

Then you need the ASPI driver: this driver is already in your OS2\BOOT
directory, so you have only to add

	BASEDEV=OS2ASPI.DMD /ALL

The /ALL switch is required only if you need to use other devices with
aspirout.sys, e.g. if you have a CD-RW and CDRecord/2 installed.

Last, add aspirout.sys to your config.sys

	DEVICE=D:\OS2\BOOT\ASPIROUT.SYS

N.B. you can change the path to other directories.
Now reboot.

To run scanimage.exe you need also to download the latest EMX runtime,
available on Hobbes or Leo as emxrt.zip.

find-scanner.exe can be used to recognize a scanner on the scsi bus. Then
you should edit your xxx.conf file and add the scanner address, a string like
b0t4l0. This can be simplified using autodetection: with autodetection you can
use a string like

	scsi EPSON

in your xxx.conf file; the autodection will enable the backend that recognize
'EPSON' in the scanner id.

To test scanimage, run

	scanimage --help

you should see your scanner following the list of internal devices:

	List of available devices:
	    pnm:0 pnm:1

If it is not present, check your scsi driver, the aspi driver OS2ASPI.DMD and
aspirout.sys; on Warp4 you can use the Hardware Manager to check scanner
presence. Then look at your xxx.conf, maybe there is something wrong in the
text.


USAGE:
------
Once configured your system, create a proper .conf file (edit one of the
supplied templates) and run

	scanimage -L

The output should be like

	device `umax:b0t3l0' is a UMAX     Vista-S8         flatbed scanner
	device `pnm:0' is a Noname PNM file reader virtual device
	device `pnm:1' is a Noname PNM file reader virtual device

The pnm devices are always available, while on the first line you should
read the id of your scanner.

A simple scan

	scanimage -d umax > test.pnm

will do a scan with default parameters. Run

	scanimage -d umax --help

to get a full list of available switches.


SANED:
------
In this release the SANE network daemon can be used (with a limit).
First edit your \mptn\etc\services and add

sane            6566/tcp   # SANE network scanner daemon

(maybe a reboot is required to apply that change).
Create a saned.conf in the same directory of saned.exe and add a list of valid
client addresses; the clients are allowed to access the local scanner.
Now run the server in debug mode

	saned -d

On the client side, you need to create a net.conf file in the same directory
of scanimage.exe: here you have to add a list of valid saned servers.
Run

	scanimage -L

The output is like this

device `umax:b0t3l0' is a UMAX     Vista-S8         flatbed scanner
device `pnm:0' is a Noname PNM file reader virtual device
device `pnm:1' is a Noname PNM file reader virtual device
device `net:pippo.intranet:umax:b0t3l0' is a UMAX     Vista-S8      flatbed scanner
device `net:pippo.intranet:pnm:0' is a Noname PNM file reader virtual device
device `net:pippo.intranet:pnm:1' is a Noname PNM file reader virtual device

Then saned will quit. To run it forever, you have to configure the INETD
daemon: create a \mptn\etc\inetd.lst with the following line

	sane   tcp /rd/sane/sane-1.0.1/frontend/saned.exe

Be aware that this configuration shouldn't work: I have been unable to get it
working on my PC without running saned under the debugger PMGDB.
The correct syntax for running scanimage over the net is

	scanimage -d net:HOSTNAME:umax:b0t3l0 > test.pnm

where HOSTNAME is a valid DNS host name.
You can log server access using syslogd: if syslogd is running, saned will
send to it all messages.


HOW TO COMPILE:
---------------
To compile SANE with emx, you need

- EMX 0.9D
- GNU Make 3.75 (rename to make.exe)
- GNU Patch 2.5
- KSH 5.2.13 (rename to sh.exe)
- GNU Bison
- GNU File utilities
- GNU SED (stream editor)
- Autoconf 2.13

Steps:
- untar the original Unix distribution;
- unzip this file somewhere;
- copy src\* into sane-1.0.1;
- enter sane-1.0.1 directory;
- apply patches to original distribution:
    [...\sane-1.0.1]gnupatch -p 0 < patch.os2
- run autoconf to rebuild the configure script
- edit configure and change autoconf default optimization flags;
  search for -O2 -m486 and change to your preferred settings;
- add the following line after :${LDFLAGS="...."}
  : ${LIBS="-lsocket"}
- run configure.os2 to build all installation files;
- add -Zexe to LDFLAGS in frontend\Makefile and tools\Makefile;
- run make (compiler warnings are ok);
- wait to complete all makes;

Remember to install a Unix like shell in your path; I use ksh.exe
renamed to sh.exe, and saved in d:\bin
(that's because most unix scripts uses SHELL=/bin/sh)

You need also a compatible dl.a and syslog.a library; look in .\contrib
for a couple of simple sources.

Flags needed under EMX:
-Zsysv-signals	enables signal management as in SystemV, otherwise emx
                convention is used (and it is different from sysv).
-Zcrtdll	link dynamically with EMXLIBCM.DLL;


PARALLEL PORT
-------------
This release has support for parallel port enabled: actually only the Epson
backend makes uses of such support; the Epson GT-300 can be recognized, but
scanning can't be completed.

Also HP-5100C parallel scanner can be run under OS/2: you need to download
the EPST driver from Shuttle Tech. homepage (www.shuttletech.com); follow the
instruction for installation. Then the scanner is seen as a scsi HP, so the
HP backend can work with it.

The Quickcam backend is also included with lpt support, but I can't say how it
is working.

History:
--------
09 Jul 2000 release 1.03

20 Jun 1999 release 1.01
	- changed runtime to EMX 0.9D
	- fixed: find-scanner should now work correctly.
	- added: how to compile instructions.

07 Mar 1999 release 1.01 pre-test3
	no OS/2 specific fixes

20 Oct 1998 release 0.74
	fixed fork()ing backends with new sanei_thread api.
	fixed scsi autodetection
	added parallel port support

===============================================================================
Yuri Dario <mc6530@mclink.it>
http://www.quasarbbs.com/yuri