summaryrefslogtreecommitdiff
path: root/doc/plustek
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
commit6e9c41a892ed0e0da326e0278b3221ce3f5713b8 (patch)
tree2e301d871bbeeb44aa57ff9cc070fcf3be484487 /doc/plustek
Initial import of sane-backends version 1.0.24-1.2
Diffstat (limited to 'doc/plustek')
-rw-r--r--doc/plustek/FAQ385
-rw-r--r--doc/plustek/MakeModule.sh116
-rw-r--r--doc/plustek/Makefile.kernel24251
-rw-r--r--doc/plustek/Makefile.kernel26124
-rw-r--r--doc/plustek/Plustek-PARPORT-TODO.txt38
-rw-r--r--doc/plustek/Plustek-PARPORT.changes180
-rw-r--r--doc/plustek/Plustek-PARPORT.txt49
-rw-r--r--doc/plustek/Plustek-USB-TODO.txt53
-rw-r--r--doc/plustek/Plustek-USB.changes307
-rw-r--r--doc/plustek/Plustek-USB.txt457
10 files changed, 1960 insertions, 0 deletions
diff --git a/doc/plustek/FAQ b/doc/plustek/FAQ
new file mode 100644
index 0000000..7d65f41
--- /dev/null
+++ b/doc/plustek/FAQ
@@ -0,0 +1,385 @@
+Plustek-Driver TROUBLESHOOTING/FAQ - 19.04.2001
+-----------------------------------------------
+
+The driver exists now since March 2000, this is the first trial to setup
+a FAQ. This leads into the following:
+First we have a part, which is more a troubleshooting section and the second
+one is the FAQ.
+To search through this text, search for "SYMPTOM" or "Q:".
+
+If you have some more FAQ entries, let me know <gerhard@gjaeger.de>
+
+THANKS to Jochen <jochen@puchalla-online.de>, who roamed through the
+mailing-list and gathered the different questions.
+
+
+*******************************************************************************
+* TROUBLE-SHOOTING *
+* *
+* DRIVER TOPICS *
+*******************************************************************************
+
+
+SYMPTOM: "kernel-module version mismatch"
+--------
+"When I try to "make load" I get an error"
+
+/sbin/modprobe pt_drv || exit 1
+/lib/modules/2.2.14-6.0.6/misc/pt_drv.o: kernel-module version mismatch
+/lib/modules/2.2.14-6.0.1/misc/pt_drv.o was compiled
+for kernel version 2.2.14-5.0
+while this kernel is version 2.2.14-6.0.1.
+
+PROBLEM:
+--------
+You're using the wrong Kernel-header files.
+
+The path
+/usr/include/linux is a link to
+/usr/src/linux/include/linux and
+/usr/src/linux is normally a link to your current
+kernel, i.e:
+/usr/src/linux-2.2.14
+
+If you now upgrade your kernel and you have
+forgotten to correct the link /usr/src/linux, then
+every kernel-module you build outside the
+kernelsource structure will include the wrong
+version information.
+
+SOLUTION:
+---------
+Set the link /usr/src/linux
+to your current kernel-source tree before recompiling
+kernel-modules like pt_drv, then your version mismatch
+problem should be solved.
+
+
+
+SYMPTOM: "Device or resource busy"
+--------
+Any attempt to "modprobe" or "make load" the driver leads
+to this message.
+
+PROBLEM:
+--------
+The driver refuses to load. During startup, the driver performs
+some tests according to the parallel port and the connected
+scanners.
+If the parallel port is not supported or the scanner cannot be
+found, the driver returns an error and the system will report
+"device or resource busy"
+
+SOLUTION:
+---------
+There's no way to provide a general solution. First of all
+you should check your connections and the parallel port.
+Also check power for your scanner.
+If the problem still exists, enable the debug-messages of the
+pt_drv module (see INSTALL).
+Then check the messages after loading or send the output to
+the mailing list.
+Most of these problems are related to HW-problems. Before
+giving up, check the scanner under Windows (not really a
+good advice I know, but it helps to find HW-damage).
+There was also one case were the internal plugs of the parport
+connection were wrong...
+
+
+
+SYMPTOM: "Unresolved symbols"
+--------
+"make load" or "modprobe pt_drv" produces this message:
+
+/sbin/modprobe pt_drv || exit 1
+/lib/modules/2.2.14-5.0/misc/pt_drv.o: unresolved symbol parport_unregister_device
+/lib/modules/2.2.14-5.0/misc/pt_drv.o: unresolved symbol parport_enumerate
+/lib/modules/2.2.14-5.0/misc/pt_drv.o: unresolved symbol parport_register_device
+/lib/modules/2.2.14-5.0/misc/pt_drv.o: unresolved symbol parport_claim
+/lib/modules/2.2.14-5.0/misc/pt_drv.o: unresolved symbol parport_release
+/lib/modules/2.2.14-5.0/misc/pt_drv.o: insmod
+/lib/modules/2.2.14-5.0/misc/pt_drv.o failed
+
+
+PROBLEM:
+--------
+The driver needs at least the parport_pc and the parport modules
+to work. They MUST be loaded prior to pt_drv. If these modules
+are not loaded you get this message.
+
+SOLUTION:
+---------
+Simply load the parport module. You can add this dependency to
+your /etc/modules.conf (or /etc/conf.modules) file (see INSTALL).
+Then everytime you load pt_drv with modprobe, parport will be loaded
+automatically. After modifying this file, call
+depmod -va
+
+
+
+SYMPTOM: Scanner makes awful noise
+--------
+
+PROBLEM:
+--------
+This can have two major causes:
+- You have an ASIC96001/3 based scanner, then the sensor hits the
+ scanbed: !!! TURN OFF SCANNER POWER !!!
+
+- You have an ASIC98001 based scanner, then the motor control does
+ not work correctly --> hit the cancel button
+
+SOLUTION:
+---------
+For the first case (ASIC 96001/3), there's no solution available. This
+happens, when the driver can't keep track of the stepper motor. The image
+you get is normally unusable.
+The second case is often reported when the printer driver lp.o is
+already loaded. So remove lp.o before loading pt_drv.
+
+
+
+SYMPTOM: Printer starts to print while scanning
+--------
+
+PROBLEM:
+--------
+It has been reported, that some printers (esp. HP printers) start to
+print, even during startup of the driver. This is a problem to printers
+which use a bidirectional protocol for talking with the system.
+
+
+SOLUTION:
+---------
+There is no possibility to handle this problem inside the driver.
+One possibility is to switch off the bidirectional communication of the
+printer. The other one is to connect the printer to another parallel port.
+
+
+*******************************************************************************
+* SANE-topics *
+*******************************************************************************
+
+Here you will not find how to setup xscanimage to work with GIMP or
+how to compile sane to obtain xscanimage, for such questions, please
+refer to the mailing lists at SANE (http://www.sane-project.org)
+
+
+SYMPTOM: error in loading shared libraries: libsane.so.1: cannot open
+-------- shared object file: No such file or directory
+
+PROBLEM:
+--------
+The shared libraries for SANE have been installed to a
+directory which is not in your "library path"
+
+SOLUTION:
+---------
+SANE installs its shared libraries to PREFIX/lib/sane.
+PREFIX is in general /usr or /usr/local. You should
+either add the path to your /etc/ld.so.conf file or
+set links to the libraries from a wellknown lib-path.
+(i.e. ln -s /usr/lib/sane/libsane.so.1 /usr/lib/libsane.so.1)
+In any case you should run "ldconfig -v"
+
+
+
+SYMPTOM: "no SANE devices found"
+--------
+While testing with "scanimage -L" nothing happens. And when starting scanimage
+this message is displayed.
+
+PROBLEM:
+--------
+The frontend cannot find any sane-device, this might have several causes:
+- the driver is not loaded
+- you have no access to the driver
+- the backend is not enabled
+- the driver is not specified
+- version conflict between the loaded driver and the backend
+
+SOLUTION:
+---------
+Driver not loaded: check "cat /proc/pt_drv" if this does not exist, load
+the driver (see INSTALL)
+
+No access to the driver: check "ls -l /dev/pt_drv*" and you should get
+
+crw-rw-r-- 1 root root 40, 0 Aug 29 15:18 /dev/pt_drv
+crw-rw-r-- 1 root root 40, 0 Aug 29 15:18 /dev/pt_drv0
+crw-rw-r-- 1 root root 40, 1 Aug 29 15:18 /dev/pt_drv1
+crw-rw-r-- 1 root root 40, 2 Aug 29 15:18 /dev/pt_drv2
+crw-rw-r-- 1 root root 40, 3 Aug 29 15:18 /dev/pt_drv3
+
+If not, call "make load" in the driver source directory. This call sometimes
+fails, so you might create the entries by using mknod:
+mknod -m 0664 /dev/pt_drv c 40 0
+mknod -m 0664 /dev/pt_drv0 c 40 0
+mknod -m 0664 /dev/pt_drv1 c 40 1
+mknod -m 0664 /dev/pt_drv2 c 40 2
+mknod -m 0664 /dev/pt_drv3 c 40 3
+
+The backend is not enabled: Check the SANE configuration in /etc/sane.d,
+/usr/etc/sane.d or /usr/local/etc/sane.d (depending on your installation).
+Your dll.conf MUST include an enabled "plustek" entry (no "#" in front of
+that line)
+
+The driver is not specified: Check the sane configuration (see above)
+for the file plustek.conf and make sure that it contains at least
+/dev/pt_drv as entry.
+
+Version conflict: After enabling the SANE debug messages you will
+get something like upon starting scanimage:
+ioctl PT_DRV_OPEN_DEVICE failed(-9019)
+Version problem, please recompile driver!
+In this case, you MUST recompile the backend AND the driver and reinstall
+both. This feature makes sure, that both always will use the same ioctl
+interface.
+
+
+PROBLEM:
+--------
+I have SANE-1.0.4 and there's no backend-directory after unpacking, so
+what to do?
+
+SOLUTION:
+---------
+You're wrong there is a backend directory!!!
+Since SANE-1.0.4, there are two packages:
+sane-backends
+sane-frontends
+For the installation, you need the backend tarball. This should give
+you something like:
+sane-1.0.4/sane-backends
+and there below sane-backends is the backend directory. So you have
+to unpack the plustek-sane...tgz in sane-backends.
+
+
+
+*******************************************************************************
+* F A Q *
+*******************************************************************************
+
+Q: What does "Turbo" mean ?
+
+A: Turbo does not mean, that the scanner is faster ;-)
+ There are currently three OpticPro9636P Scanners.
+ OP9636P
+ OP9636P+
+ OP9636PTurbo
+ The + and the Turbo models are quite the same and the difference between
+ the Turbo and the non-Turbo is the scan-sensor. The Turbo uses the same
+ like the newer OP9636T/12000T and the non-Turbo uses the older ones
+ from the OP9630....
+
+
+Q: Is it possible to use the front-button of my Plustek 9630P ?
+
+A: It is possible since version 0.37. After loading the driver,
+ use the proc filesystem to get the button value:
+ cat /proc/pt_drv/device0/button0
+
+
+Q: Is it possible to use the scanner in gimp ?
+
+A: You should be able to use xscanimage with gimp:
+ 1. Login as root
+ 2. Go into the gimp plug-in directory
+ (on SuSE it is: /usr/lib/gimp/1.1/plug-ins/ )
+ 3. Find xscanimage : which xscanimage
+ 4. Create a symbolic link to xscanimage :
+ ln -s "/path/to/"xscanimage xscanimage
+ 5. logout as root
+ Now call gimp, in the xtns menu you should find
+ now the Acquire Image menu entry. That's all.
+ If not, start gimp from an xterm and have a look at the output.
+
+
+Q: Is there any way to load the plustek_driver at bootup-time?
+
+A: Normally, there is no need to do so, because once you
+ altered your /etc/conf.modules file (or /etc/modules.conf)
+ and added the suggested stuff (see INSTALL file), you won't
+ have to worry about loading the driver. It happens automagically. ;-)
+ The driver will be loaded when needed (and eventually
+ removed after a specific time of not using it).
+
+ Nevertheless, another possibility is to do a modprobe pt_drv in the
+ /etc/rc.d/boot.local (using SuSE) or
+ /etc/rc.d/rc.local (using RedHat or Mandrake) file
+ So the driver will be loaded at bootup-time...
+ !!! YOUR SCANNER MUST BE ONLINE during power-up then !!!
+
+
+Q: I wonder if Mandrake 7.1's sane rpm file has this support already built in.
+ My scanner light is coming on yet Xscanimage seems to report that there
+ is no scanner present.
+
+A: The backend code will be included in Version 1.0.3 of sane and
+ AFAIK Mandrake 7.1 only includes 1.0.2.
+ Anyway go to the plustek-driver download page at
+ http://home.t-online.de/home/g-jaeger/plustek.html
+ download and install the driver.
+
+
+Q: Mandrake installs sane by default at install-time.
+ Is there a way to install the driver with the preinstalled sane
+ or should the preinstalled sane be removed first?
+ If so, how do I remove the preinstalled sane?
+
+A: I recommend to uninstall the previous one.
+ I think Mandrake uses RPM for managing the packages. To remove sane
+ do the following (as root)
+
+ Ask for all installed packages and filter sane:
+ rpm -qa | grep sane
+ you should get something like this:
+ sane-1.0.1-94
+ Now remove this package:
+
+ rpm -e sane-1.0.1-94
+
+ After theses steps, sane should be removed.
+ I'm not sure, but you might have to remove the /etc/sane.d manually...
+ Now got to your sane-1.0.3 stuff and reinstall this
+ as described. Before using, you might have a look
+ at the dll.conf and enable only the plustek backend.
+
+
+Q: Now that there's a sane 1.0.3, how do i uninstall sane 1.0.2?
+ Or can i install it over?
+
+A: In general you can install it over. BUT this has caused
+ quite a lot of trouble, so I recommend to remove the 1.0.2
+ completely and install 1.0.3...
+
+ try the rpm-tool:
+ Get a list of the installed packages and filter out sane:
+
+ rpm -qa | grep sane
+
+ You should get something like:
+
+ sane-1.0.2-48
+
+ Then use rpm to remove sane:
+
+ rpm -e sane-1.0.2-48
+
+ The other way is:
+
+ rm -rf /etc/sane.d
+ rm -rf /usr/lib/sane
+ rm -rf /usr/lib/libsane*
+ rm -rf /usr/include/sane
+ rm -rf /usr/etc/sane.d
+ rm -rf /usr/share/sane*
+ rm -rf /usr/local/lib/sane
+ rm -rf /usr/local/lib/libsane*
+ rm -rf /usr/local/include/sane
+ rm -rf /usr/local/etc/sane.d
+ rm -rf /usr/local/share/sane*
+
+ This should cover all the directories where maybe some
+ sane files are installed...
+
diff --git a/doc/plustek/MakeModule.sh b/doc/plustek/MakeModule.sh
new file mode 100644
index 0000000..b684f0d
--- /dev/null
+++ b/doc/plustek/MakeModule.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+#******************************************************************************
+#
+# Bash-Script to create Plustek-Scannerdriver modules for Kernel 2.4, 2.6 and 3.x
+# out of the backend sources...
+#
+
+BUILD_DIR=$PWD/build
+SRC_DIR=$PWD/../../backend
+MAKEFILE=$PWD/Makefile.kernel26
+KERNEL_V=`uname -r`
+OSMINOR=`uname -r | cut -b 3`
+OSMAJOR=`uname -r | cut -b 1`
+
+#
+# some intro ;-)
+#
+echo "This script will try and build a suitable kernel-module for your system."
+echo "If you'd like to make the module WITH debug output, restart this script"
+echo "with as follows:"
+echo "./MakeModule.sh DEBUG=y"
+echo "Press <ENTER> to continue or <CTRL><C> to cancel."
+read
+
+#
+# we need to be root user...
+#
+echo -n "Check for root..."
+if [ $EUID -ne 0 ]; then
+ echo -e "\b\b\b - failed"
+ echo "Please retry as root user."
+ exit -1
+fi
+echo -e "\b\b\b - done."
+
+#
+# Version checks...
+#
+echo -e "\nCheck for kernelversion:"
+if [ "$OSMAJOR" == "3" ];then
+ echo "Using makefile for kernel 2.6.x - okay for kernel 3 as well..."
+ MAKEFILE=$PWD/Makefile.kernel26
+elif [ "$OSMINOR" == "6" ]; then
+ echo "Using makefile for kernel 2.6.x"
+ MAKEFILE=$PWD/Makefile.kernel26
+elif [ "$OSMINOR" == "4" ]; then
+ echo "Using makefile for kernel 2.4.x"
+ MAKEFILE=$PWD/Makefile.kernel24
+else
+ echo "Your kernelversion >"$OSMAJOR"."$OSMINOR"< is probably not supported"
+ exit -2
+fi
+
+#
+# Setup...
+#
+echo -e "Build-directory: \n"$BUILD_DIR
+echo -n "Removing build-directory..."
+rm -rf $BUILD_DIR
+echo -e "\b\b\b - done."
+
+echo -n "Creating build-directory..."
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+echo -e "\b\b\b - done.\n"
+
+echo -n "Linking source files..."
+C_FILES=`ls $SRC_DIR/plustek-pp_*.c`
+H_FILES=`ls $SRC_DIR/plustek-pp_*.h`
+
+for F in $C_FILES $H_FILES $SRC_DIR/plustek-pp.h $SRC_DIR/plustek_pp.c; do
+ ln -s $F .
+done
+echo -e "\b\b\b - done."
+
+echo -n "Copying Makefile to build-directory..."
+cp $MAKEFILE Makefile
+echo -e "\b\b\b - done."
+
+#
+# Building the module...
+#
+echo "Making the module..."
+if [ "$OSMAJOR" == "2" -a "$OSMINOR" == "4" ]; then
+ make all $1
+else
+ make -C /lib/modules/$KERNEL_V/build/ SUBDIRS=$BUILD_DIR modules $1
+fi
+RES=$?
+cd ..
+if [ $RES != 0 ]; then
+ echo "There were some build errors..."
+ exit -1
+fi
+echo "done."
+
+echo "Should I install the module?"
+echo "Press <ENTER> to continue or <CTRL><C> to cancel."
+read
+
+make -C $BUILD_DIR install
+
+echo "Should I try and load the module?"
+echo "If this step fails, check the kernel-log."
+echo "Press <ENTER> to continue or <CTRL><C> to cancel."
+read
+
+make -C $BUILD_DIR load
+echo "done."
+
+echo "Should I remove the build directory?"
+echo "Press <ENTER> to continue or <CTRL><C> to cancel."
+read
+
+rm -rf $BUILD_DIR
+echo "done."
diff --git a/doc/plustek/Makefile.kernel24 b/doc/plustek/Makefile.kernel24
new file mode 100644
index 0000000..207ef39
--- /dev/null
+++ b/doc/plustek/Makefile.kernel24
@@ -0,0 +1,251 @@
+# Makefile for the plustek scanner driver (kernel-module)
+#
+###############################################################################
+#
+# define the directories
+#
+HOME_DIR := .
+SRC_DIR := $(HOME_DIR)
+INC_DIR := $(SRC_DIR)
+OBJ_DIR := $(HOME_DIR)/obj
+DOC_DIR := $(HOME_DIR)/doc
+BACKEND := $(SRC_DIR)
+
+#
+# define the used tools
+#
+MD = mkdir -p
+CC = gcc
+TAR = tar
+REF = cxref
+
+#
+# Comment/uncomment the following line to disable/enable debugging
+# can also be set by commandline parameter: make all DEBUG=y
+#
+#DEBUG = y
+
+#
+# common compiler options
+#
+OPT = -fomit-frame-pointer -D_PTDRV_VERSTR=\"$(VERSIONSTR)\"
+
+#
+# cxref options
+#
+REFOPT = -xref-all -index-all -html32
+
+#
+# Comment out if you are not running SMP. Someone take this out of here
+# when the SMP stuff gets moved out of the kernel Makefile.
+# SMP = 1
+# SMP_PROF = 1
+
+#
+# add the following to get assembly listing
+# -Wa,-alh,-L -g
+
+#
+# get some version numbers
+#
+ifeq ($(LINUXVERSION),)
+ LINUXVERSION = $(shell uname -r)
+endif
+
+VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(SRC_DIR)/plustek_pp.c | cut -b25-50 )
+
+# Change it here or specify it on the "make" commandline
+ifeq ($(HEADER_PATH),)
+MACHTYPE = $(shell env | grep debian-linux | wc -l | sed 's/ //g')
+ifeq ($(MACHTYPE),1)
+# debian
+ HEADER_PATH = /usr/src/kernel-headers-$(LINUXVERSION)/include
+else
+# redhat, slackware
+ HEADER_PATH = /usr/src/linux/include
+endif
+# HEADER_PATH = /usr/include
+endif
+
+ifeq ($(DEBUG),y)
+ DEBFLAGS = -O -g -DDEBUG # "-O" is needed to expand inlines
+else
+ DEBFLAGS = -O2
+endif
+
+#
+# the new style reference
+#
+K24_HEADER_PATH = /lib/modules/$(LINUXVERSION)/build/include
+
+#
+# try to autodetect if we can use the new style header include references
+#
+KERNEL_HEADERS = $(shell if test -d $(K24_HEADER_PATH); then \
+ echo $(K24_HEADER_PATH); \
+ else \
+ echo $(HEADER_PATH); \
+ fi; )
+
+#
+# seems to be necessary for kernels 2.4.x
+#
+MODVERFILE = $(shell if [ -e $(KERNEL_HEADERS)/linux/modversions.h ]; then \
+ echo $(KERNEL_HEADERS)/linux/modversions.h ; \
+ else \
+ echo $(KERNEL_HEADERS)/linux/modsetver.h ; \
+ fi )
+
+MODFLAGS = -DMODULE
+
+#
+# set MODVERSIONS if the kernel uses it
+#
+VERSUSED = $(shell grep 'define CONFIG_MODVERSIONS' \
+ $(KERNEL_HEADERS)/linux/autoconf.h | wc -l | sed 's/ //g')
+ifeq ($(VERSUSED),1)
+ MODFLAGS += -DMODVERSIONS -include $(MODVERFILE)
+endif
+
+
+WARNFLAGS = -Wall -Wstrict-prototypes
+CFLAGS = $(WARNFLAGS) $(OPT) -D__KERNEL__ -I$(KERNEL_HEADERS) -I$(INC_DIR) -I$(BACKEND) $(DEBFLAGS) $(MODFLAGS)
+MODLIB = /lib/modules/$(LINUXVERSION)
+
+ifdef SMP
+CFLAGS += -D__SMP__
+
+ifdef SMP_PROF
+CFLAGS += -D__SMP_PROF__
+endif
+endif
+
+TARGET = pt_drv
+
+OBJ = $(TARGET).o
+NAMES := dac detect genericio image map misc models io procfs
+NAMES := $(NAMES) motor p9636 ptdrv scale tpa p48xx p12 p12ccd
+NAMES := $(addprefix plustek-pp_, $(NAMES))
+SRCS := $(addprefix $(SRC_DIR)/, $(NAMES))
+SRCS := $(addsuffix .c, $(SRCS))
+OBJS := $(addprefix $(OBJ_DIR)/, $(NAMES))
+OBJS := $(addsuffix .o, $(OBJS))
+INCS := scan dbg types scandata procs hwdefs sysdep
+INCS := $(addsuffix .h, $(INCS))
+HDRS = $(addprefix $(INC_DIR)/plustek-pp_, $(INCS))
+
+#
+# the header files we need from the backend
+#
+BACKINCS := plustek-pp.h
+BACKINCS := $(addprefix $(BACKEND)/, $(BACKINCS))
+
+group = "root"
+mode = "644"
+INST_DIR = /lib/modules/$(LINUXVERSION)/kernel/drivers/char
+
+info:
+ @clear
+ @echo "Makefile to create the Plustek-Scanner kernel-module:"
+ @echo "all ... builds the module"
+ @echo "all DEBUG=y ... builds the module with debug-messages enabled"
+ @echo "clean ... cleans up the show"
+ @echo "install ... installs the module to the library path"
+ @echo "uninstall ... removes the module from the library path"
+ @echo "load ... tries to load the module and creates device nodes"
+ @echo "unload ... unloads the module"
+
+
+all: .depend chkdir $(OBJ)
+
+#
+# create object directory
+#
+.PHONY : chkdir
+chkdir:
+ @-$(MD) $(OBJ_DIR)
+ @-$(MD) $(DOC_DIR)
+
+$(OBJ): $(OBJS)
+ $(LD) -r $^ -o $@
+
+$(OBJS): Makefile $(HDRS) $(BACKINCS)
+
+$(OBJ_DIR)/%.o : $(SRC_DIR)/%.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJ_DIR)/$(OBJ): VERSION1 VERSION0
+
+#
+# copy the driver to the modules directory
+#
+install:
+ mkdir -p $(INST_DIR)
+ install -c -m $(mode) $(OBJ) $(INST_DIR)
+ /sbin/depmod -a
+
+#
+# remove it
+#
+uninstall:
+ rm -f $(INST_DIR)/$(OBJ)
+
+#
+# use modprobe to load the driver, remember to set the
+# parameter in /etc/modules.conf (see sane-plustek_pp.man for more details)
+#
+load: $(INST_DIR)/$(OBJ)
+# invoke modprobe with all arguments we got
+ /sbin/modprobe $(TARGET) || exit 1
+
+# Remove stale nodes and replace them, then give gid and perms
+ rm -f /dev/$(TARGET)*
+
+# when using the devfs support, we check the /dev/scanner entries
+# and only create links to the devfs nodes
+# at least we create one link
+ @if [ -e /dev/scanner/$(TARGET)* ]; then \
+ ln -s /dev/scanner/$(TARGET)0 /dev/$(TARGET); \
+ for name in `ls /dev/scanner | grep $(TARGET)`; do \
+ ln -s /dev/scanner/$$name /dev/$$name ; \
+ done \
+ else \
+ mknod /dev/$(TARGET) c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 0; \
+ mknod /dev/$(TARGET)0 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 0; \
+ mknod /dev/$(TARGET)1 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 1; \
+ mknod /dev/$(TARGET)2 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 2; \
+ mknod /dev/$(TARGET)3 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 3; \
+ \
+ chgrp $(group) /dev/$(TARGET)*; \
+ chmod $(mode) /dev/$(TARGET)*; \
+ fi
+
+#
+# unload the driver
+#
+unload:
+ /sbin/modprobe -r $(TARGET) || exit 1
+
+# Remove stale nodes
+ rm -f /dev/$(TARGET)*
+
+#
+# create reference docu
+#
+doc: chkdir
+ $(REF) $(REFOPT) $(INC_DIR)/*.h $(SRC_DIR)/*.c $(BACKEND)/plustek-share.h \
+ -D__KERNEL__ -I$(KERNEL_HEADERS) -I$(INC_DIR) -I$(BACKEND) $(MODFLAGS) \
+ -D_PTDRV_V1=$(VERSION1) -D_PTDRV_V0=$(VERSION0) -D_PTDRV_BUILD=$(BUILD) -O$(DOC_DIR)
+
+clean:
+ @-rm -f $(OBJ_DIR)/*.o .depend depend dep $(REF).* *.html $(TARGET).o
+ @-rm -rf $(OBJ_DIR)
+ @-rm -rf $(DOC_DIR)
+
+depend .depend dep:
+ $(CC) $(CFLAGS) -M $(SRCS) > $@
+
+ifeq (.depend,$(wildcard .depend))
+#include .depend
+endif
+
diff --git a/doc/plustek/Makefile.kernel26 b/doc/plustek/Makefile.kernel26
new file mode 100644
index 0000000..43a71ad
--- /dev/null
+++ b/doc/plustek/Makefile.kernel26
@@ -0,0 +1,124 @@
+# Makefile for the plustek scanner driver (kernel-module)
+#
+###############################################################################
+
+#
+# retrieve the version numbers
+#
+ifeq ($(LINUXVERSION),)
+ LINUXVERSION = $(shell uname -r)
+endif
+LINUXRELEASE = $(shell uname -r | cut -d'.' -f3)
+
+ifeq ($(VERSIONSTR),)
+ ifeq ($(SUBDIRS),)
+ VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(M)/plustek_pp.c | cut -b25-50 )
+ else
+ VERSIONSTR = $(shell grep "define BACKEND_VERSION" $(SUBDIRS)/plustek_pp.c | cut -b25-50 )
+ endif
+endif
+
+#
+# extra flags
+#
+EXTRA_CFLAGS += -D_PTDRV_VERSTR=\"$(VERSIONSTR)\"
+
+ifeq ($(DEBUG),y)
+ EXTRA_CFLAGS += -DDEBUG
+endif
+
+#
+# the module name
+#
+TARGET := pt_drv
+MODULE := $(TARGET).ko
+
+#
+# our files...
+#
+NAMES := dac detect genericio image map misc models io procfs
+NAMES := $(NAMES) motor p9636 ptdrv scale tpa p48xx p12 p12ccd
+NAMES := $(addprefix plustek-pp_, $(NAMES))
+OBJS := $(addsuffix .o, $(NAMES))
+
+#
+# now the kernel magic
+#
+ifneq ($(KERNELRELEASE),)
+obj-m := $(TARGET).o
+
+$(TARGET)-objs := $(OBJS)
+
+else
+KDIR := /lib/modules/$(shell uname -r)/build
+PWD := $(shell pwd)
+
+default:
+ $(MAKE) -C $(KDIR) M=$(PWD) modules
+endif
+
+#
+# the installation stuff
+#
+group = "root"
+mode = "644"
+INST_DIR = /lib/modules/$(LINUXVERSION)/kernel/drivers/parport
+
+#
+# copy the driver to the modules directory
+#
+install:
+ mkdir -p $(INST_DIR)
+ install -c -m $(mode) $(MODULE) $(INST_DIR)
+ /sbin/depmod -a
+
+#
+#
+#
+uninstall:
+ rm -f $(INST_DIR)/$(MODULE)
+
+#
+# use modprobe to load the driver, remember to set the
+# parameter in /etc/conf.modules (see INSTALL for more details)
+#
+load: $(INST_DIR)/$(MODULE)
+# invoke modprobe with all arguments we got
+ /sbin/modprobe $(TARGET) || exit 1
+
+# Remove stale nodes and replace them, then give gid and perms
+ rm -f /dev/$(TARGET)*
+
+# when using the devfs support, we check the /dev/scanner entries
+# and only create links to the devfs nodes
+# at least we create one link
+ @if [ -e /dev/scanner/$(TARGET)* ]; then \
+ ln -s /dev/scanner/$(TARGET)0 /dev/$(TARGET); \
+ for name in `ls /dev/scanner | grep $(TARGET)`; do \
+ ln -s /dev/scanner/$$name /dev/$$name ; \
+ done \
+ else \
+ mknod /dev/$(TARGET) c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 0; \
+ mknod /dev/$(TARGET)0 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 0; \
+ mknod /dev/$(TARGET)1 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 1; \
+ mknod /dev/$(TARGET)2 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 2; \
+ mknod /dev/$(TARGET)3 c `cat /proc/devices | sed -ne "s/\([0-9]*\) pt_drv/\1/p"` 3; \
+ \
+ chgrp $(group) /dev/$(TARGET)*; \
+ chmod $(mode) /dev/$(TARGET)*; \
+ fi
+
+#
+# unload the driver
+#
+unload:
+ /sbin/modprobe -r $(TARGET) || exit 1
+
+# Remove stale nodes
+ rm -f /dev/$(TARGET)*
+
+#
+# cleanup the show
+#
+clean:
+ @-rm -f *.o .depend depend dep $(MODULE) $(TARGET).o $(TARGET).mod.c .*.cmd
diff --git a/doc/plustek/Plustek-PARPORT-TODO.txt b/doc/plustek/Plustek-PARPORT-TODO.txt
new file mode 100644
index 0000000..94ef5f7
--- /dev/null
+++ b/doc/plustek/Plustek-PARPORT-TODO.txt
@@ -0,0 +1,38 @@
+Plustek-PARPORT-TODO.txt (2003-29-10) Gerhard Jäger <gerhard@gjaeger.de>
+========================================================================
+
+TODO (in general):
+ - more documentation/comments on the different functions
+ - remove/check the CHECK marks
+ - add additional button handler
+ - adding adjustment of the scan area
+ - checking timeout conditions (MiscCheckTimer !) and handle them correctly
+ - let the 96001/3 based models work with the highest available
+ phys. resolution
+ - Create the modes out of the capability list of each device
+
+(USER-MODE):
+ - line by line feedback to the backend
+
+
+KNOWN BUGS/Limitations:
+
+Model Description Workaround
+------------------------------------------------------------------------------
+
+OpticPro P9636 detected as OP12000 none
+Genius VividPro II Film Halftone/Gray > 450 dpi didn't work none
+OpticPro P4830 binary scanning does not work none
+OpticPro A3I bad picture quality none
+Genius HR6 negative scanning not okay none
+
+********************************* DONE ***************************************
+
+- PS/2 bidi does not work (libieee1284)
+- Update the IOCTL interface and remove some old structs (CmdBlk)
+
+******************************** SKIPPED *************************************
+
+better dither maps nobody needs halftone scanning
+make the backtrace work for ASIC 96001/3 not possible due to ASIC limits
+based models
diff --git a/doc/plustek/Plustek-PARPORT.changes b/doc/plustek/Plustek-PARPORT.changes
new file mode 100644
index 0000000..0e7d73b
--- /dev/null
+++ b/doc/plustek/Plustek-PARPORT.changes
@@ -0,0 +1,180 @@
+Version 0.1 10/20/98
+ 1.0 Initial release
+Version 0.2 10/26/98
+ 1.0 Fix Red/Green swap, optimize ppm output for black and white.
+Version 0.3 10/28/98
+ 1.0 Merge code with SANE
+ 2.0 Put GPL/SANE license info in all files
+Version 0.4 10/31/98
+ 1.0 Have driver report ASIC ID up to backend.
+ 2.0 Put NT stuff back in so that driver may be built under NT, try to
+ test build under NT but run out of memory in link.
+Version 0.5 10/31/98
+ 1.0 Fix parameters not getting reflected from crop.
+Version 0.6 11/1/98
+ 1.0 Take out unused stuff from ioctl_pt_drv.h.
+ 2.0 Put in VERSION info in Makefile and archiver.
+Version 0.7 11/4/98
+ 1.0 Fix model string when -L option is given. Add in driver version
+ string to model.
+ 2.0 Change Makefile so it builds without MODVERSIONS on distributions
+ that don't have it (Slackware).
+Version 0.8 11/5/98
+ 1.0 Change output when -L option is given to add status byte to try
+ to determine any differences between the 4830 and the 9630.
+Version 0.9 11/6/98
+ 1.0 Fix 4800 problem of inverse image when not in Binary mode.
+ 2.0 Put more debug stuff in, print out all read
+ reg's.
+Version 0.10 11/6/98
+ 1.0 Get halftone working.
+ 2.0 Put in hooks for kernel 2.1
+Version 0.11 11/17/98
+ 1.0 Put in sysdep-2.1.h to Makefile distrib
+Version 0.20 3/7/99
+ 1.0 Lots of changes to support 9630/12000.
+-------------------------------------------------------------------------------
+Version 0.3 02/29/2000
+ 1.0 Completely rewritten, does now support Plustek OpticPro 9636T scanner
+
+Version 0.31 03/20/2000
+ 1.0 Fix a bug in the autodetection routine
+ 2.0 Enhanced backend, to reflect the different modes the OpticPro 9636T
+ supports
+
+Version 0.32 - never released
+ 1.0 Corrected warmup-behaviour
+ 2.0 Fixed "first picture corrupted"-bug for transparency mode
+ 3.0 Fixed a bug that causes seg-faults when using cat /dev/pt_drv
+ 4.0 Added SCALE.C
+ 5.0 Made 4830P work
+
+Version 0.33 - never released
+ 1.0 Now using parport-module info for par-mode detection
+ 2.0 Made 9630P work
+
+Version 0.34 05/10/2000
+ 1.0 Data-recovery code for heavy load systems
+
+Version 0.35 05/19/2000
+ 1.0 Made 12000P/96000P work
+ 2.0 Merged parallel port code from Kevin Sisson
+ 3.0 Added new parameter "legal"
+
+Version 0.36 07/22/2000
+ 1.0 Improved data-recovery mechanism for ASIC96001/3 based models
+ 2.0 Added code for OP4800 shading
+ 3.0 Improved backend code to allow canceling the scan process
+ 4.0 OP600 and Primax 4800 Direct are working now
+ 5.0 Added new parameter "mov" (Model OVerride)
+ 6.0 Removed parameter "legal", use now "mov"
+ 7.0 Moved common headers for backend and driver to backend directory
+ and prepared the backend for SANE distribution
+ 8.0 OP6000 is working
+ 9.0 added man-page
+ 10.0 added multi-device support
+ 11.0 added support for 12-bit scans (SANE-1.0.3 and scanimage!!)
+
+Version 0.37 11/09/2000
+ 1.0 Added file io.c for parallel port I/O
+ 2.0 Added file procfs.c for proc-filesystem support
+ 3.0 Code cleanup
+ 4.0 Added A3I support
+ 5.0 Added Michaels backend patches
+
+Version 0.38 11/30/2000
+ 1.0 Started integration of ASIC98003 specific stuff
+ 2.0 renamed file transform.c tpa.c
+ 3.0 removed portmode stuff (I decided to support SPP/BPP and EPP, that's all)
+ 4.0 again code-cleanup
+ 5.0 PT12 is working
+ 6.0 Removed gray-mode scanning for TPA modes
+ 7.0 some minor changes according to kernel 2.4.x
+
+Version 0.39 08/11/2001
+ 1.0 Added slowIO switch
+ 2.0 Fixed some minor bugs
+ 3.0 Added forceMode switch
+ 4.0 Fixed a problem in the PT12 code that causes I/O timeouts
+ 5.0 Added Genius Colorpage Vivivd III V2 stuff
+ 6.0 Added A3I stuff aquired from Plustek
+ 7.0 Fixed a bug, that causes some seg-faults
+
+Version 0.40 12/17/2001
+ 1.0 The USB stuff has been included
+ 2.0 Fixed some minor problems
+ 3.0 Added Kernel 2.4.17 specific stuff
+ 4.0 Disabled A3I stuff as this refuses ASIC96003 based devices to work
+
+Version 0.41 01/10/2002
+ 1.0 Changed IOCTL interface to the kernel module to allow adjustment of some
+ driver internal variables
+ 2.0 Changed plustek.conf configuration fileformat to reflect the enhanced
+ capabilites
+
+Version 0.42 02/12/2002
+ 1.0 Added custom gamma table support
+ 2.0 Added configuration-file options to preset some stuff
+ 3.0 Changed all eMail entries to gerhard@gjaeger.de
+
+Version 0.42-11 09/17/2003
+ 1.0 Some Kernel 2.6.x additions
+ 2.0 Added Primax 4800Direct 30Bit override switch
+
+Somewhere on the way to 0.43 I decided to split parport & usb
+backends, so the parport backend now is also able to run complete
+in userspace by using either direct port I/O or libieee1248
+
+Version 0.43-2 04/15/2004
+ 1.0 Fixed some kernel 2.6 issues
+
+Version 0.43-3 07/14/2004
+ 1.0 User-space code has now the same version as the module code
+
+Version 0.43-4 07/15/2004
+ 1.0 DevFS support for kernel 2.6
+ 2.0 Removed floating point operations (Thanx to Rafal Rzepecki)
+ 3.0 More cleanup work
+ 4.0 bumped up build number
+
+Version 0.43-5 10/06/2004
+ 1.0 Change some scanmode definitions to match the SANE predefined
+ ones
+
+Version 0.43-6 04/25/2005
+ 1.0 Removed inline stuff from kernel module code, as GCC3.4 will
+ make some trouble
+
+Version 0.43-7 05/11/2005
+ 1.0 Fixed timer issues in user-space (Thanx to Rod Roark)
+
+Version 0.43-8 08/10/2005
+ 1.0 Fixed problem on ASIC96003/1 based devices, when scanning
+ lineart at 200 and 300 dpi
+
+Version 0.43-9 11/14/2005
+ 1.0 Fixed sizeof(long) issue for 64bit platforms, see
+ bug #302195
+
+Version 0.43-10 02/16/2006
+ 1.0 Fixed bug, that prevents backend from working, when the
+ device is connected to parport1 or higher, parport0 works.
+ Bug spotted by Christoph Steinbruchel.
+
+Version 0.43-11 08/09/2006
+ 1.0 Changed sane.type to "flatbed scanner" only
+
+Version 0.43-12 08/29/2006
+ 1.0 Fixed "not homing" problem, the sensor did not
+ return when the driver gets the _IOCTL_STOP command
+ 2.0 Fixed compilation issue for kernels > 2.6.15
+ 3.0 Fixed compiler warning conditions
+
+Version 0.43-13 06/18/2007
+ 1.0 Removed DEVFS stuff for Kernels > 2.6.15
+ 2.0 Added class stuff
+
+Version 0.44-1 02/13/2013
+ 1.0 Fixed issues for Kernels > 2.6.35
+ 2.0 Define ULong and friends to uint32_t to make the driver
+ work in a 64 bit environment \ No newline at end of file
diff --git a/doc/plustek/Plustek-PARPORT.txt b/doc/plustek/Plustek-PARPORT.txt
new file mode 100644
index 0000000..e5b6097
--- /dev/null
+++ b/doc/plustek/Plustek-PARPORT.txt
@@ -0,0 +1,49 @@
+Plustek-PARPRORT.txt (2004-03-28) Gerhard Jäger <gerhard@gjaeger.de>
+====================================================================
+
+
+Beginning with SANE-1.0.13, there's a backend called plustek_pp.
+This is for controlling Plustek parallel-port scanner and compatible
+devices. For a full listing, see plustek_pp.desc.
+
+This code formerly was available for creating the Linux kernelmodule
+pt_drv. This should no longer be necessary. You should be able to use
+the backend out of the box.
+
+
+The kernel module
+-----------------
+
+As it might be helpful to create and use the kernel-module, this way still
+exists. It's possible to create this module out of the backend sources
+in sane-backends/backend. Simply do (as root user)
+
+./MakeModule.sh
+
+Then the module should be compiled, installed and loaded.
+
+Add the following three lines to file /etc/modules.conf
+
+alias char-major-40 pt_drv
+pre-install pt_drv modprobe -k parport
+options pt_drv lampoff=180 warmup=15 port=0x378 lOffonEnd=0 mov=0 slowIO=1
+
+See man page for sane-plustek_pp ("man sane-plustek_pp") for explanation of
+these options.
+
+Now "scanimage -L" should show something like this:
+device `plustek:/dev/pt_drv' is a Plustek 9630P flatbed scanner
+
+
+Known Problems:
+---------------
+
+Sometimes it is necessary to change the ioctl-interface between the
+driver and the backend, in this case the version number of the communication
+protocol will be changed and newer drivers won't work with older backends
+and vice versa.
+In this case (error -9019 in the SANE debug output!!) you have to recompile SANE
+AND the driver (have a look at the installation procedure above).
+
+
+
diff --git a/doc/plustek/Plustek-USB-TODO.txt b/doc/plustek/Plustek-USB-TODO.txt
new file mode 100644
index 0000000..0ea7e8b
--- /dev/null
+++ b/doc/plustek/Plustek-USB-TODO.txt
@@ -0,0 +1,53 @@
+Plustek-USB-TODO.txt (2007-12-13) Gerhard Jaeger <gerhard@gjaeger.de>
+=====================================================================
+
+TODO (in general):
+- more documentation/comments for the different functions
+- replace mclk_fast stuff and use instead values from 75DPI grayscale
+
+
+KNOWN BUGS/Limitations:
+
+Model Description Workaround
+------------------------------------------------------------------------------
+
+HP 2100c Straight Line Bug none
+Bearpaw1200 works only once restart backend each time
+All with TPA Negative Scanning quality bad none
+CIS devices Skip calibration does not work none
+
+********************************* DONE ***************************************
+
+all add plustek.conf presettings to done
+ interface for frontends
+
+all Auto-warmup done
+all Sensor movement speedup ffw/rev done
+
+Canon fine calibration does not work fixed
+Canon 650 color modes >=600 dpi too dark fixed
+Canon 660 add support done
+Canon 1220 image quality not very good fixed
+Canon 1240 gray mode too bright fixed
+
+HP 2100c hits against scan-bed fixed
+Genius Devices not recognized fixed
+EPSON Photo Permanently warmup on TPA scanning fixed
+EPSON Photo Transparency mode does not work fixed
+ correctly
+all binary mode does not work correctly done
+Canon 16bit gray mode does not work done
+EPSON 1250/60 Motor control settings are wrong fixed
+CanoScan 1240 added
+EPSON + HP vertical line bug fixed
+HP blooming on 42bit >=400dpi fixed
+UMAX5400 bad picture quality fixed
+UMAX3400 Straight Line Bug fixed
+all problems on ARM and XScale fixed
+
+Make the color modes > 8bit work correctly done
+make mono/gray modes work on Canon scanners done
+copy picture line by line to backend done
+cancel function does not work correctly in large resolutions fixed
+Move documents to its correct SANE place done
+
diff --git a/doc/plustek/Plustek-USB.changes b/doc/plustek/Plustek-USB.changes
new file mode 100644
index 0000000..8ed5cc8
--- /dev/null
+++ b/doc/plustek/Plustek-USB.changes
@@ -0,0 +1,307 @@
+Plustek.changes - Gerhard Jaeger <gerhard@gjaeger.de>
+=====================================================
+
+Note: All other not mentioned builds have never been released.
+
+V 0.52-11 (2013-02-13)
+---------------------
+Added support for Q-Scan A6 scanner (see report #312073)
+
+V 0.52-10 (2012-03-19)
+---------------------
+Fixed batch scanning
+
+V 0.52-9 (2009-04-27)
+---------------------
+Tweaked highspeed settings for Epson 1260
+
+V 0.52-8 (2008-08-25)
+---------------------
+Added preliminary support for Visioneer XP100
+Tweaked entry for LM9831 version of Plustek UT12
+
+V 0.52-7 (2007-12-13)
+---------------------
+Fixed alignment issues for archs like XScale/ARM
+Fixed dumppic function to get valid grayscale pictures
+
+V 0.52-6 (2007-11-23)
+---------------------
+Tweaked TravelScan464 settings.
+Improved AFE gain calculation for CIS devices. This should avoid
+stripes in the scanned images.
+
+V 0.52-4 (2007-11-16)
+---------------------
+Tweaked TravelScan464 settings
+Added possibility to disable dark-calibration with lamp on
+(touches devices like CanoScan1220 etc)
+Use attribute packed for data access structs
+
+V 0.52-4 (2007-11-07)
+---------------------
+Added support for Syscan TravelScan464
+
+V 0.52-3 (2007-07-26)
+---------------------
+Checked UMAX3400/3450 models
+Force output bit set (MIO), when lamp is switched
+
+V 0.52-2 (2007-07-10)
+---------------------
+Added flag to allow only 1- and 8-bit scanmodes. The Q-Scan does
+not seem to support 14-bit modes.
+
+V 0.52-1 (2007-06-29)
+---------------------
+
+Added sheetfed device Q-Scan USB001 from Portable Peripherals
+Fixed Mustek Bearpaw and did some speedup (bugreports #304343 and
+#301763)
+Fixed calibration for senororders other that RGB
+
+V 0.51-16 (2007-03-05)
+----------------------
+
+Added CanoScan to all Canon device strings.
+Identified one more Plustek device as U24.
+Fixed button handling for Plustek/KYE devices and
+added some more debug messages.
+
+V 0.51-15 (2006-11-22)
+----------------------
+Fixed option descriptors (bugreport #303786)
+
+V 0.51-14 (2006-08-11)
+----------------------
+Lowered speed for LiDE20/30 models in low resolution mode (<75dpi)
+
+V 0.51-13 (2006-08-09)
+----------------------
+Changed sane.type to "flatbed scanner" only
+Fixed motorsettings for LiDE30 (bugreport #303722)
+Fixed LiDE20 settings. Got some reports of non-working devs, although
+my N670U is working fine. Lowered the max speeds and increased the
+MCLK-div for fast movement. (bugreport #303695)
+
+V 0.51-12 (2006-06-30)
+----------------------
+Fixed bit-depth selection
+
+V 0.51-11 (2006-06-08)
+----------------------
+Fixed calibration: All modes will be coarse calibrated now, fine calibration
+will be done only for 8 bit modes.
+Fixed paper eject during startup.
+
+V 0.51-10 (2006-05-28)
+---------------------
+Released
+
+V 0.51-8 (2006-04-09)
+---------------------
+Added cache for fine calibration (CIS devices only)
+Added support for sheet-fed scanner (CIS devices only)
+Added support for Syscan TravelScan662
+
+V 0.50-10 (2006-01-31)
+---------------------
+Fixed CanoScan N1220U settings.
+
+V 0.50-9 (2006-01-19)
+---------------------
+Added high-speed setting for HP2200.
+Fixed constraint_type for OPT_BUTTON.
+
+V 0.50-8 (2006-01-18)
+---------------------
+Fixed CanoScan N670U settings (bugreport #302433).
+
+V 0.50-7 (2005-10-28)
+---------------------
+Changed high-speed setting for UMAX 3400, due to bugreport #302317.
+Added disable speeup feature (as option).
+Fixed CanoScan N650U settings (bugreport #302433).
+
+V 0.50-6 (2005-10-25)
+---------------------
+Fixed segfault in fine calibration for CIS devices.
+Tweaked LiDE25 settings (thanks to Gerd Cendelin for lending me
+his LiDE25).
+Let 1200DPI CIS devices use now the green-channel for gray scans.
+
+V 0.50-5 (2005-10-21)
+---------------------
+Fixed high-speed feature of CanoScan D660U.
+
+V 0.50-4 (2005-10-02)
+---------------------
+Updated motor settings for Canoscan LiDE25, thanks to
+Stephan February <stephanf@singnet.com.sg> for providing these
+values.
+
+V 0.50-3 (2005-08-22)
+---------------------
+Fixed problem, when trying to scan at resolutions beyond the
+optical one (sensor stops too early)
+
+V 0.50-2 (2005-08-19)
+---------------------
+More cleanup.
+Removed obsolete _WAF_BLACKFINE.
+LiDE20 does not seem to have a reliable black calibration area,
+so the devices now will switch off the lamp for dark calibration.
+Fixed line statistics and added calibration data output.
+
+V 0.50-1 (2005-08-15)
+---------------------
+Cleanup
+Activated IPC between reader-process and parent
+Added button support for Plustek/Genius devices
+Did some whitespace cleanup and removed those *p typedefs
+Tried to improve CIS calibration (somewhat back to 1.0.13)
+Added _TWEAK_GAIN definition to allow CIS calibration increase
+gain values during basic lamp setup phase
+Added call to speedtest to CIS calibration
+Fixed CanoScan startup problem (the way misc I/Os will be set
+after power-up has done the trick)
+
+V 0.49-8 (2005-08-08)
+---------------------
+Added LiDE25 settings
+
+V 0.49-7 (2005-07-21)
+---------------------
+Bugfix release - fixed lampsettings for CIS calibration
+
+V 0.49-6 (2005-07-07)
+---------------------
+Bugfix release - calibration and segfault :(
+
+V 0.49-5 (2005-07-04)
+---------------------
+Added IPC between reader-process and parent process to
+be pepared for sharing calibration info.
+Added button support for backend
+
+V 0.49-4 (2005-06-27)
+---------------------
+Fixed "double free" problem during sane_exit.
+
+V 0.49-3 (2005-04-18)
+---------------------
+Fixed backtracking problem, when sensor-speedup is active.
+
+V 0.49-2 (2005-01-12)
+---------------------
+Tweaked some device settings
+Updated copyright info
+Using now PhyDpi.y as selector for the motor MCLK range
+
+V 0.49-1 (2004-11-19)
+---------------------
+Improved multi-device capability
+
+V 0.48-10 (2004-10-30)
+----------------------
+- Fixed a bug in buffer calculation for CIS devices
+
+V 0.48-9 (2004-10-19)
+---------------------
+- Use the same option names for RGB gain as umax_pp backend
+
+V 0.48-8 (2004-10-06)
+---------------------
+- split scanmodes & bit-depths
+
+V 0.48-7 (2004-10-04)
+---------------------
+- changed some strings according to bug #300963
+
+V 0.48-6 (2004-09-07)
+---------------------
+- fixed UMAX lamp-off bug
+
+V 0.48-4 (2004-07-26)
+---------------------
+- added speedup parameters for UMAX3400/3450
+- added disableSpeedup option
+- added UMAX3400/3450 TPA autodetection
+
+V 0.48-3 (2004-07-16)
+---------------------
+- improved autowarmup feature
+- improved speedup feature
+
+V 0.48-2 (2004-07-07)
+---------------------
+- fixed binary mode for CanoScan D660U
+
+V 0.48-1 (2004-07-02)
+---------------------
+- added more options to the frontend interface
+- added UMAX 3400 with product ID 0x0050
+- added support for the UMAX 3450
+- added autowarmup for CFL (most CCD-scanner)
+- added speedup for sensor for some devices
+- fixed lamp switching problem for D660U
+- fixed negative scanning lamp problem
+- fixed Gray 16 mode for CanoScan D660U
+- code cleanup
+
+V 0.47-11 (2004-04-21)
+----------------------
+- minor fixes, esp. for MacOSX
+- added lamp-off and warmup options to be configurable by backends
+
+V 0.47-8 - 0.47-10
+------------------
+- never released
+
+V 0.47-7 (2004-02-08)
+---------------------
+- fixed bypass calibration function for CIS devices
+- added lampoff stuff to config file
+
+V 0.47-6 (2004-01-21)
+---------------------
+- Cleanup work
+- Changed lamp off timer for non-setitimer systems
+
+V 0.47-5 (2004-01-09)
+---------------------
+- Added big-endian code to support also PPC architectures
+- Added mov (model override) to support various devices using
+ the same product ID (namely Mustek BearPaw 1200)
+- Added per-model gamma values
+- Fixed a bug in the coarse CIS-lamp calibration
+- Cleanup work
+
+V 0.47-1 - 0.47-4
+-----------------
+- never released
+
+V 0.46-9 (2003-11-03)
+---------------------
+- Added alternate calibration for CIS devices
+- Added coarse calibration data-cache
+- Moved parallelport code to extra backend file plustek_pp
+- Fixed some minor bugs
+- Fixed problem with CIS devices using FreeBSD
+
+V 0.46-1 - 0.46-8
+-----------------
+- never released
+
+V 0.45 (2003-08-05)
+-------------------
+- Starting this changelog
+- Updates since V 0.44:
+ * better CIS device support
+ * added CanoScan N1220U, N1240U
+ * made CanoScan N650U and N670U work
+ * fixed EPSON 1260 motor killer-bug
+ * improved TPA scanning
+ * fixed TPA warmup bug on EPSON 1260/Photo
+ * fixed Genius device detection problem
+ * Added Compaq S4-100 (identical to UMAX3400)
diff --git a/doc/plustek/Plustek-USB.txt b/doc/plustek/Plustek-USB.txt
new file mode 100644
index 0000000..e1ee793
--- /dev/null
+++ b/doc/plustek/Plustek-USB.txt
@@ -0,0 +1,457 @@
+Plustek-USB.txt (2005-08-08) Gerhard Jäger <gerhard@gjaeger.de>
+===============================================================
+
+NOTE:
+-----
+
+ALL YOU NEED TO RUN YOUR USB SCANNER IS ALREADY INCLUDED. THERE'S
+NO NEED TO INSTALL THE KERNEL MODULE pt_drv. THIS ONE IS ONLY NEEDED
+FOR THE PLUSTEK PARALLELPORT SCANNER.
+
+
+List of all currently implemented devices
+-----------------------------------------
+
+Quite a lot of them are not tested or even identified. Please send me the ids
+of your device...
+
+
+PLUSTEK
+=======
+Vendor ID: 0x07B3
+
+Product ID Device-description and status
+0x0005 not identified yet
+0x0007 not identified yet
+0x000F not identified yet
+0x0010 U12 - working
+0x0011 U24 (LM9831) - working
+0x0012 not identified yet
+0x0013 UT12 (LM9831) - working
+0x0014 not identified yet
+0x0015 U24 (LM9832) - working
+0x0016 not identified yet
+0x0017 UT12 - working, UT16 - working, UT24 - working
+
+MUSTEK
+======
+BearPaw vendor ID: 0x0400 (They use the NationalSemiconductors ID!!!)
+
+Product ID Device-description and status
+0x1000 BearPaw 1200 (LM9831) - working
+0x1001 BearPaw 1200 (LM9832) - not tested
+0x1001 BearPaw 2400 (LM9832) - mostly working
+
+KYE (Genius)
+============
+Vendor ID: 0x0458
+
+Product ID Device-description and status
+0x2007 ColorPage-HR6 V2 - working
+0x2008 ColorPage-HR6 V2 - not tested
+0x2009 ColorPage-HR6A - not tested
+0x2013 ColorPage-HR7 - working
+0x2015 ColorPage-HR7LE - not tested
+0x2016 ColorPage-HR6X - not tested
+
+Hewlett Packard
+===============
+Vendor ID: 0x03F0
+
+Product ID Device-description and status
+0x0505 HP Scanjet 2100c - working
+0x0605 HP Scanjet 2200c - working
+
+EPSON
+=====
+Vendor ID: 0x04b8
+
+Product ID Device-description and status
+0x010F EPSON Perfection 1250/Photo - working
+0x011D EPSON Perfection 1260/Photo - working
+
+UMAX
+====
+Vendor ID: 0x1606
+
+Product ID Device-description and status
+0x0050 UMAX 3400 - working
+0x0060 UMAX 3400/3450 - working
+0x0160 UMAX 5400 - working
+
+COMPAQ
+======
+Vendor ID: 0x049F
+
+Product ID Device-description and status
+0x001A S4-100 - working, identical with UMAX 3400
+
+CANON
+=====
+Vendor ID: 0x04A9
+
+Product ID Device-description and status
+0x???? FB620U - not integrated
+0x2206 N650U - working
+0x2207 N1220U - working
+0x2208 D660U - working
+0x220D N670U/LiDE20 - working
+0x2220 LiDE25 - working
+0x220E N1240U/LiDE30 - working
+
+
+How to use and configure the Plustek USB backend
+------------------------------------------------
+
+Please note, that the following is only needed, if you need to upgrade
+a SANE version...
+
+
+Preparations
+------------
+
+What do we need ?
+
+a SANE backends archive (i.e. sane-backends-1.0.9.tar.gz)
+a driver archive (i.e. plustek-sane-0.45-1.tar.gz)
+
+The latest SANE archive can be obtained at:
+http://www.sane-project.org
+and the latest backend at:
+http://www.gjaeger.de/scanner/plustek.html
+
+Assumptions
+-----------
+
+Our starting point is your home-directory:
+
+:~>
+
+The packages (here sane-backends-1.0.9.tar.gz und plustek-sane-0.45-1.tar.gz)
+are in the /tmp directory.
+
+Let's go:
+---------
+
+Change to your home directory and create a sane directory
+cd ~
+mkdir sane
+
+unpack your sane tar-ball (here "sane-backends-1.0.9.tar.gz")
+to this "sane" directory
+
+cd sane
+tar xvzf /tmp/sane-backends-1.0.9.tar.gz
+
+Now unpack your plustek-sane tarball (here "plustek-sane-0.45-1.tar.gz")
+to the backends directory:
+
+cd sane-backends-1.0.9
+tar xvzf /tmp/plustek-sane-0.45-1.tar.gz
+
+Now do the ./configure step...
+Especially for SuSE with a preinstalled SANE-RPM:
+./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --infodir=/usr/share/info
+
+Then do the make step and after that as root user perform the make install
+step.
+
+That's all!
+
+Before using, make sure that the USB scanner device driver is loaded:
+modprobe scanner
+or
+modprobe scanner vendor=0x7b3 product=0x17
+
+You might need to add the following line to /etc/modules.conf, if the scanner is not
+supported directly - vendor and product must match your device!
+options scanner vendor=0x7b3 product=0x17
+
+If you're not sure about the vendor and product id of your device, simply load
+the USB subsystem and plug in your scanner. Then do a
+cat /proc/bus/usb/devices
+and look for the scanner
+
+Now you have to configure the backend. Edit the file /etc/sane.d/plustek.conf
+and fill in the appropriate vendor and product id (see there for examples)
+
+This is it...
+
+
+Autoloading scanner.o
+---------------------
+
+To perform an automatic load of the scanner module, you might add the modprobe
+line to your boot.local file.
+i.e. on SuSE system > 7.x
+/etc/init.d/boot.local
+An alternative way is to use the hotplug utilities.
+
+
+Using hotplug utilities and libusb
+----------------------------------
+
+When using libusb with SANE, then you should also use the hotplug utilities to
+automatically setup your device nodes (at least the permissions) and prevent
+scanner.o from loading.
+
+Assuming, that these utilites are properly installed on your box, you have
+to tweak and add some files.
+
+In directory (where of course the config files reside):
+/etc/hotplug
+
+Append the line
+scanner
+to file
+blacklist
+
+This prevents the scanner module from the usb-subsystem to be loaded.
+
+Next thing is to add a new line in
+usb.usermap:
+
+usbscanner 0x0003 0x1606 0x0160 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00 000000
+
+The example line shows the vendor ID of UMAX 0x1606 and the product ID of the 5400
+0x0160 - these values must match the ones of your scanner.
+
+Last step is adding a script in
+/etc/hotplug/usb/
+It is called "usbscanner" (don't forget the executable rights)
+
+-------------------------------------------------
+# !/bin/bash
+
+if [ "${ACTION}" = add ] && [ -f "${DEVICE}" ]
+then
+ chgrp users "${DEVICE}"
+ chmod ug+rw "${DEVICE}"
+fi
+-------------------------------------------------
+
+This script will correct the access right to your scanner device when the device
+is plugged in.
+
+
+Debugging your USB scanner (written by Kev Green)
+-------------------------------------------------
+
+Firstly, are you running the latest version of SANE, and the Plustek USB driver?
+
+Double check at http://www.gjaeger.de/scanner/plustek.html
+(Plustek USB driver) and http://www.sane-project.org (SANE Suite) to
+make sure you are.
+
+Now, in order to test and utilise your scanner with the Scanner Access Now Easy
+(SANE) system, there are basically two programs that you will need to use from
+the sane-frontends (versions post 1.0.3) or sane (versions pre 1.0.3) packages.
+
+Firstly, the sane-find-scanner program will allow you to locate your scanner,
+and help you work out if sane knows where it is. This is not definite however,
+as (you'll see this too when using sane-find-scanner) it will find all the
+scanners on your USB and SCSI bus, whereas sane will only work when you have
+the relevant sane backend installed and configured correctly for the relevant
+scanner.
+
+So, if sane-find-scanner can find your scanner, but scanimage doesn't work,
+then you need to check, double check, and even triple-check your SANE
+configuration file for plustek scanners (plustek.conf, usually in
+/etc/sane.d
+or maybe in /usr/local/sane/ or somewhere, a "find" will be able to tell you
+where. It may take a while though!).
+
+If sane-find-scanner doesn't find your scanner, then you should check to see if
+the kernel recognises it at all, which you can do with the following command,
+as mentioned above:
+
+cat /proc/bus/usb/devices
+
+If your scanner doesn't appear in there, then the kernel has not recognised it.
+There may however be a crypic-looking entry in there which doesn't name itself
+as plustek, in which case it is recognised as being there by the kernel, but is
+not know to the kernel's USB device database, in which case this should be
+mentioned on the plustek list (<plustek@linuxhacker.org>), from where
+the "powers that be" will deal with it.
+
+If that file does not exist in the /proc filesystem, then you don't have the
+"Preliminary USB filesystem" option set in your kernel, and you will need to
+recompile your kernel to allow you to do this step in debugging. If it
+exists, but is empty, you will have to make sure (use the kernel configure
+help information and the details of your motherboard to ascertain this!)
+you have the right one of UHCI or OHCI USB modules installed or compiled into
+your kernel.
+
+Once you've established that the kernel has recognised your scanner, you can
+start pointing the finger at SANE, or simply the "scanner" module. You will
+need to have selected the "USB Scanner" option in your kernel compilation as
+a module, or compiled into the kernel. If you have done neither, then SANE will
+simply not be able to recognise your scanner. Rectify that, if you are missing
+it.
+
+If you have carried out all of the above steps, then sane-find-scanner should
+be able to recognise your scanner correctly.
+
+sane-find-scanner probes all of the devices on the SCSI and USB busses, and
+so you may find that it outputs "unable to get minor data" errors or similar
+to your terminal, or to your error logs, you can safely ignore these as long
+as it does that, and has recognised your scanner.
+
+Once you have found your scanner okay using sane-find-scanner, then you are
+ready to start messing around with the actual scanimage program to attempt
+to scan an image in.
+
+Obviously (although this may turn out to be premature) you should now have
+something in your scanner ready to scan for verification.
+
+At this stage, you should begin to be warey, because while the USB stuff for
+Plustek scanners is in development it may (like any kernel/module related software)
+crash your system with a kernel panic, or simply just segfault, so for your own sake,
+close down all the applications you are running and ONLY use text console, rather
+than X-Windows at this point, as you will certainly want to avoid any
+potential filesystem corruption.
+
+At this point it's probably also good to ensure that you have selected the
+"Magic SysRq Key" option in the kernel hacking section of the kernel config,
+and done:
+
+echo 1 > /proc/sys/kernel/sysrq
+
+And of course read the readme for that in /usr/src/linux/Documentation, as that
+should allow you to avoid filesystem corruption during any crashes that might
+happen.
+
+Now, before running scanimage, you should enable the maximum levels of
+debugging possible in both the SANE core and in the Plustek scanner
+backend.
+
+To do this you should do:
+
+export SANE_DEBUG_PLUSTEK=12
+export SANE_DEBUG_DLL=12
+
+Now, if you run scanimage, you should be able to see the maximum debugging
+messages.
+
+If those messages don't tell you what is wrong, then take note of your scanner
+type, the contents of /proc/bus/usb/devices, and the contents of your error
+log, as well as (where possible) the output of the scanimage command (if
+you can't capture it directly, an as-accurate-as-possible description is
+MUCH better than nothing!), and try and get all of the activity that
+your scanner did as well (light
+came on? didnt? motors came on? etc?) and email that to the plustek list
+(<plustek@linuxhacker.org>).
+
+For the particularly adventurous only...
+
+You might want to try running the scanimage program through strace or
+gdb to see if you can go some or all of the way to debugging the problem
+yourself, and post the relevant (ie. last!) parts of those utilities
+output to the plustek-help list. If you don't know what strace or gdb
+are, then you should probably not try that.
+
+It's probably safe to run your scanner in a normal operating environment
+under Linux once you have got it working once in a text console.
+
+
+How to add a new LM9831/2 based device description
+--------------------------------------------------
+
+If you have a LM9831 or LM9832 based scanner and your vendor and product id did
+not appear in the list above and you're willing to do some experiments, then
+simply add your device to the file plustek-devs.c at the end of the list.
+See the list at the end of the file how this works...
+
+
+Thanx guys for helping:
+-----------------------
+
+Henning Meier-Geinitz henning@meier-geinitz.de for Mustek Bearpaw testing, ideas and patches
+Stefan Nilsen stefan.nilsen@telia.com for HP2200c testing and patches
+Kev Green kyrian@ore.org for Documentation, UT12 testing and RPMS.
+Holger Bischof bischof@cs.tu-berlin.de for OpticPro U12 testing
+Abhijit Sovakar a.sovakar@gmx.de for OpticPro UT24 testing
+Peter Koellner peter@mezzo.net for OpticPro U24 testing
+Gene Heskett gene_heskett@iolinc.net for EPSON 1250 testing and patches
+Tasnim Ahmed tasnim_ahmed@yahoo.com for KYE Colorpage HR6 testing
+Reinhard Max max@suse.de for EPSON 1250 testing and patches
+Allan N. Hessenflow allan@kallisti.com for UMAX 3400 testing and patches
+Craig Smoothey craig@smoothey.org for HP2100c testing and patches
+Till Kamppeter till.kamppeter@gmx.net for EPSON1260 testing
+Christopher Montgomery monty@xiph.org for CanoScan calibration works
+Olaf Leidinger leidola@newcon.de for CanoScan LiDE25 testing
+
+and a lot of other guys not named here...
+
+
+Some equations which are used to calculate some stuff
+-----------------------------------------------------
+
+The stuff is used in plustek_usbscan.c to get the correct register settings
+out of the hardware descriptions:
+
+Crystalfrequency is 48MHz
+
+
+Pixel Period (seconds/pixel)
+----------------------------
+
+ MCLK_DIV x 8 x CM
+PixelPeriod = -----------------
+ 48MHz
+
+
+Integration Time (seconds)
+--------------------------
+
+Tint = PixelPeriod X LineLength
+
+ MCLK_DIV x 8 x CM X LineLength
+Tint = ------------------------------
+ 48MHz
+
+
+Ideal MCLK Divider
+------------------
+ 48MHz (DataPixelsEnd - DataPixelStart)
+MCLK_DIV = --------------------------- x --------------------------------
+ HostIORate x 8 x LineLength HDPI_ADJ x PP
+
+ 48MHz (DataPixelsEnd - DataPixelStart) CM
+ = ------------------------------- x -------------------------------- x ----
+ BytesPerSecond x 8 x LineLength HDPI_ADJ x PP CM
+
+ 48MHz 1
+ = --------------------------- x Tint x ---------
+ 8 x LineLength CM
+
+ 48MHz (Tint * 1000)
+ = ----------------------- x --------------------
+ 1000 x 8 x LineLength CM
+
+
+Ideal Scan Speed (inches/second)
+
+ 1 1 1
+ScanSpeed = ----------- x -------- x --------
+ PixelPeriod FSPI x 4 StepSize
+
+ 48MHz 1 1
+ScanSpeed = ----------------- x -------- x --------
+ MCLK_DIV x 8 x CM FSPI x 4 StepSize
+
+
+ 48MHz
+MCLK_DIV = ------------------------------------------
+ ScanSpeed x 8 x CM x FSPI x 4 x StepSize
+
+
+
+----------------
+Symbols:
+
+CM - Color Mode (unitless), 3 for channel pixel rate color, else 1
+
+
+-------------------------
+