kopia lustrzana https://gitlab.com/sane-project/backends
plustek_pp: Removed references to the kernel driver from doc.
rodzic
95e2498fe9
commit
3635176eb9
121
doc/plustek/FAQ
121
doc/plustek/FAQ
|
@ -12,111 +12,10 @@ If you have some more FAQ entries, let me know <gerhard@gjaeger.de>
|
||||||
THANKS to Jochen <jochen@puchalla-online.de>, who roamed through the
|
THANKS to Jochen <jochen@puchalla-online.de>, who roamed through the
|
||||||
mailing-list and gathered the different questions.
|
mailing-list and gathered the different questions.
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
* TROUBLE-SHOOTING *
|
* General *
|
||||||
* *
|
|
||||||
* 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 every time you load pt_drv with modprobe, parport will be loaded
|
|
||||||
automatically. After modifying this file, call
|
|
||||||
depmod -va
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SYMPTOM: Scanner makes awful noise
|
SYMPTOM: Scanner makes awful noise
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -138,7 +37,6 @@ The second case is often reported when the printer driver lp.o is
|
||||||
already loaded. So remove lp.o before loading pt_drv.
|
already loaded. So remove lp.o before loading pt_drv.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SYMPTOM: Printer starts to print while scanning
|
SYMPTOM: Printer starts to print while scanning
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -294,23 +192,6 @@ A: You should be able to use xscanimage with gimp:
|
||||||
now the Acquire Image menu entry. That's all.
|
now the Acquire Image menu entry. That's all.
|
||||||
If not, start gimp from an xterm and have a look at the output.
|
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.
|
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
|
My scanner light is coming on yet Xscanimage seems to report that there
|
||||||
is no scanner present.
|
is no scanner present.
|
||||||
|
|
|
@ -1,116 +0,0 @@
|
||||||
#!/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."
|
|
|
@ -1,250 +0,0 @@
|
||||||
# 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
|
|
|
@ -1,124 +0,0 @@
|
||||||
# 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
|
|
|
@ -1,46 +1,10 @@
|
||||||
Plustek-PARPRORT.txt (2004-03-28) Gerhard Jäger <gerhard@gjaeger.de>
|
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.
|
Beginning with SANE-1.0.13, there's a backend called plustek_pp.
|
||||||
This is for controlling Plustek parallel-port scanner and compatible
|
This is for controlling Plustek parallel-port scanner and compatible
|
||||||
devices. For a full listing, see plustek_pp.desc.
|
devices. For a full listing, see plustek_pp.desc.
|
||||||
|
|
||||||
This code formerly was available for creating the Linux kernelmodule
|
This code formerly was available for creating the Linux kernel module
|
||||||
pt_drv. This should no longer be necessary. You should be able to use
|
pt_drv. This is no longer be necessary. You should be able to use
|
||||||
the backend out of the box.
|
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).
|
|
||||||
|
|
|
@ -4,10 +4,7 @@ Plustek-USB.txt (2005-08-08) Gerhard Jäger <gerhard@gjaeger.de>
|
||||||
NOTE:
|
NOTE:
|
||||||
-----
|
-----
|
||||||
|
|
||||||
ALL YOU NEED TO RUN YOUR USB SCANNER IS ALREADY INCLUDED. THERE'S
|
ALL YOU NEED TO RUN YOUR USB SCANNER IS ALREADY INCLUDED.
|
||||||
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
|
List of all currently implemented devices
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
|
@ -9,18 +9,10 @@ The
|
||||||
library implements a SANE (Scanner Access Now Easy) backend that
|
library implements a SANE (Scanner Access Now Easy) backend that
|
||||||
provides access to Plustek ASIC 9600[1/3] and P9800[1/3] based
|
provides access to Plustek ASIC 9600[1/3] and P9800[1/3] based
|
||||||
parallel port flatbed scanners.
|
parallel port flatbed scanners.
|
||||||
The access of the scanner is either done directly by the backend
|
|
||||||
or via kernel module, called pt_drv which can be created out of
|
|
||||||
the
|
|
||||||
.B sane\-plustek_pp
|
|
||||||
backend code \- see also section
|
|
||||||
.B "BUILDING THE KERNEL MODULE"
|
|
||||||
for further information.
|
|
||||||
|
|
||||||
.SH "SUPPORTED DEVICES"
|
.SH "SUPPORTED DEVICES"
|
||||||
|
|
||||||
At present, the following scanners should work with this backend
|
At present, the following scanners should work with this backend:
|
||||||
and/or the kernel module:
|
|
||||||
.PP
|
.PP
|
||||||
.B "PLUSTEK SCANNERS"
|
.B "PLUSTEK SCANNERS"
|
||||||
.PP
|
.PP
|
||||||
|
@ -112,18 +104,14 @@ BrightScan OpticPro OpticPro P12
|
||||||
.ft R
|
.ft R
|
||||||
|
|
||||||
.SH "DEVICE NAMES"
|
.SH "DEVICE NAMES"
|
||||||
This backend works in two modes, the so called "direct-mode"
|
This backend's default device is:
|
||||||
and the "kernel-mode". In direct-mode, the user-space backend is
|
|
||||||
used, in kernel-mode, you should have a kernel-module named pt_drv
|
|
||||||
loaded.
|
|
||||||
This backends default device is:
|
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.I 0x378
|
.I 0x378
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
This "default device" will be used, if no configuration
|
This "default device" will be used if no configuration
|
||||||
file can be found. It is rather the base address of the parallel port
|
file can be found. It is the base address of the parallel port
|
||||||
on i386 machines.
|
on i386 machines.
|
||||||
.PP
|
.PP
|
||||||
As the backend supports up to four devices, it is possible to
|
As the backend supports up to four devices, it is possible to
|
||||||
|
@ -150,24 +138,13 @@ For a proper setup, you will need at least two entries:
|
||||||
.I device 0x378
|
.I device 0x378
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
or
|
|
||||||
.RS
|
|
||||||
.I [kernel]
|
|
||||||
.br
|
|
||||||
.I device /dev/pt_drv
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
.I direct
|
.I direct
|
||||||
tells the backend, that the following devicename (here
|
tells the backend, that the following devicename (here
|
||||||
.IR 0x378 )
|
.IR 0x378 )
|
||||||
has to be interpreted as parallel port scanner device. In
|
has to be interpreted as parallel port scanner device. In
|
||||||
fact it is the address to use, alternatively you can use
|
fact it is the address to use. Alternatively you can use
|
||||||
.I /dev/parport0
|
.I /dev/parport0
|
||||||
if the backend has been compiled with libieee1284 support.
|
if the backend has been compiled with libieee1284 support.
|
||||||
.I kernel
|
|
||||||
should only be used, when a kernel-module has been built
|
|
||||||
out of the backend sources. See below for more instructions
|
|
||||||
about this.
|
|
||||||
.PP
|
.PP
|
||||||
Further options:
|
Further options:
|
||||||
.PP
|
.PP
|
||||||
|
@ -235,157 +212,6 @@ See the
|
||||||
file for examples.
|
file for examples.
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH "BUILDING THE KERNEL MODULE"
|
|
||||||
As mentioned before, the
|
|
||||||
.B sane\-plustek_pp
|
|
||||||
backend code can also be compiled and installed as linux kernel module. To do so,
|
|
||||||
you will need the source-files of this sane\-backend installation.
|
|
||||||
Unpack this tar-ball and go to the directory:
|
|
||||||
.IR sane\-backends/doc/plustek .
|
|
||||||
Within this directory, you should find a script called:
|
|
||||||
.IR MakeModule.sh .
|
|
||||||
Now if your Linux kernelsources are installed correctly,
|
|
||||||
it should be possible to build, install and load the
|
|
||||||
module
|
|
||||||
.BR pt_drv .
|
|
||||||
.B Please note,
|
|
||||||
that the kernelsources need to be configured correctly.
|
|
||||||
Refer to your distributions
|
|
||||||
manual on how this is done. As root user, try
|
|
||||||
.PP
|
|
||||||
.I ./MakeModule.sh
|
|
||||||
.PP
|
|
||||||
the script will try and get all necessary information about your
|
|
||||||
running kernel and will lead you through the whole installation
|
|
||||||
process.
|
|
||||||
.br
|
|
||||||
.B Note: Installing and loading the can only be done as
|
|
||||||
superuser.
|
|
||||||
.PP
|
|
||||||
|
|
||||||
.SH "KERNEL MODULE SETUP"
|
|
||||||
The configuration of the kernel module is done by providing
|
|
||||||
some or more options found below to the kernel module at
|
|
||||||
load time. This can be done by invoking
|
|
||||||
.BR insmod (8)
|
|
||||||
with the appropriate parameters or appending the options to the file
|
|
||||||
.I /etc/modules.conf (kernel < 2.6.x)
|
|
||||||
or
|
|
||||||
.I /etc/modprobe.conf (kernel >= 2.6.x)
|
|
||||||
.PP
|
|
||||||
.B
|
|
||||||
The Options:
|
|
||||||
.br
|
|
||||||
lampoff=lll
|
|
||||||
.RS
|
|
||||||
The value
|
|
||||||
.I lll
|
|
||||||
tells the driver, after how many seconds to
|
|
||||||
switch-off the lamp(s). The default value is 180.
|
|
||||||
0 will disable this feature.
|
|
||||||
.br
|
|
||||||
.B HINT:
|
|
||||||
Do not use a value that is too small, because often
|
|
||||||
switching on/off the lamps will reduce their lifetime.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
port=ppp
|
|
||||||
.RS
|
|
||||||
.I ppp
|
|
||||||
specifies the port base address, where the scanner
|
|
||||||
is connected to. The default value is 0x378, which
|
|
||||||
is normally a standard.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
warmup=www
|
|
||||||
.RS
|
|
||||||
.I www
|
|
||||||
specifies the time in seconds, how long a lamp has to be on,
|
|
||||||
until the driver will start to scan. The default value is 30.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
lOffonEnd=e
|
|
||||||
.RS
|
|
||||||
.I e
|
|
||||||
specifies the behaviour when unloading the driver, 1 --> switch
|
|
||||||
lamps off, 0 --> do not change lamp status
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
slowIO=s
|
|
||||||
.RS
|
|
||||||
.I s
|
|
||||||
specifies which I/O functions the driver should use, 1 --> use
|
|
||||||
delayed functions, 0 --> use the non-delayed ones
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
forceMode=fm
|
|
||||||
.RS
|
|
||||||
.I fm
|
|
||||||
specifies port mode which should be used, 0 --> autodetection,
|
|
||||||
1 --> use SPP mode and 2 --> use EPP mode
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
mov=m
|
|
||||||
.RS
|
|
||||||
.TP
|
|
||||||
.IR m " = 0"
|
|
||||||
default: no override
|
|
||||||
.TP
|
|
||||||
.IR m " = 1"
|
|
||||||
OpticPro 9630PL override (works if OP9630
|
|
||||||
has been detected) forces legal size (14")
|
|
||||||
.TP
|
|
||||||
.IR m " = 2"
|
|
||||||
Primax 4800Direct override (works if OP600
|
|
||||||
has been detected) swaps red/green color
|
|
||||||
.TP
|
|
||||||
.IR m " = 3"
|
|
||||||
OpticPro 9636 override (works if OP9636 has
|
|
||||||
been detected) disables backends
|
|
||||||
transparency/negative capabilities
|
|
||||||
.TP
|
|
||||||
.IR m " = 4"
|
|
||||||
OpticPro 9636P override (works if OP9636 has
|
|
||||||
been detected) disables backends
|
|
||||||
transparency/negative capabilities
|
|
||||||
.TP
|
|
||||||
.IR m " = 5"
|
|
||||||
OpticPro A3I override (works if OP12000 has
|
|
||||||
been detected) enables A3 scanning
|
|
||||||
.TP
|
|
||||||
.IR m " = 6"
|
|
||||||
OpticPro 4800P override (works if OP600
|
|
||||||
has been detected) swaps red/green color
|
|
||||||
.TP
|
|
||||||
.IR m " = 7"
|
|
||||||
Primax 4800Direct 30bit override (works if
|
|
||||||
OP4830 has been detected)
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Sample entry for file
|
|
||||||
.IR /etc/modules.conf :
|
|
||||||
.PP
|
|
||||||
.RS
|
|
||||||
alias char\-major\-40 pt_drv
|
|
||||||
.br
|
|
||||||
pre-install pt_drv modprobe -k parport
|
|
||||||
.br
|
|
||||||
options pt_drv lampoff=180 warmup=15 port=0x378 lOffonEnd=0 mov=0 slowIO=0 forceMode=0
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
For multidevice support, simply add values separated by commas to
|
|
||||||
the different options
|
|
||||||
.PP
|
|
||||||
.RS
|
|
||||||
options pt_drv port=0x378,0x278 mov=0,4 slowIO=0,1 forceMode=0,1
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Remember to call
|
|
||||||
.BR depmod (8)
|
|
||||||
after changing
|
|
||||||
.IR /etc/conf.modules .
|
|
||||||
.PP
|
|
||||||
|
|
||||||
.SH "PARALLEL PORT MODES"
|
.SH "PARALLEL PORT MODES"
|
||||||
.PP
|
.PP
|
||||||
The current driver works best, when the parallel port
|
The current driver works best, when the parallel port
|
||||||
|
@ -423,13 +249,6 @@ The static library implementing this backend.
|
||||||
.I @LIBDIR@/libsane\-plustek_pp.so
|
.I @LIBDIR@/libsane\-plustek_pp.so
|
||||||
The shared library implementing this backend (present on systems that
|
The shared library implementing this backend (present on systems that
|
||||||
support dynamic loading).
|
support dynamic loading).
|
||||||
.TP
|
|
||||||
.I /lib/modules/<Kernel-Version>/kernel/drivers/parport/pt_drv.o
|
|
||||||
The Linux kernelmodule for kernels < 2.6.x.
|
|
||||||
.TP
|
|
||||||
.I /lib/modules/<Kernel-Version>/kernel/drivers/parport/pt_drv.ko
|
|
||||||
The Linux kernelmodule for kernels >= 2.6.x.
|
|
||||||
.PP
|
|
||||||
|
|
||||||
.SH ENVIRONMENT
|
.SH ENVIRONMENT
|
||||||
.TP
|
.TP
|
||||||
|
|
Ładowanie…
Reference in New Issue