[sane-devel] Re: SANE & LS50ED

Ariel Garcia garcia@iwr.fzk.de
Sun, 19 Dec 2004 04:28:20 +0100


Hi,

> Apparently it does not work, sorry. As you noticed, I had cross-posted 
> to sane-devel, and Andras said he also had tried that. I'm waiting for 
> him to send me more of his recent code now.

i've being playing with the trivial "add-the-missing-ids" patch today, and i
realized that there is a hardcoded device-id in the cs2_open function, that is
why your patch was not not even reporting a connected scanner for me:
LS50 / 5000 have device ids of 0x4001 / 0x4002  while apparently all the other
usb-coolscans(only the LS40?) have 0x4000. 

@@ -1679,6 +1681,8 @@
       sanei_config_attach_matching_devices ("scsi Nikon *", cs2_attach);
       try_interface = CS2_INTERFACE_USB;
       sanei_usb_attach_matching_devices ("usb 0x04b0 0x4000", cs2_attach);
+      sanei_usb_attach_matching_devices ("usb 0x04b0 0x4001", cs2_attach);
+      sanei_usb_attach_matching_devices ("usb 0x04b0 0x4002", cs2_attach);
       return SANE_STATUS_GOOD;
     }

With this add'l patch now the scanned is detected, and if run 
   scanimage -d coolscan2:usb:libusb:001:002 --ae 
then the scanner does all the scanning noise for a while, but ends however with
a IO_ERROR:
-----------
(...)
cs2_phase_check(): Phase check returned phase = 0x01.
Error: cs2_issue_cmd(): Unexpected non-data phase, but n_data != 0.
n_data=11838
sane_read() status=9
scanimage: sane_read: Error during device I/O
-----------

The same happens if i run scanimage without options, the error cames pretty soon
in this case:
------------------------------
$ /mnt/soft/source/sane-backends-1.0.15/frontend/.libs/scanimage
[sanei_debug] Setting debug level of sanei_usb to 4.
[sanei_usb] sanei_usb_init: found libusb device (0x04b0/0x4001) interface 0  at
libusb:001:002
[sanei_usb] sanei_usb_find_devices: vendor=0x04b0, product=0x4000
[sanei_usb] sanei_usb_find_devices: vendor=0x04b0, product=0x4001
[sanei_usb] sanei_usb_open: opened usb device `libusb:001:002' (*dn=0)
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x12, n_send = 6, n_recv = 36.
[sanei_usb] sanei_usb_find_devices: vendor=0x04b0, product=0x4002
[sanei_usb] sanei_usb_open: we already have a bulk-out endpoint (address: 1),
ignoring the new one
[sanei_usb] sanei_usb_open: we already have a bulk-in endpoint (address: 130),
ignoring the new one
[sanei_usb] sanei_usb_open: opened usb device `libusb:001:002' (*dn=0)
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x12, n_send = 6, n_recv = 36.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x12, n_send = 6, n_recv = 4.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x12, n_send = 6, n_recv = 87.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x15, n_send = 18, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x2a, n_send = 30, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x2a, n_send = 32778, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x2a, n_send = 32778, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x2a, n_send = 32778, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x24, n_send = 68, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x24, n_send = 68, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x24, n_send = 68, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0xe0, n_send = 23, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0xc1, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x1b, n_send = 9, n_recv = 0.
P6
# SANE data follows
3946 5782
255
sane_read() called, maxlen = 32768.
cs2_issue_cmd(): opcode = 0x00, n_send = 6, n_recv = 0.
cs2_issue_cmd(): opcode = 0x28, n_send = 10, n_recv = 11838.
Error: cs2_issue_cmd(): Unexpected non-data phase, but n_data != 0.
sane_read() status=9
scanimage: sane_read: Error during device I/O
-------------------

Actually cs2_phase_check() returns CS2_PHASE_STATUS, but with n_data == 11838

Any suggestions for further tests/debugging info is welcome.

Cheers, Ariel


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.