[sane-devel] scanning problem for HP 2400

Pierre Willenbrock pierre at pirsoft.dnsalias.org
Thu Dec 29 14:49:06 UTC 2005


Hello Parag,

Parag N(पराग़) schrieb:
> Hello,
>     On 12/29/05, Parag N(पराग़) <panemade at gmail.com> wrote:
> 
>>Hello Pierre,
>>
[...]
>>
>>  here i am attaching my windows USB log + linux debug log where after
>>modification(i already mailed to list) + new frontend structre from my
>>windows log is
>> [0x01] = 0x000
>> [0x02] = 0x031
>> [0x03] = 0x01f
>> [0x04] = 0x013
>> [0x06] = 0x008
>> [0x08] = 0x002
>> [0x09] = 0x016
>> [0x20] = 0x020
>> [0x21] = 0x080
>> [0x22] = 0x010
>> [0x24] = 0x080
>> [0x25] = 0x000
>> [0x26] = 0x000
>> [0x28] = 0x001
>> [0x29] = 0x0ff
>> [0x2a] = 0x093
>>

This is a completely different type of frontend, incompatible with
current code. You will probably need to modify gl646_set_fe(). Making it
only write the above values for your frontend should be enough.

>>   Please kindly tell me why head is not moving back as i make it to
>>scanner 1755 lines instead its default 3510 which exceeds. I then have
>>to disconnect scanner then only genesys debug message logging stops.
>>

Looks to me like there is a bug. Please try park_head.diff.

> 
>          I want to know relationship between scanning no. of lines. In
> genesys backend for HP 2400 i got no. of lines to scan are 3510. does
> that mean scanner has to scan 1755 lines from start to other end and
> then remaining 1755 from other end to start ?

The problem is, the first slope generation function is severly broken.
The second version works better. create_slope.diff will make your
scanner use the second version.

Regards,
  Pierre
-------------- next part --------------
--- genesys_gl646.c	2005-12-29 15:32:52.078821000 +0100
+++ genesys_gl646.c.patched	2005-12-29 15:30:29.209892250 +0100
@@ -1772,6 +1772,17 @@
       return status;
     }
 
+  /* sends slope table 0 (move before scan area) */
+  status = gl646_send_slope_table (dev, 0, dev->slope_table1,
+				   reg[reg_0x6b].value);
+  if (status != SANE_STATUS_GOOD)
+    {
+      DBG (DBG_error,
+	   "gl646_park_head: failed to send slope table 1: %s\n",
+	   sane_strstatus (status));
+      return status;
+    }
+
   /* sends slope table 1 (move before scan area) */
   status = gl646_send_slope_table (dev, 1, dev->slope_table1,
 				   reg[reg_0x6b].value);
-------------- next part --------------
--- genesys.c	2005-12-28 14:45:00.751717000 +0100
+++ genesys.c.patched	2005-12-29 15:41:08.445842000 +0100
@@ -914,7 +914,8 @@
 					same_speed, yres);      
 
   if (dev->model->motor_type == MOTOR_5345
-      || dev->model->motor_type == MOTOR_HP2300)
+      || dev->model->motor_type == MOTOR_HP2300
+      || dev->model->motor_type == MOTOR_HP2400)
     return genesys_create_slope_table2 (dev, slope_table, steps,
 					step_type, exposure_time,
 					same_speed, yres);


More information about the sane-devel mailing list