He instalado el parche para los backends del sane para el scanjet 3300C (http://sourceforge.net/projects/hp3300) siguiendo las instrucciones que vienen en el readme (os lo adjunto). El parche no ha dado problemas, salvo que el make de los backends no encontraba el archivo hp3300c_linux.c, pero lo copie de los archivos que dan junta al parche a la carpeta backends y al siguiente make se lo trago sin problemas. Despues configure el sane siguiendo las instrucciones de http://www.frikis.org/staticpages/index.php?page=escaners. Lo he hecho todo igual solo que el sane lo tengo instalado en /usr/local/etc/sane.d. Como direccion en saned.conf he puesto localhost. El problema es que el xsane me dice "no device available" y miro las posibles razones en help pero no me convence ninguna. żżżżAlguna idea? He probado la testtool que viene con el parche y he conseguido escanear a la perfeccion y todo, asi que no es fallo del escaner.
Por cierto no se lo que he hecho pero no puedo poner algunos simbolos del teclado espanol, como la enie o el simbolo de interrogacion que inicia una pregunta. Como se vuelve a reconfigurar el teclado? Gracias y un saludo. -- SoTaNeZ "No hay nada peor que ser vulgar"Title: NIASH chipset based flatbed scanners - HOW-TO
NIASH chipset based flatbed scanners - HOW-TO
Table of Contents
1 - Introduction
This project's goal is to implement a SANE backend for flatbed scanners with the NIASH chipset, the following document describes and explains the procedures to undertake in order to fully install and configure a working version of the package. Although the major aim was to write a SANE backend, to ease the testing and experimenting, a test tool was also built, it shares most of the code with the SANE backend, but provides a simpler interface and (hopefully) turns the building and configuration processes, as well as error and bug tracking more easy to cope with. Since this project is in alpha stage, it is therefore recommended that users build and use this test tool before trying to build the SANE backend.
As of the date of this writing, the package makes use of two distinct ways of accessing USB scanners:
- By using the Linux kernel native support for accessing USB scanners. This method provides a better throughoutput, but requires a Linux kernel v2.4.13 or greater. Since most mainstream GNU/Linux distributions ship with kernels older than the required version, the user will probably need to compile a new kernel. (this method is from now on refered as kernel method)
- By using libUSB. This method was implemented in order to save users the trouble to (re)compile a new Linux kernel (it is also very handy to port the test tool to other systems). It requires a 2.4 series Linux kernel or a OpenBSD/FreeBSD/NetBSD kernel with ugen support. Please note that you must install LibUSB 0.1.5 (or greater) in your system to use this method. (this method is from now on refered as libusb method)
In all the examples below we will use a ficticious release whose revision number is 2, release date the 28th of January 2002, and distribution file testtool-20020128_2.tar.gz.
Please note that this tools are provided with no warranty, use them at your own risk.
1.1 - Requirements
- Hardware:
- A Hewlett Packard 3300c, 3400c, 4300c or a Agfa Snapscan Touch flatbed scanner
- A USB controller (UHCI, OHCI or EHCI) supported by the Linux kernel
- Software:
- GNU/Linux systems
- Linux kernel version 2.4.x (libusb method)
- Linux kernel version 2.4.13 or greater (kernel method)
- OpenBSD, FreeBSD and NetBSD
- Any recent kernel with ugen support (libusb method only)
- LibUSB version 0.1.5 (libusb method only)
- The GNU C Compiler (GCC)
- GNU/Linux systems
1.2 - Where to obtain the required software
2 - Preparing the system
The following itens should be checked before trying to install the package:
2.1 - Linux kernel version and capabilities
It is mandatory that you run a 2.4 series Linux kernel (at least version 2.4.13 to use the kernel method) with the following itens compiled as modules or builted in:Capability | Module | Notes |
---|---|---|
Support for USB - CONFIG_USB | usbcore.o | Required |
Preliminary USB device filesystem - CONFIG_USB_DEVICEFS | n/a | Required to use libusb method, optional otherwise |
UHCI (Intel PIIX4, VIA, ...) support - CONFIG_USB_UHCI | usb-uhci.o | Required on systems with an UHCI USB controller |
UHCI Alternate Driver (JE) support - CONFIG_USB_UHCI_ALT | uhci.o | An alternative driver for UHCI USB controllers (compile this or the previous, only one is required) |
OHCI (Compaq, iMacs, ...) support - CONFIG_USB_OHCI | usb-ohci.o | Required on systems with an OHCI USB controller |
USB Scanner support - CONFIG_USB_SCANNER | scanner.o | Required to use the kernel method, not recommended to use the libusb method |
2.2 - Previously installed software
In order to properly build SANE with the NIASH backend, you should remove any previously installed version of SANE and all related packages (thanks to Harman Nagra for pointing this out).2.3 - Device files (kernel method)
2.3.1 - With devfs
Since 2.3.46 the Linux kernel includes a dynamic device filesystem called "devfs" (device file system). With devfs, there is no need to create the device files, because they are dynamically created for you. For USB Scanners, the device is created in /dev/usb/scannerX where X can range from 0 to 15 depending on the number of scanners connected to the system. To see if you have devfs, check if the file .devfsd exists in /dev by issuing the command:bash# ls /dev/.devfsd
REGISTER ^usb/scanner0$ CFUNCTION GLOBAL symlink usb/scanner0 usbscanner0 UNREGISTER ^usb/scanner0$ CFUNCTION GLOBAL unlink usbscanner0
2.3.2 - Without devfs
If you intend to use more than one scanner at a time (up to 16 are permited), add a device for each USB scanner like this:bash# mknod /dev/usbscanner[X] c 180 [Y]
So, to add 2 USB scanners, issue the command:
bash# mknod /dev/usbscanner0 c 180 48 bash# mknod /dev/usbscanner1 c 180 49
bash# mknod /dev/usbscanner0 c 180 48 bash# ln -s /dev/usbscanner0 /dev/usbscanner
bash# chmod 666 /dev/usbscanner0
2.4 - Installing libUSB (libusb method)
Although the process of building and installing libUSB is out of the scope of this document, we warn you of the following:
- Under GNU/Linux, LibUSB requires that the preliminary USB device filesystem is mounted
in the proper place (/proc/bus/usb), to mount it do:
or add the following line to you /etc/fstab:
bash# mount -t usbdevfs usbdevfs /proc/bus/usb/
usbdevfs /proc/bus/usb usbdevfs defaults 0 0
- Before using libUSB under GNU/Linux, you must unload the scanner.o module (if it's not
compiled as module, but builted-in, libUSB will never be able to claim
the USB interface to access the scanner). To unload the scanner.o
module do the following:
bash# modprobe -r scanner
- Under OpenBSD/FreeBSD/NetBSD, LibUSB will not work correctly if your kernel is compiled with uscanner support, you must recompile your kernel and remove uscanner support.
3 - The test tool
Unpack the sources like this:
bash# cd /usr/src bash# tar xvzf /path/to/sources/testtool-20020128_2.tar.gz bash# cd testtool
3.1 - Full build
To build the package with both USB access methods just issue:
bash# make
bash# ./testtool -h
To prepare the package to patch the SANE backends, you'll need to follow either of the following sections.
3.2 - Building testtool for the libUSB method
Start by editing the Makefile. Be sure that following lines are not commented:CFLAGS += -DLIBUSB_SUPPORT
LDFLAGS += -lusb
/* #define SANEI_USB_SUPPORT */
/* #define LINUX_USB_SUPPORT */
#define LIBUSB_SUPPORT
bash# make clean && make
3.3 - Building testtool for the kernel method
Start by editing the Makefile. Be sure to comment following lines:
CFLAGS += -DLIBUSB_SUPPORT
LDFLAGS += -lusb
#CFLAGS += -DLIBUSB_SUPPORT
#LDFLAGS += -lusb
#define SANEI_USB_SUPPORT
#define LINUX_USB_SUPPORT
/* #define LIBUSB_SUPPORT */
bash# make clean && make
4 - The SANE backend
Unpack SANE backends source code to the desired directory, and use the patch-sane.sh script provided with the package (lets assume that the SANE source directory was unpacked to the parent directory of the test tool):
bash# ./patch-sane.sh ../sane-backend-x.x.x
bash# ./configure bash# make
5 - Places to look for more information
6 - Known Bugs (Caveats)
- With the HP3400c it is not possible to set the vertical starting point of the scan; it will always start at the top (no matter what you select in xsane for example).
- Calibration may not work correctly on the HP3400c
- Sometimes when some settings are wrong, the carriage will move too far to the bottom and make a quite loud clicking sound. If this happens to you, quickly remove the power plug or the USB plug, it will almost for sure crash Linux, but at least you don't damage the scanner...
- If something goes wrong, we recommend reloading the scanner module and possibly also the USB controller module (for example, 'modprobe -r scanner' 'modprobe -r uhci' 'modprobe uhci' modprobe 'scanner')
- Parallel port support is implemented (through libieee1284), but completely untested.
7 - Reporting bugs
To report bugs and make sugestions use the facilities provided in our website. To make things easier, provide us at least the following information:
- Kernel version
- Package version and revision
- USB method you're using
- LibUSB version, if any
Last modified: $Date: 2003/03/08 12:19:40 $
Copyright © 2002 Bertrik Sikken, Ricardo Martins