Fw: [sane-devel] Nikon LS-1000 breaks on 0.92 and later???

Gerhard Jaeger gerhard@gjaeger.de
Sun, 16 Jan 2005 10:58:55 +0100


Hi Bob,

On Friday 14 January 2005 23:10, you wrote:
> Hello Gerhard,
>
> I posted the attached error for the Nikon coolscan on the newsgroup last
> week but had no reply - and then I saw your name in the changelog. Can you
> give me any pointers as to what may have changed between 1.0.11 and 1.0.14
> that might be causing these problems?
>
>
> Thanks
>
>
> Bob
>
> Begin forwarded message:
>
> Date: Sat, 8 Jan 2005 18:39:08 +1000
> From: Bob Hepple <bhepple@freeshell.org>
> To: sane-devel@lists.alioth.debian.org
> Subject: [sane-devel] Nikon LS-1000 breaks on 0.92 and later???
>
>
> G'day from sunny Brisbane ....
>
> I recently upgraded to xsane 0.95 (from 0.91) and and sane-backends-1.0.14
> (from 1.0.11) and since then I can't use my Nikon LS-1000 scsi scanner
> with xsane - and I can't get back to versions 0.91 / 1.0.11!!!!
>
> The problem is that after the scanner selection dialog I get a popup
> window saying "Error obtaining option count".
>
> Any ideas? Here's what I know:
>
> The other scsi scanner (Umax Astra 610S) continues to work fine with all
> versions of xsane.
>
> I deleted the ~/.sane/xsane/xsane.rc file as instructed.
>
> 'scanimage' on the Nikon LS-1000 works fine.
>
> I tried 0.96-rc1 (gentoo release candidate 1) and 0.93 and
> sane-backends-1.0.14 and 1.0.15 and I get the same problem.
>
> When I run with SANE_DEBUG_COOLSCAN=128 I get:
>
> [sanei_debug] Setting debug level of coolscan to 128.
> [coolscan] sane_init
> [coolscan] attach_scanner: /dev/sg2
> [coolscan] attach_scanner: opening /dev/sg2
> [coolscan] identify_scanner
> [coolscan] do_inquiry
> [coolscan]
> [coolscan] 000: 12 00 00 00 24 00
> [coolscan] sanei_scsi_cmd: returning 36 bytes:
> [coolscan]
> [coolscan] 000: 06 00 02 02 1f 00 00 00 4e 69 6b 6f 6e 20 20 20
> [coolscan] 016: 4c 53 2d 31 30 30 30 20 20 20 20 20 20 20 20 20
> [coolscan] 032: 31 2e 30 36
> [coolscan] get_inquiry_values
> [coolscan] Found Nikon scanner LS-1000 version 1.06 on device /dev/sg2
> [coolscan] initialize_values
> [coolscan]
> [coolscan] 000: 15 10 00 00 14 00 00 00 00 08 00 00 00 00 00 00
> [coolscan] 016: 00 01 03 06 00 00 0a 8c 00 00
> [coolscan] sanei_scsi_cmd: returning 0 bytes:
> [coolscan] Mode Sense...
> [coolscan]
> [coolscan] 000: 1a 18 03 00 0c 00
> [coolscan] sanei_scsi_cmd: returning 12 bytes:
> [coolscan]
> [coolscan] 000: 0b 00 00 00 03 06 00 00 0a 8c 00 00
> [coolscan]      Mode Sensed (MUD is 2700)
> [coolscan] get_internal_info
> [coolscan] get_internal_info
> [coolscan] wait_scanner: Testing if scanner is ready
> [coolscan]
> [coolscan] 000: 00 00 00 00 00 00
> [coolscan] sanei_scsi_cmd: returning 0 bytes:
> [coolscan] wait_scanner: scanner is ready
> [coolscan]
> [coolscan] 000: 28 00 e0 00 00 00 00 01 00 00
> [coolscan] sanei_scsi_cmd: returning 256 bytes:
> [coolscan]
> [coolscan] 000: 0c 08 0a 8c 04 7f 06 bf 0a 1f 0f 2f 00 00 00 00
> [coolscan] 016: 00 00 00 64 09 00 00 00 00 00 00 00 00 00 00 00
> [coolscan] 032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [coolscan] 048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [coolscan] 064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [coolscan] 080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [coolscan]      adbits=12       outputbits=8    maxres=2700     xmax=1151  
>    ymax=1727 xmaxpix=2591    ymaxpix=3887    ycurrent=0     
> currentfocus=100 autofeeder=No   analoggamma=No  currentscanpitch=9
>         White balance exposure time var [RGB]=  2781 2216 2895
>         Prescan result exposure time var [RGB]= 3939 8072 3939
>         Current exposure time var.[RGB]=        3939 8072 10546
>         Internal exposure time unit[RGB]=       2 4 2
>         offsetdata_[rgb]=       0x8d 0x8d 0x8e
>         limitcondition=0x7c
>         device error code = 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
>         power-on errors = 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
> [coolscan] backend runs on little endian machine
> [coolscan] attach: dev->dpi_range.max = 2700.000000
> [coolscan] attach_scanner done
> [coolscan] attach_scanner: /dev/scanner
> [coolscan] attach_scanner: opening /dev/scanner
> [coolscan] attach_scanner: open failed
> [coolscan] sane_get_devices
>
>  ... at this point the device dialog appears and I click on the Nikon, and
> then:
>
> [coolscan] sane_open
> [coolscan] init_options
> [coolscan] sane_get_option_descriptor 0
>
>  ... at this point the "Error obtaining option count" dialog box appears
> and I click "OK", and then:
>
> [coolscan] sane_close
> [coolscan] do_cancel
> [coolscan] do_eof
> [coolscan] do_cancel: kill reader_process
> [coolscan] sane_exit
>
> I took a look in the source (xsane.c) and traced it to this line:
>
>   if (xsane_control_option(xsane.dev, 0, SANE_ACTION_GET_VALUE,
> &xsane.num_elements, 0) != SANE_STATUS_GOOD) {
>     xsane_back_gtk_error(ERR_OPTION_COUNT, TRUE);
>     sane_close(xsane.dev);
>     xsane_exit();
>     /* will never come to here */
>   }
>
> ... but I guess it's in the back-end somewhere.
>
> That's as far as I got .... help!!!!

I'll post it back to the list. I've checked the diffs between 1.0.11 and
1.0.14 and I can't figure out where this "option" problem is located.
I'm pretty sure, that the changes are not responsible for that. As you also
stated, scanimage does work and so I suspect some trouble with xsane.
Also the point, that the following appears is somewhat suspicous:
> [coolscan] attach_scanner: open failed

But as I do not have such a scanner, I'm somewhat at a loss. 
Sorry,
Gerhard