HP4200 SANE backend

Welcome to the SANE backend project for the HP4200 flatbed scanner.

This backend supports the C, Cxi and Cse series, because they only differ in the software shipped from Hewlett-Packard.

Status

Finally there is a functional SANE backend for the HP4200 scanner, but it is still in alpha release. The image obtained requires some tone adjustement, and scanning speed can be improved. The backend only supports 8 bits color depth. But more features will be implemented.

To correct image tone, you can use The GIMP or any other image manipulation program, but adjusting gamma tables you can get good results. All suggestions about how to set the gamma tables and what values are best will be appreciated.

Download

You can download the backend in various forms:

You can still download old files from the HP4200 SANE backend - Downloads.

Installation

You will need a fairly new Linux kernel with USB and USB scanner support, either the 2.3.x or 2.4.x releases or the 2.2.x release with the USB backport. (Well, I have developed the backend using release 2.3.48 and above).

If you are using Linux 2.4.18 with sane 1.0.8 you will not have to modify your kernel if it's compiled with USB scanner support.

Important: If you are still using an old Linux kernel, you will need to uncomment the definition of the macro SCN_IOCTL in ``linux/drivers/usb/scanner.h'' as follows:

#define SCN_IOCTL
instead of
// #define SCN_IOCTL
This will remain until a unified access method to send and receive vendor-specific USB requests through the USB scanner driver or the USB filesystem is established.

Then read ``linux/Documentation/usb/usbscanner.txt'' and follow the instructions. By default the backend will look at the ``/dev/usbscanner'' device, but you can override this using the ``hp4200.conf'' file at the sane.d config directory.

How to apply the patches

Once you have downloaded any of the above patches and the right SANE source distribution, do the following steps:
  1. Unpack the SANE source distribution. Let's assume you want to install revision 1.0.3. Execute the following command line:
       gzip -dc sane-1.0.3.tar.gz | tar xvf -
    
    The directory `sane-1.0.3' will be created and the source files will be extracted.
  2. Change the current working directory:
       cd sane-1.0.3
    
  3. Apply the patch file. Let's assume the patch file is in the parent directory:
       gzip -dc ../sane-1.0.3-hp4200-0.2-p1.patch.gz | patch -p1 
    
  4. If you get the following text
      patching file `backend/Makefile.in'
      patching file `backend/dll.conf'
      patching file `backend/hp4200.c'
      patching file `backend/hp4200.conf'
      patching file `backend/hp4200.desc'
      patching file `backend/hp4200.h'
      patching file `backend/lm983x.c'
      patching file `backend/lm983x.h'
      patching file `backend/pv8630.c'
      patching file `backend/pv8630.h'
      patching file `tools/hp4200offd.c'
    
    all was right, and you can now start the ordinary SANE installation.

Contributing

If you want to contribute to the project I encourage you to register at SourceForge or visit the project info page. You can help testing, criticizing, or improving the software.

Scanner Chipset

There are two chips to be considered.

Technical Issues

If you want to contribute developing code, or just you are courious enought about the scanner internals, maybe you want to read this page.

Links

Adrian Perez Jorge

Last modified : 1 December 2002 (What's new)
SourceForge Logo