[sane-devel] coolscan2 in infrared mode

Alessandro Zummo azummo-lists at towertech.it
Fri Dec 8 22:37:06 CET 2006



 Reading the docs, it seems this should be enough to obtain
 the infrared channel from my LS-2000:

SANE_DEBUG_COOLSCAN2=200 scanimage --format=tiff --batch-count=2 --infrared=yes --resolution=300

 however, what I've got so far is:

[...] 
Scanned page 1. (scanner status = 5)
Scanning page 2
[coolscan2] sane_start() called.
scanimage: sane_start: Invalid argument
[coolscan2] sane_cancel() called while scanning.
[coolscan2] cs2_issue_cmd(): opcode = 0xc0, n_send = 6, n_recv = 0.
[coolscan2] sane_close() called.
[coolscan2] sane_exit() called.

 I think this is because s->scanning is never set to
 false and thus sane_start fails.

 this patch seems to fix it:

diff -u -r1.10 coolscan2.c
--- coolscan2.c 11 Jun 2006 21:35:19 -0000      1.10
+++ coolscan2.c 8 Dec 2006 21:35:55 -0000
@@ -1482,6 +1482,7 @@
       if (xfer_len_out == 0)   /* no more data */
        {
          *len = 0;
+       s->scanning = SANE_FALSE;
          return SANE_STATUS_EOF;
        }

@@ -1533,6 +1534,7 @@
   if (xfer_len_line == 0)      /* no more data */
     {
       *len = 0;
+       s->scanning = SANE_FALSE;
       return SANE_STATUS_EOF;
     }


-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Turin, Italy

  http://www.towertech.it




More information about the sane-devel mailing list