[sane-devel] HP Scanjet 2400 support for genesys backend

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 18 Apr 2004 16:50:07 +0200


On Sat, Apr 17, 2004 at 12:52:57PM +0200, Julien TIERNY wrote:
> 	Henning : sorry for my two weeks of silence but I had to work for my studies. 
> You will find attached a basic patch for hp2400 scanjet's support in genesys 
> backend.
> 	Except adding IDs of the scanner in the 'genesys_usb_device_list' array and 
> adding a specific 'Genesys_Model' data structure, I don't know what to do.

Thanks. I have added the code to CVS.

> 	I compiled the sane distribution (1.0.13) patched with the genesys backend 
> and here are various outputs:


> # scanimage genesys:libusb:005:002
> scanimage: no SANE devices found

Just "scanimage -L" should show the scanner. If it doesn't, either
"genesys" is not in dll.conf, the genesys backend wasn't compiled at
all or something is wrong with you code :-)

Does "SANE_DEBUG_GENESYS=255 scanimage -L" show some genesys debug

I'll add a README that explains how to build the genesys backend to
the CVS repository.

> # xscanimage genesys:libusb:005:002
> xscanimage: relocation error: /usr/lib/sane/libsane-genesys.so.1: undefined 
> symbol: sanei_usb_init
> "

The genesys backend wasn't linked to sanei_usb. See README.

> 	- Could someone explain me why the 'chip' field doesn't appear in 
> sane-find-scanner's output ?

The GL646 chips used by HP are slightly different. They are only
detected by current development versions of sane-backends.

> 	- Why the scanimage frontend can't find the device while sane-find-scanner 
> could ?

See above. I'm a bit surprised why scanimage doesn't show the
relocation error like xscanimage.

> 	- What's the deal with /usr/lib/sane/libsane-genesys.so.1's symbols ? Would I 
> have too agressive CFLAGS ?

No. Fix backend/Makefile.in.

I'll attach the README.



This is the SANE genesys backend. It's intended to support scanners which use
the Genesys Logic GL646 or GL841 chips. A list of such scanners can be found
on the genesys backend homepage: 

This backend does not work yet. While there is some code for the GL646, actual
scanning is not supported yet. The backend moves home the scan head, does some 
tests, turns on the lamp and tries to calibrate the device. That calibration
fails, however.

There is no support for the GL841 yet.

Also most hardware settings (resolution etc.) aren't taken from the model 
struct yet.

How to use the backend

This directory contains only the backend code itsself. You'll also need the
complete sane-backends source code. Get that code, e.g. from one of the
development snapshots. Unpack it.

Copy the files from genesys/ directory into the backend/ directory of
sane-backends. Add "genesys" to backend/dll.conf. Add "genesys" to configure.in
(BACKENDS variable). Run autoconf.

Add the following two lines to "backend/Makefile.in" after the comment 
"# We must not buold SANE backend libraries ...":

libsane-genesys.la: ../sanei/sanei_constrain_value.lo
libsane-genesys.la: ../sanei/sanei_usb.lo

Run "./configure", "make", and "make install" as usual.

Use "export SANE_DEBUG_GENESYS=255" to enable debugging.

Add code until the backend works :-)

Henning Meier-Geinitz <henning@meier-geinitz.de>