12002-01-03 2 3Look at http://home.tiscalinet.de/fbakan/sane-os2.htm for information about 4compiling SANE on OS/2 (from Franz Bakan). 5 6 7The following text was for 1.0.3, but it may help nevertheless. 8 9 10 SANE 1.03 for OS/2 - build 1 11 ---------------------------- 12 09 Jul 2000, Yuri Dario <mc6530@mclink.it> 13 14 15WARNING: 16-------- 17This release of has been compiled with EMX 0.9D, so it doesn't work with 18the previous runtime. You must upgrade to the latest runtime before running 19SANE (actually EMX 0.9D fix 03). 20 21 22SANE (Scanner Access Now Easy) 23------------------------------ 24For more info about the SANE Project, please visit 25 26 http://www.sane-project.org/ 27 28You should also check the main site for an updated list of supported scanners. 29 30Note that I can't say you if your scanner is supported; check SANE homepage 31instead. 32 33 34SUPPORT 35------- 36I'm sorry to tell you that it is hard for me to help you: if your scanner 37doesn't work or your problem can't be reproduced on my pc, there are high 38choices that I can't fix the bug. Most problems are specific to same PC/scanner 39combinations, and can't be solved without having a full development environment 40and programming experience. 41 42I have setup a mailing list for users, where I hope most people can find an 43answer to their questions. You will find that I answer only sometimes, because 44I'm too busy. 45To subscribe please visit 46 47 http://www.egroups.com 48 49and look for sane-os2, or fill the form available on my site. 50 51 52DOCUMENTATION 53------------- 54To read docs with correct format, you should type 55 56 more < doc\sane-epson.txt 57 58If someone has more ideas on how to get a correct .txt starting from a .man 59file, he is welcome (actually I'm using groff). 60 61 62INSTALLATION 63------------ 64If you already didn't it, install the correct driver for your scsi adapter. 65The drivers has usually a .ADD extension and looks like 66 67 BASEDEV=AHA154X.ADD 68 69Then you need the ASPI driver: this driver is already in your OS2\BOOT 70directory, so you have only to add 71 72 BASEDEV=OS2ASPI.DMD /ALL 73 74The /ALL switch is required only if you need to use other devices with 75aspirout.sys, e.g. if you have a CD-RW and CDRecord/2 installed. 76 77Last, add aspirout.sys to your config.sys 78 79 DEVICE=D:\OS2\BOOT\ASPIROUT.SYS 80 81N.B. you can change the path to other directories. 82Now reboot. 83 84To run scanimage.exe you need also to download the latest EMX runtime, 85available on Hobbes or Leo as emxrt.zip. 86 87find-scanner.exe can be used to recognize a scanner on the scsi bus. Then 88you should edit your xxx.conf file and add the scanner address, a string like 89b0t4l0. This can be simplified using autodetection: with autodetection you can 90use a string like 91 92 scsi EPSON 93 94in your xxx.conf file; the autodection will enable the backend that recognize 95'EPSON' in the scanner id. 96 97To test scanimage, run 98 99 scanimage --help 100 101you should see your scanner following the list of internal devices: 102 103 List of available devices: 104 pnm:0 pnm:1 105 106If it is not present, check your scsi driver, the aspi driver OS2ASPI.DMD and 107aspirout.sys; on Warp4 you can use the Hardware Manager to check scanner 108presence. Then look at your xxx.conf, maybe there is something wrong in the 109text. 110 111 112USAGE: 113------ 114Once configured your system, create a proper .conf file (edit one of the 115supplied templates) and run 116 117 scanimage -L 118 119The output should be like 120 121 device `umax:b0t3l0' is a UMAX Vista-S8 flatbed scanner 122 device `pnm:0' is a Noname PNM file reader virtual device 123 device `pnm:1' is a Noname PNM file reader virtual device 124 125The pnm devices are always available, while on the first line you should 126read the id of your scanner. 127 128A simple scan 129 130 scanimage -d umax > test.pnm 131 132will do a scan with default parameters. Run 133 134 scanimage -d umax --help 135 136to get a full list of available switches. 137 138 139SANED: 140------ 141In this release the SANE network daemon can be used (with a limit). 142First edit your \mptn\etc\services and add 143 144sane 6566/tcp # SANE network scanner daemon 145 146(maybe a reboot is required to apply that change). 147Create a saned.conf in the same directory of saned.exe and add a list of valid 148client addresses; the clients are allowed to access the local scanner. 149Now run the server in debug mode 150 151 saned -d 152 153On the client side, you need to create a net.conf file in the same directory 154of scanimage.exe: here you have to add a list of valid saned servers. 155Run 156 157 scanimage -L 158 159The output is like this 160 161device `umax:b0t3l0' is a UMAX Vista-S8 flatbed scanner 162device `pnm:0' is a Noname PNM file reader virtual device 163device `pnm:1' is a Noname PNM file reader virtual device 164device `net:pippo.intranet:umax:b0t3l0' is a UMAX Vista-S8 flatbed scanner 165device `net:pippo.intranet:pnm:0' is a Noname PNM file reader virtual device 166device `net:pippo.intranet:pnm:1' is a Noname PNM file reader virtual device 167 168Then saned will quit. To run it forever, you have to configure the INETD 169daemon: create a \mptn\etc\inetd.lst with the following line 170 171 sane tcp /rd/sane/sane-1.0.1/frontend/saned.exe 172 173Be aware that this configuration shouldn't work: I have been unable to get it 174working on my PC without running saned under the debugger PMGDB. 175The correct syntax for running scanimage over the net is 176 177 scanimage -d net:HOSTNAME:umax:b0t3l0 > test.pnm 178 179where HOSTNAME is a valid DNS host name. 180You can log server access using syslogd: if syslogd is running, saned will 181send to it all messages. 182 183 184HOW TO COMPILE: 185--------------- 186To compile SANE with emx, you need 187 188- EMX 0.9D 189- GNU Make 3.75 (rename to make.exe) 190- GNU Patch 2.5 191- KSH 5.2.13 (rename to sh.exe) 192- GNU Bison 193- GNU File utilities 194- GNU SED (stream editor) 195- Autoconf 2.13 196 197Steps: 198- untar the original Unix distribution; 199- unzip this file somewhere; 200- copy src\* into sane-1.0.1; 201- enter sane-1.0.1 directory; 202- apply patches to original distribution: 203 [...\sane-1.0.1]gnupatch -p 0 < patch.os2 204- run autoconf to rebuild the configure script 205- edit configure and change autoconf default optimization flags; 206 search for -O2 -m486 and change to your preferred settings; 207- add the following line after :${LDFLAGS="...."} 208 : ${LIBS="-lsocket"} 209- run configure.os2 to build all installation files; 210- add -Zexe to LDFLAGS in frontend\Makefile and tools\Makefile; 211- run make (compiler warnings are ok); 212- wait to complete all makes; 213 214Remember to install a Unix like shell in your path; I use ksh.exe 215renamed to sh.exe, and saved in d:\bin 216(that's because most unix scripts uses SHELL=/bin/sh) 217 218You need also a compatible dl.a and syslog.a library; look in .\contrib 219for a couple of simple sources. 220 221Flags needed under EMX: 222-Zsysv-signals enables signal management as in SystemV, otherwise emx 223 convention is used (and it is different from sysv). 224-Zcrtdll link dynamically with EMXLIBCM.DLL; 225 226 227PARALLEL PORT 228------------- 229This release has support for parallel port enabled: actually only the Epson 230backend makes uses of such support; the Epson GT-300 can be recognized, but 231scanning can't be completed. 232 233Also HP-5100C parallel scanner can be run under OS/2: you need to download 234the EPST driver from Shuttle Tech. homepage (www.shuttletech.com); follow the 235instruction for installation. Then the scanner is seen as a scsi HP, so the 236HP backend can work with it. 237 238The Quickcam backend is also included with lpt support, but I can't say how it 239is working. 240 241History: 242-------- 24309 Jul 2000 release 1.03 244 24520 Jun 1999 release 1.01 246 - changed runtime to EMX 0.9D 247 - fixed: find-scanner should now work correctly. 248 - added: how to compile instructions. 249 25007 Mar 1999 release 1.01 pre-test3 251 no OS/2 specific fixes 252 25320 Oct 1998 release 0.74 254 fixed fork()ing backends with new sanei_thread api. 255 fixed scsi autodetection 256 added parallel port support 257 258=============================================================================== 259Yuri Dario <mc6530@mclink.it> 260http://www.quasarbbs.com/yuri 261