[sane-devel] Epson 1650 Photo problems, Epson-KAWA is no SANE frontend

Thomas Wenrich wet@chello.at
17 Mar 2002 20:28:03 +0100


--=-khV39RcL4JVwkvuD8pK/
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi there,

After some hours trying the new Epson-KAWA frontend I think this should
NOT be called a 'SANE frontend'; it comes with it's own backend called
'epson' which looks incompatible to the epson backend currently in
SANE(CVS).

First, I installed SANE from sources below /usr/local and the Kawa thing
from the RPM, giving me 'can't send command to scanner' messages due to
a) a Bug in the SANE epson.c (Patch enclosed)
b) different option names used in epson-KAWA and epson-SANE (e.g. "User
Defined (Gamma 1.8)" [Kawa] vs. "User Defined" [Sane] for one of the
Gamma correction options).

BTW, there is a misleading comment in sanei/sanei_constrain_value.c: the
code for STRING_LIST doesn't work like the comment describes (it will
match ALWAYS exact strings, so making the ugly copy of the list value
back to the parameter useless).

After discovering my install problem (iscan+backend in /usr, SANE in
/usr/local) I installed iscan+backend also in /usr/local. Now iscan
works, but I can't get xsane to display previews.

I think it would be useful to state on the SANE pages that iscan
requires its own [incompatible] backend. 
Will there be a merge between Kawa and sane-epson ?

Regards,

Thomas
Ref: http://www.epkowa.co.jp/english/index_e.html
-- 
Bergbilder: http://www.timeware.at/wet

--=-khV39RcL4JVwkvuD8pK/
Content-Disposition: inline; filename=epson.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1

Index: epson.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/external/sane/sane-backends/backend/epson.c,v
retrieving revision 1.26
diff -c -r1.26 epson.c
*** epson.c	2002/01/19 14:07:25	1.26
--- epson.c	2002/03/17 18:30:27
***************
*** 1401,1423 ****
   * Send the "initialize scanner" command to the device and reset it.
   *
   */
-=20
  static SANE_Status reset ( Epson_Scanner * s) {
  	SANE_Status status;
  	u_char param[2];
 =20
  	if( ! s->hw->cmd->initialize_scanner)
  		return SANE_STATUS_GOOD;
 =20
  	param[0] =3D ESC;
  	param[1] =3D s->hw->cmd->initialize_scanner;
 =20
  	send (s, param, 2, &status);
  	status =3D expect_ack( s);
  	return status;
  }
-=20
-=20
  /*
   * close_scanner()
   *
--- 1401,1434 ----
   * Send the "initialize scanner" command to the device and reset it.
   *
   */
  static SANE_Status reset ( Epson_Scanner * s) {
  	SANE_Status status;
  	u_char param[2];
+         int need_open =3D 0;
 =20
  	if( ! s->hw->cmd->initialize_scanner)
  		return SANE_STATUS_GOOD;
 =20
+ 	need_open =3D s->fd < 0;
+=20
+ 	if (need_open) {
+ 	    DBG(5, "reset calling open_scanner\n");
+ 	    if ((status =3D open_scanner(s)) !=3D SANE_STATUS_GOOD)
+ 		return status;
+ 	    }
+=20
  	param[0] =3D ESC;
  	param[1] =3D s->hw->cmd->initialize_scanner;
 =20
  	send (s, param, 2, &status);
  	status =3D expect_ack( s);
+=20
+ 	if (need_open) {
+ 	    close_scanner(s);
+ 	    s->fd =3D -1;
+ 	    }
  	return status;
  }
  /*
   * close_scanner()
   *

--=-khV39RcL4JVwkvuD8pK/--