[sane-devel] Epson 1650 Photo problems, Epson-KAWA is no SANE frontend
Thomas Wenrich
wet at chello.at
Sun Mar 17 19:28:03 GMT 2002
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
-------------- next part --------------
Index: epson.c
===================================================================
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.
*
*/
-
static SANE_Status reset ( Epson_Scanner * s) {
SANE_Status status;
u_char param[2];
if( ! s->hw->cmd->initialize_scanner)
return SANE_STATUS_GOOD;
param[0] = ESC;
param[1] = s->hw->cmd->initialize_scanner;
send (s, param, 2, &status);
status = expect_ack( s);
return status;
}
-
-
/*
* 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 = 0;
if( ! s->hw->cmd->initialize_scanner)
return SANE_STATUS_GOOD;
+ need_open = s->fd < 0;
+
+ if (need_open) {
+ DBG(5, "reset calling open_scanner\n");
+ if ((status = open_scanner(s)) != SANE_STATUS_GOOD)
+ return status;
+ }
+
param[0] = ESC;
param[1] = s->hw->cmd->initialize_scanner;
send (s, param, 2, &status);
status = expect_ack( s);
+
+ if (need_open) {
+ close_scanner(s);
+ s->fd = -1;
+ }
return status;
}
/*
* close_scanner()
*
More information about the sane-devel
mailing list