[sane-devel] Again: Astra Umax 2200 SU hangs after prescan/resizing when connnected via USB

Klaus Dahlke klaus.dahlke@gmx.de
Sat, 28 Aug 2004 10:03:45 +0200


Dear all,
the last days I experienced again some severe problems with Umax Astra 2200 SU link to USB. I tried to scan 4 pictures, 10x15. I did a pre-scan first, adjusted the scan area to the first picture and scanned successfully. After selecting the scan area for the second picture and scanning, the RGB data where almost completely transmitted, but it stop at about 98% and xsane hung. The only way to continue was switching off the scanner (unplugging power), then xsane converted the RGB data to jpeg correctly, close sane, switching on the scanner and starting xsane. After a couple of scans, especially after pre-scan and resizing, the whole story started again.

Kernel 2.6.14 (gentoo)
xsane-0.93
sane-backends-1.0.14 (/usr/lib/libusb-0.1.4)
libusb 0.1.8

Thanks for your help,
Klaus


Output from SANE_DEBUB_UMAX=255:
[umax] umax_queue_read_image_data_req: id for buffer[0] is 0x835d698
[umax] umax_reader_process: read image data queued for buffer[0] 
[umax] umax_wait_queued_image_data for buffer[0] (id=0x835d698)
[umax] umax_reader_process: buffer of 30693 bytes read; 80274 bytes to go
[umax] umax_queue_read_image_data_req for buffer[0], length = 30693
[umax] Sending SCSI cmd 0x28 cdb len 10, param len 0, result len 30693
[umax] sane_read: read 32768 bytes
[umax] sane_read: read -1 bytes
[umax] sane_read: EAGAIN
[umax]   SCSI cmd returned 30693 bytes
[umax]   SCSI command successfully executed
[umax] umax_queue_read_image_data_req: id for buffer[0] is 0x835d698
[umax] umax_reader_process: read image data queued for buffer[0] 
[umax] umax_wait_queued_image_data for buffer[0] (id=0x835d698)
[umax] umax_reader_process: buffer of 30693 bytes read; 49581 bytes to go
[umax] umax_queue_read_image_data_req for buffer[0], length = 30693
[umax] Sending SCSI cmd 0x28 cdb len 10, param len 0, result len 30693
[umax] sane_read: read 28672 bytes
[umax] sane_read: read -1 bytes
[umax] sane_read: EAGAIN
[umax]   SCSI cmd returned 30693 bytes
[umax]   SCSI command successfully executed
[umax] umax_queue_read_image_data_req: id for buffer[0] is 0x835d698
[umax] umax_reader_process: read image data queued for buffer[0] 
[umax] umax_wait_queued_image_data for buffer[0] (id=0x835d698)
[umax] umax_reader_process: buffer of 30693 bytes read; 18888 bytes to go
[umax] umax_queue_read_image_data_req for buffer[0], length = 18888
[umax] Sending SCSI cmd 0x28 cdb len 10, param len 0, result len 18888
[umax] sane_read: read 32768 bytes
[umax] sane_read: read -1 bytes
[umax] sane_read: EAGAIN
[umax] error in sanei_pv8630_bulkread (got 02)
[umax] umax_queue_read_image_data_req: command returned status Error during devi
ce I/O
[umax] ERROR: umax_reader_process: unable to queue read image data request!
[umax] reader_process: finished reading data
[umax] sane_read: read 1720 bytes
[umax] sane_read: read 0 bytes
[umax] do_cancel
[umax] killing reader_process
[umax] do_cancel: reader_process terminated with status: Unknown SANE status cod
e 255
[umax] trying to release scanner ...
[umax] Sending SCSI cmd 0x17 cdb len 6, param len 0, result len 0
[umax] error in sanei_pv8630_bulkread (got a5)
[umax] umax_give_scanner: command returned status Error during device I/O
[umax] trying to reposition scanner ...
[umax] Sending SCSI cmd 0x31 cdb len 10, param len 0, result len 0

Xssane hangs, RGB data not completely transmitted
Now switching off the scanner brings xsane back to life: the image is saved correctly

[umax] error in sanei_pv8630_bulkread (got a5)
[umax] umax_reposition_scanner: command returned status Error during device I/O
[umax] closing scannerdevice filedescriptor
[umax] closing read end of pipe
[umax] sane_get_option_descriptor 3
[umax] sane_get_option_descriptor 3
[umax] get source [#3]
[umax] sane_cancel
[umax] sane_get_option_descriptor 9
[umax] sane_get_option_descriptor 9
[umax] get tl-x [#9]
[umax] sane_get_option_descriptor 10
[umax] sane_get_option_descriptor 10
[umax] get tl-y [#10]
[umax] sane_get_option_descriptor 11
[umax] sane_get_option_descriptor 11
[umax] get br-x [#11]
[umax] sane_get_option_descriptor 12
[umax] sane_get_option_descriptor 12
[umax] get br-y [#12]
[umax] sane_get_option_descriptor 9
[umax] sane_get_option_descriptor 10
[umax] sane_get_option_descriptor 11
[umax] sane_get_option_descriptor 12
[umax] sane_get_option_descriptor 9
[umax] sane_get_option_descriptor 9
[umax] get tl-x [#9]
[umax] sane_get_option_descriptor 10
[umax] sane_get_option_descriptor 10
[umax] get tl-y [#10]
[umax] sane_get_option_descriptor 11
[umax] sane_get_option_descriptor 11
[umax] get br-x [#11]
[umax] sane_get_option_descriptor 12
[umax] sane_get_option_descriptor 12
[umax] get br-y [#12]
[umax] sane_get_parameters


Next try, same problem, last few lines output from DEBUG_SANEI_USB:


[sanei_usb] sanei_usb_control_msg: rtype = 0xc0, req = 0, value = 0, index = 4, len = 1
[sanei_usb] 0000: D0                                              ................
[sanei_usb] sanei_usb_control_msg: rtype = 0xc0, req = 0, value = 0, index = 4, len = 1
[sanei_usb] 0000: D0                                              ................
[sanei_usb] sanei_usb_control_msg: rtype = 0xc0, req = 0, value = 0, index = 4, len = 1
[sanei_usb] 0000: D8

NOW Switcging off the scanner:

USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 0, index = 0, len = 0
USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 2, value = 1, index = 0, len = 0
USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending control message: Protocol error
[sanei_usb] sanei_usb_read_bulk: trying to read 1 bytes
[sanei_usb] sanei_usb_read_bulk: attempt read libusb 1 bytes ep=0x82 timeout=30000
USB error: error reading from bulk endpoint 0x82: Invalid or incomplete multibyte or wide character
[sanei_usb] sanei_usb_read_bulk: result -84
[sanei_usb] sanei_usb_read_bulk: read failed: Invalid or incomplete multibyte or wide character
USB error: could not clear/halt ep 130: Protocol error
[umax] error in sanei_pv8630_bulkread (got a5)
[umax] umax_give_scanner: command returned status Error during device I/O
[umax] trying to reposition scanner ...
[umax] Sending SCSI cmd 0x31 cdb len 10, param len 0, result len 0
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 1, value = 12, index = 2, len = 0
USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: rtype = 0xc0, req = 0, value = 0, index = 4, len = 1
USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 1, value = 4, index = 2, len = 0
USB error: error sending control message: Protocol error
[sanei_usb] sanei_usb_control_msg: libusb complained: error