1141cc406Sopenharmony_ci2002-01-03
2141cc406Sopenharmony_ci
3141cc406Sopenharmony_ciLook at http://home.tiscalinet.de/fbakan/sane-os2.htm for information about
4141cc406Sopenharmony_cicompiling SANE on OS/2 (from Franz Bakan).
5141cc406Sopenharmony_ci
6141cc406Sopenharmony_ci
7141cc406Sopenharmony_ciThe following text was for 1.0.3, but it may help nevertheless.
8141cc406Sopenharmony_ci
9141cc406Sopenharmony_ci
10141cc406Sopenharmony_ci   SANE 1.03 for OS/2 - build 1
11141cc406Sopenharmony_ci   ----------------------------
12141cc406Sopenharmony_ci   09 Jul 2000, Yuri Dario <mc6530@mclink.it>
13141cc406Sopenharmony_ci
14141cc406Sopenharmony_ci
15141cc406Sopenharmony_ciWARNING:
16141cc406Sopenharmony_ci--------
17141cc406Sopenharmony_ciThis release of has been compiled with EMX 0.9D, so it doesn't work with
18141cc406Sopenharmony_cithe previous runtime. You must upgrade to the latest runtime before running
19141cc406Sopenharmony_ciSANE (actually EMX 0.9D fix 03).
20141cc406Sopenharmony_ci
21141cc406Sopenharmony_ci
22141cc406Sopenharmony_ciSANE (Scanner Access Now Easy)
23141cc406Sopenharmony_ci------------------------------
24141cc406Sopenharmony_ciFor more info about the SANE Project, please visit
25141cc406Sopenharmony_ci
26141cc406Sopenharmony_ci	http://www.sane-project.org/
27141cc406Sopenharmony_ci
28141cc406Sopenharmony_ciYou should also check the main site for an updated list of supported scanners.
29141cc406Sopenharmony_ci
30141cc406Sopenharmony_ciNote that I can't say you if your scanner is supported; check SANE homepage
31141cc406Sopenharmony_ciinstead.
32141cc406Sopenharmony_ci
33141cc406Sopenharmony_ci
34141cc406Sopenharmony_ciSUPPORT
35141cc406Sopenharmony_ci-------
36141cc406Sopenharmony_ciI'm sorry to tell you that it is hard for me to help you: if your scanner
37141cc406Sopenharmony_cidoesn't work or your problem can't be reproduced on my pc, there are high
38141cc406Sopenharmony_cichoices that I can't fix the bug. Most problems are specific to same PC/scanner
39141cc406Sopenharmony_cicombinations, and can't be solved without having a full development environment
40141cc406Sopenharmony_ciand programming experience.
41141cc406Sopenharmony_ci
42141cc406Sopenharmony_ciI have setup a mailing list for users, where I hope most people can find an
43141cc406Sopenharmony_cianswer to their questions. You will find that I answer only sometimes, because
44141cc406Sopenharmony_ciI'm too busy.
45141cc406Sopenharmony_ciTo subscribe please visit
46141cc406Sopenharmony_ci
47141cc406Sopenharmony_ci	http://www.egroups.com
48141cc406Sopenharmony_ci
49141cc406Sopenharmony_ciand look for sane-os2, or fill the form available on my site.
50141cc406Sopenharmony_ci
51141cc406Sopenharmony_ci
52141cc406Sopenharmony_ciDOCUMENTATION
53141cc406Sopenharmony_ci-------------
54141cc406Sopenharmony_ciTo read docs with correct format, you should type
55141cc406Sopenharmony_ci
56141cc406Sopenharmony_ci	more < doc\sane-epson.txt
57141cc406Sopenharmony_ci
58141cc406Sopenharmony_ciIf someone has more ideas on how to get a correct .txt starting from a .man
59141cc406Sopenharmony_cifile, he is welcome (actually I'm using groff).
60141cc406Sopenharmony_ci
61141cc406Sopenharmony_ci
62141cc406Sopenharmony_ciINSTALLATION
63141cc406Sopenharmony_ci------------
64141cc406Sopenharmony_ciIf you already didn't it, install the correct driver for your scsi adapter.
65141cc406Sopenharmony_ciThe drivers has usually a .ADD extension and looks like
66141cc406Sopenharmony_ci
67141cc406Sopenharmony_ci	BASEDEV=AHA154X.ADD
68141cc406Sopenharmony_ci
69141cc406Sopenharmony_ciThen you need the ASPI driver: this driver is already in your OS2\BOOT
70141cc406Sopenharmony_cidirectory, so you have only to add
71141cc406Sopenharmony_ci
72141cc406Sopenharmony_ci	BASEDEV=OS2ASPI.DMD /ALL
73141cc406Sopenharmony_ci
74141cc406Sopenharmony_ciThe /ALL switch is required only if you need to use other devices with
75141cc406Sopenharmony_ciaspirout.sys, e.g. if you have a CD-RW and CDRecord/2 installed.
76141cc406Sopenharmony_ci
77141cc406Sopenharmony_ciLast, add aspirout.sys to your config.sys
78141cc406Sopenharmony_ci
79141cc406Sopenharmony_ci	DEVICE=D:\OS2\BOOT\ASPIROUT.SYS
80141cc406Sopenharmony_ci
81141cc406Sopenharmony_ciN.B. you can change the path to other directories.
82141cc406Sopenharmony_ciNow reboot.
83141cc406Sopenharmony_ci
84141cc406Sopenharmony_ciTo run scanimage.exe you need also to download the latest EMX runtime,
85141cc406Sopenharmony_ciavailable on Hobbes or Leo as emxrt.zip.
86141cc406Sopenharmony_ci
87141cc406Sopenharmony_cifind-scanner.exe can be used to recognize a scanner on the scsi bus. Then
88141cc406Sopenharmony_ciyou should edit your xxx.conf file and add the scanner address, a string like
89141cc406Sopenharmony_cib0t4l0. This can be simplified using autodetection: with autodetection you can
90141cc406Sopenharmony_ciuse a string like
91141cc406Sopenharmony_ci
92141cc406Sopenharmony_ci	scsi EPSON
93141cc406Sopenharmony_ci
94141cc406Sopenharmony_ciin your xxx.conf file; the autodection will enable the backend that recognize
95141cc406Sopenharmony_ci'EPSON' in the scanner id.
96141cc406Sopenharmony_ci
97141cc406Sopenharmony_ciTo test scanimage, run
98141cc406Sopenharmony_ci
99141cc406Sopenharmony_ci	scanimage --help
100141cc406Sopenharmony_ci
101141cc406Sopenharmony_ciyou should see your scanner following the list of internal devices:
102141cc406Sopenharmony_ci
103141cc406Sopenharmony_ci	List of available devices:
104141cc406Sopenharmony_ci	    pnm:0 pnm:1
105141cc406Sopenharmony_ci
106141cc406Sopenharmony_ciIf it is not present, check your scsi driver, the aspi driver OS2ASPI.DMD and
107141cc406Sopenharmony_ciaspirout.sys; on Warp4 you can use the Hardware Manager to check scanner
108141cc406Sopenharmony_cipresence. Then look at your xxx.conf, maybe there is something wrong in the
109141cc406Sopenharmony_citext.
110141cc406Sopenharmony_ci
111141cc406Sopenharmony_ci
112141cc406Sopenharmony_ciUSAGE:
113141cc406Sopenharmony_ci------
114141cc406Sopenharmony_ciOnce configured your system, create a proper .conf file (edit one of the
115141cc406Sopenharmony_cisupplied templates) and run
116141cc406Sopenharmony_ci
117141cc406Sopenharmony_ci	scanimage -L
118141cc406Sopenharmony_ci
119141cc406Sopenharmony_ciThe output should be like
120141cc406Sopenharmony_ci
121141cc406Sopenharmony_ci	device `umax:b0t3l0' is a UMAX     Vista-S8         flatbed scanner
122141cc406Sopenharmony_ci	device `pnm:0' is a Noname PNM file reader virtual device
123141cc406Sopenharmony_ci	device `pnm:1' is a Noname PNM file reader virtual device
124141cc406Sopenharmony_ci
125141cc406Sopenharmony_ciThe pnm devices are always available, while on the first line you should
126141cc406Sopenharmony_ciread the id of your scanner.
127141cc406Sopenharmony_ci
128141cc406Sopenharmony_ciA simple scan
129141cc406Sopenharmony_ci
130141cc406Sopenharmony_ci	scanimage -d umax > test.pnm
131141cc406Sopenharmony_ci
132141cc406Sopenharmony_ciwill do a scan with default parameters. Run
133141cc406Sopenharmony_ci
134141cc406Sopenharmony_ci	scanimage -d umax --help
135141cc406Sopenharmony_ci
136141cc406Sopenharmony_cito get a full list of available switches.
137141cc406Sopenharmony_ci
138141cc406Sopenharmony_ci
139141cc406Sopenharmony_ciSANED:
140141cc406Sopenharmony_ci------
141141cc406Sopenharmony_ciIn this release the SANE network daemon can be used (with a limit).
142141cc406Sopenharmony_ciFirst edit your \mptn\etc\services and add
143141cc406Sopenharmony_ci
144141cc406Sopenharmony_cisane            6566/tcp   # SANE network scanner daemon
145141cc406Sopenharmony_ci
146141cc406Sopenharmony_ci(maybe a reboot is required to apply that change).
147141cc406Sopenharmony_ciCreate a saned.conf in the same directory of saned.exe and add a list of valid
148141cc406Sopenharmony_ciclient addresses; the clients are allowed to access the local scanner.
149141cc406Sopenharmony_ciNow run the server in debug mode
150141cc406Sopenharmony_ci
151141cc406Sopenharmony_ci	saned -d
152141cc406Sopenharmony_ci
153141cc406Sopenharmony_ciOn the client side, you need to create a net.conf file in the same directory
154141cc406Sopenharmony_ciof scanimage.exe: here you have to add a list of valid saned servers.
155141cc406Sopenharmony_ciRun
156141cc406Sopenharmony_ci
157141cc406Sopenharmony_ci	scanimage -L
158141cc406Sopenharmony_ci
159141cc406Sopenharmony_ciThe output is like this
160141cc406Sopenharmony_ci
161141cc406Sopenharmony_cidevice `umax:b0t3l0' is a UMAX     Vista-S8         flatbed scanner
162141cc406Sopenharmony_cidevice `pnm:0' is a Noname PNM file reader virtual device
163141cc406Sopenharmony_cidevice `pnm:1' is a Noname PNM file reader virtual device
164141cc406Sopenharmony_cidevice `net:pippo.intranet:umax:b0t3l0' is a UMAX     Vista-S8      flatbed scanner
165141cc406Sopenharmony_cidevice `net:pippo.intranet:pnm:0' is a Noname PNM file reader virtual device
166141cc406Sopenharmony_cidevice `net:pippo.intranet:pnm:1' is a Noname PNM file reader virtual device
167141cc406Sopenharmony_ci
168141cc406Sopenharmony_ciThen saned will quit. To run it forever, you have to configure the INETD
169141cc406Sopenharmony_cidaemon: create a \mptn\etc\inetd.lst with the following line
170141cc406Sopenharmony_ci
171141cc406Sopenharmony_ci	sane   tcp /rd/sane/sane-1.0.1/frontend/saned.exe
172141cc406Sopenharmony_ci
173141cc406Sopenharmony_ciBe aware that this configuration shouldn't work: I have been unable to get it
174141cc406Sopenharmony_ciworking on my PC without running saned under the debugger PMGDB.
175141cc406Sopenharmony_ciThe correct syntax for running scanimage over the net is
176141cc406Sopenharmony_ci
177141cc406Sopenharmony_ci	scanimage -d net:HOSTNAME:umax:b0t3l0 > test.pnm
178141cc406Sopenharmony_ci
179141cc406Sopenharmony_ciwhere HOSTNAME is a valid DNS host name.
180141cc406Sopenharmony_ciYou can log server access using syslogd: if syslogd is running, saned will
181141cc406Sopenharmony_cisend to it all messages.
182141cc406Sopenharmony_ci
183141cc406Sopenharmony_ci
184141cc406Sopenharmony_ciHOW TO COMPILE:
185141cc406Sopenharmony_ci---------------
186141cc406Sopenharmony_ciTo compile SANE with emx, you need
187141cc406Sopenharmony_ci
188141cc406Sopenharmony_ci- EMX 0.9D
189141cc406Sopenharmony_ci- GNU Make 3.75 (rename to make.exe)
190141cc406Sopenharmony_ci- GNU Patch 2.5
191141cc406Sopenharmony_ci- KSH 5.2.13 (rename to sh.exe)
192141cc406Sopenharmony_ci- GNU Bison
193141cc406Sopenharmony_ci- GNU File utilities
194141cc406Sopenharmony_ci- GNU SED (stream editor)
195141cc406Sopenharmony_ci- Autoconf 2.13
196141cc406Sopenharmony_ci
197141cc406Sopenharmony_ciSteps:
198141cc406Sopenharmony_ci- untar the original Unix distribution;
199141cc406Sopenharmony_ci- unzip this file somewhere;
200141cc406Sopenharmony_ci- copy src\* into sane-1.0.1;
201141cc406Sopenharmony_ci- enter sane-1.0.1 directory;
202141cc406Sopenharmony_ci- apply patches to original distribution:
203141cc406Sopenharmony_ci    [...\sane-1.0.1]gnupatch -p 0 < patch.os2
204141cc406Sopenharmony_ci- run autoconf to rebuild the configure script
205141cc406Sopenharmony_ci- edit configure and change autoconf default optimization flags;
206141cc406Sopenharmony_ci  search for -O2 -m486 and change to your preferred settings;
207141cc406Sopenharmony_ci- add the following line after :${LDFLAGS="...."}
208141cc406Sopenharmony_ci  : ${LIBS="-lsocket"}
209141cc406Sopenharmony_ci- run configure.os2 to build all installation files;
210141cc406Sopenharmony_ci- add -Zexe to LDFLAGS in frontend\Makefile and tools\Makefile;
211141cc406Sopenharmony_ci- run make (compiler warnings are ok);
212141cc406Sopenharmony_ci- wait to complete all makes;
213141cc406Sopenharmony_ci
214141cc406Sopenharmony_ciRemember to install a Unix like shell in your path; I use ksh.exe
215141cc406Sopenharmony_cirenamed to sh.exe, and saved in d:\bin
216141cc406Sopenharmony_ci(that's because most unix scripts uses SHELL=/bin/sh)
217141cc406Sopenharmony_ci
218141cc406Sopenharmony_ciYou need also a compatible dl.a and syslog.a library; look in .\contrib
219141cc406Sopenharmony_cifor a couple of simple sources.
220141cc406Sopenharmony_ci
221141cc406Sopenharmony_ciFlags needed under EMX:
222141cc406Sopenharmony_ci-Zsysv-signals	enables signal management as in SystemV, otherwise emx
223141cc406Sopenharmony_ci                convention is used (and it is different from sysv).
224141cc406Sopenharmony_ci-Zcrtdll	link dynamically with EMXLIBCM.DLL;
225141cc406Sopenharmony_ci
226141cc406Sopenharmony_ci
227141cc406Sopenharmony_ciPARALLEL PORT
228141cc406Sopenharmony_ci-------------
229141cc406Sopenharmony_ciThis release has support for parallel port enabled: actually only the Epson
230141cc406Sopenharmony_cibackend makes uses of such support; the Epson GT-300 can be recognized, but
231141cc406Sopenharmony_ciscanning can't be completed.
232141cc406Sopenharmony_ci
233141cc406Sopenharmony_ciAlso HP-5100C parallel scanner can be run under OS/2: you need to download
234141cc406Sopenharmony_cithe EPST driver from Shuttle Tech. homepage (www.shuttletech.com); follow the
235141cc406Sopenharmony_ciinstruction for installation. Then the scanner is seen as a scsi HP, so the
236141cc406Sopenharmony_ciHP backend can work with it.
237141cc406Sopenharmony_ci
238141cc406Sopenharmony_ciThe Quickcam backend is also included with lpt support, but I can't say how it
239141cc406Sopenharmony_ciis working.
240141cc406Sopenharmony_ci
241141cc406Sopenharmony_ciHistory:
242141cc406Sopenharmony_ci--------
243141cc406Sopenharmony_ci09 Jul 2000 release 1.03
244141cc406Sopenharmony_ci
245141cc406Sopenharmony_ci20 Jun 1999 release 1.01
246141cc406Sopenharmony_ci	- changed runtime to EMX 0.9D
247141cc406Sopenharmony_ci	- fixed: find-scanner should now work correctly.
248141cc406Sopenharmony_ci	- added: how to compile instructions.
249141cc406Sopenharmony_ci
250141cc406Sopenharmony_ci07 Mar 1999 release 1.01 pre-test3
251141cc406Sopenharmony_ci	no OS/2 specific fixes
252141cc406Sopenharmony_ci
253141cc406Sopenharmony_ci20 Oct 1998 release 0.74
254141cc406Sopenharmony_ci	fixed fork()ing backends with new sanei_thread api.
255141cc406Sopenharmony_ci	fixed scsi autodetection
256141cc406Sopenharmony_ci	added parallel port support
257141cc406Sopenharmony_ci
258141cc406Sopenharmony_ci===============================================================================
259141cc406Sopenharmony_ciYuri Dario <mc6530@mclink.it>
260141cc406Sopenharmony_cihttp://www.quasarbbs.com/yuri
261