Pt_drv install mini HowTo This mini HowTo is a (slightly adjusted) e-mail I wrote to a friend of mine explaining him how to install the plustek driver for sane, in his case for a Primax 4800 Direct. To fully understand the options to put in conf.modules for the driver and to face various other problems you *must* read the file INSTALL; This only means to be a little help in the case you experience difficulties, I hope it will help someone! :-) Let's state that you're root, it's just a bit risky but makes the the whole thing quicker; you're in your home dir, where you should put both the sane and the plustek tarballs. The starting point is this or something similar, the shell prompt... it's not so obvious! :-) root@Homer2: ~ # just for info Homer2 is my computer :-) DOH! untar the sources of sane in a dir, there is no need to make a test dir, you can do it if you fear to spread files around; root@Homer2: ~ # tar -xzvf sane-1.0.2.tar.gz now you'll find a new dir called sane-1.0.2, dive into it and _from there_ unpack the plustek-sane tarball too: root@Homer2: ~ # cd sane-1.0.2 root@Homer2: ~/sane-1.0.2 # tar -xzvf ../plustek-sane-0_36_34.tar.gz now you need to find where (if) there is a previous version of sane installed, you can seek it where described in the file INSTALL or you can use locate, if the file database is up to date; if so, do "locate sane (or sane.d) | less" and you'll see a list of files containing sane (sane.d) in their name. If you don't have an updated database you can do "updatedb" as root to update it (it takes a while), before doing like i told you before. I think that /usr/local and /usr/local/etc are reasonably the most likely place where to find sane and it's config dir sane.d, i suggest to put those below if you don't have a previously installed version, Now you need to export in the environment the variables to optimize the compiling etc., like you can read in the file INSTALL: root@Homer2: ~/sane-1.0.2 # export CFLAGS="-O -Wall -g" Note: here we do in 2 steps what is described in one step in the INSTALL file, it's just the same; if you use the c shell and not bash use setenv istead of export. in my case i use these other options as i got a K6-III and gcc export CFLAGS="-O3 -march=k6 -Wall -g" the -g option is only useful if you plan to use the debugger. Now let's make sane "autoconfigure", telling it the paths we found before, so it will install itself over an old version if there was one; in my case: root@Homer2: ~/sane-1.0.2 # ./configure --prefix=/usr/local/ --sysconfdir=/usr/local/etc if there were no problems sane is now configured and ready to be built: root@Homer2: ~/sane-1.0.2 # make if there were no errors we can install sane: root@Homer2: ~/sane-1.0.2 # make install now let's compile the plustek module: root@Homer2: ~/sane-1.0.2 # cd backend/plustek_driver root@Homer2: ~/sane-1.0.2/backend/plustek_driver # make and hoping everything's ok again: root@Homer2: ~/sane-1.0.2/backend/plustek_driver # make install the next step is to add the following lines to the file /etc/modules.conf or /etc/conf.modules (whichever you have); just type mcedit /etc/modules.conf: alias char-major-40 pt_drv post-install pt_drv modprobe -k parport options pt_drv lampoff=180 warmup=15 lOffonEnd=0 port=0x378 mov=2 For the meaning of the options read the INSTALL file, mov=2 is only needed for Primax 4800 Direct. at this point you need to update the modules dependencies; root@Homer2: ~/sane-1.0.2/backend/plustek_driver # depmod and to remove previous versions of the module in memory or devices in /dev : root@Homer2: ~/sane-1.0.2/backend/plustek_driver # make unload now try to load the driver and (re)create the devices: root@Homer2: ~/sane-1.0.2/backend/plustek_driver # make load the lamp should turn on now and with scanimage -L you'll get a list of available devices: root@Homer2: ~/sane-1.0.2/backend/plustek_driver # scanimage -L device `plustek:/dev/pt_drv' is a Plustek Primax 4800 Direct flatbed scanner If you want to read the kernel messages just do dmesg; here it is what i get: root@Homer2: ~/sane-1.0.2/backend/plustek_driver # dmesg | tail [...] pt_drv : driver version = 0.36-35 pt_drv0: Primax 4800 Direct found on port 0x0378 pt_drv0: Lamp-Timer set to 180 seconds. pt_drv0: WarmUp period set to 15 seconds. pt_drv: Lamp untouched on driver unload. Now it's time to do a test-scan! root@Homer2: ~/sane-1.0.2/backend/plustek_driver # scanimage > out.pnm if you're under X you can take a look of it it with xv: root@Homer2: ~/sane-1.0.2/backend/plustek_driver # xv out.pnm If everything is allright you can now scan in a more intuitive way with xscanimage.... you can remove the out.pnm file and the whole build tree of sane and plustek driver if you wish. I hope it will work this way, Bye, Giorgio giorgio_a@inwind.it