[sane-devel] Re: SANE & LS50ED

Johannes Berg johannes@sipsolutions.net
Wed, 15 Dec 2004 11:38:57 +0100


This is a multi-part message in MIME format.
--------------070209090002000602030408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ariel Garcia schrieb:

> great, then send me the code, i will test it asap to see how far is 
> goes with that


So I've been looking through the code and the specs and couldn't really 
find anything that differs between the LS50ED specs and the current 
coolscan2 code. Here's a trivial patch to enable the detection of the 
LS50 and LS5000, maybe this is all that is required to get these devices 
to work for a start. You may need to adjust usb IDs too, not sure.

johannes

--------------070209090002000602030408
Content-Type: text/plain;
 name="ls50.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ls50.patch"

--- coolscan2.c.orig	2004-12-15 00:28:00.439585600 +0100
+++ coolscan2.c	2004-12-15 00:47:25.174392000 +0100
@@ -114,8 +114,10 @@
   CS2_TYPE_UNKOWN,
   CS2_TYPE_LS30,
   CS2_TYPE_LS40,
+  CS2_TYPE_LS50,
   CS2_TYPE_LS2000,
   CS2_TYPE_LS4000,
+  CS2_TYPE_LS5000,
   CS2_TYPE_LS8000
 }
 cs2_type_t;
@@ -1769,10 +1771,14 @@
     s->type = CS2_TYPE_LS30;
   else if (!strncmp (s->product_string, "LS-40 ED        ", 16))
     s->type = CS2_TYPE_LS40;
+  else if (!strncmp (s->product_string, "LS-50 ED        ", 16))
+    s->type = CS2_TYPE_LS50;
   else if (!strncmp (s->product_string, "LS-2000         ", 16))
     s->type = CS2_TYPE_LS2000;
   else if (!strncmp (s->product_string, "LS-4000 ED      ", 16))
     s->type = CS2_TYPE_LS4000;
+  else if (!strncmp (s->product_string, "LS-5000 ED      ", 16))
+    s->type = CS2_TYPE_LS5000;
   else if (!strncmp (s->product_string, "LS-8000 ED      ", 16))
     s->type = CS2_TYPE_LS8000;
 
@@ -2505,7 +2511,7 @@
       cs2_parse_cmd (s, "25 01 00 00 00");
       cs2_pack_byte (s, cs2_colour_list[i_colour]);
       cs2_parse_cmd (s, "00 00 3a 00");
-      s->n_recv = 58;
+      s->n_recv = 0x3A; /* = 50 + 8 */
       status = cs2_issue_cmd (s);
       if (status)
 	return status;

--------------070209090002000602030408--