[sane-devel] Genesys HP scanjet 2400

Gerald Murray gmurray at cloudnet.com
Fri Dec 2 01:48:18 UTC 2005


Hello all,

Scanner: hp scanjet 2400
using sane-backends-cvs20051124

Expected completion date: unknown, it is ready when it is ready

Update from previous post:
key: - previously reported; + update :

- Head moves two times the expected distance.
- Excessive time in genesys_warmup_lamp()
+ excessive time appears to be a result of an incorrect formula.
  (the source was patched to force SANE_STATUS_GOOD, thereby ignoring
  the frontend setup, and attempting to be sure that head movements were
  OK.  I am to look into the frontend setup later)
- There was no image in the STDOUT output (file size 1523712)
- Status register for lamp reports OFF, but lamp remains ON.
- Head remains where the scan stopped.
+ This is a FEATURE, not a bug.  The scan process depends on every detail
  being expected and correct.  When a status other than SANE_STATUS_GOOD
  is encountered, all processing stops whereever it was.  This is good,
  because it assures that there can be no damage to the scanner as a
  result of an unexpected reply from the device.  The cause of the
  problem was a result SANE_IO_ERROR, reported at the end
  of the scan (miscalculation of bytes expected/received)
- In lineart mode, depth:1 was what I expected.  depth:8 was reported.

NEW:
+ The device responds inconsistently to the same scan request.
  When the same request is executed sequentially many times, on the
  odd-numbered attempts, the scan completes, and goes to end of task.
  On even-numbered attempts, the scan head never moves off of the home
  position.  (reading bulk data: Error during device I/O)
  The error comes from not properly setting up the frontend during
  the lamp warmup.
  NOTE: to duplicate this problem, install from cvs referenced above.
  The source code is patched (see below) to force SANE_STATUS_GOOD
  in function genesys_warmup_lamp().
  Use scanimage from SOURCE_TOP_DIR/frontend/scanimage.
  Execute the bash command as shown below, substituting your
  {BUS}/{DEVNUM} as shown in /proc/bus/usb/devices file for your scanner.
  REMEMBER to keep the image size small until the size of the image
  is corrected.

#!/bin/sh
scanimage -d genesys:libusb:{BUS}:{DEVNUM} --resolution 150 --mode color -t 1 -l
80 -x100 -y 30 2>scan.log 1>image.pnm
#end
PATCH (DO NOT APPLY) This patch was how SANE_STATUS_GOOD was forced
  from genesys_warmup_lamp().  The frontend is not setup right, so
  the image is not correct, but it demonstrates motor handling of
  the scan head and the inconsistent response from the device.

--- sane-backend-20051124/backend/genesys.c     2005-12-02 00:25:55.000000000
-0600 
+++ sane-backend-hack/backend/genesys.c 2005-12-02 00:24:45.000000000 -0600
@@ -3419,6 +3419,12 @@
       DBG (DBG_error,
           "genesys_warmup_lamp: warmup timed out after %d seconds. Lamp
defective?\n",
           seconds); 
+      if (seconds > 40) {      /* FIXME GPM: remove 6 lines here */
+        DBG(DBG_info, 
+           "genesys_warmup_lamp: ** ENOUGH (FIXME) **\n");
+        status = SANE_STATUS_GOOD;
+        goto FIXME_hack_trick;
+      }         
       status = SANE_STATUS_IO_ERROR;
     }
   else
@@ -3427,6 +3433,7 @@
           "genesys_warmup_lamp: warmup succeeded after %d seconds\n",
           seconds);
     }
+FIXME_hack_trick:      /* FIXME remove this GPM */
   free (first_line);
   free (second_line);
   return status;
---- end-of-patch

best regards,
Gerald


-- 





More information about the sane-devel mailing list