[sane-devel] Adding Minolta Scan Dual III support

Gary Wong gtw at cs.bu.edu
Tue Nov 25 15:45:19 GMT 2003


Hi,

I recently bought a Minolta Dimage Scan Dual III film scanner, and am
attempting to extend the avision backend to support it.  I've made a
bit of progress so far, but still have quite a lot to figure out.

The scanner seems to be another SCSI-over-USB model, but it doesn't
appear to use quite the same encapsulation as the others supported by
the avision backend.  The main changes that appear to be necessary
(besides adding the vendor and product IDs to Avision_Device_List[])
are that 6-byte commands need to be padded with zeroes to 10 bytes (in
avision_cmd()), and the 1-byte status code is returned "in band" on
the bulk endpoint, not on the interrupt endpoint (replacing the one
call to sanei_usb_read_int() with sanei_usb_read_bulk() seems to do
the trick).

With those changes, the avision backend does seems to drive the
scanner at a very basic level, but there are various other problems.
For instance, get_calib_data() hangs while reading the dark
calibration data... it sends a SCSI READ command (data type 0x66) with
a buffer length of 241920, and the response never seems to arrive
(whether using libusb or the Linux kernel scanner module).  With a bit
of trial and error and a binary search, I found that requests of up to
82320 bytes do succeed, and 82321 or more do not.  Perhaps there is
some software or hardware limitation on the message size, but I
suspect that something in the scanner's handling of the INQUIRY and/or
SET WINDOW commands is confusing the avision backend, so the
calculation of the calibration buffer size ends up wrong.  (If I force
a request of 82320 bytes instead of 241920, scanimage does actually
scan a slide, but only at 300dpi, and without correct focus or
calibration.)

All this SCSI protocol stuff is new to me, so I don't have a good feel
for where to look to fix these things.  Does anybody have any
suggestions on what to try, or (please!) a pointer to somewhere any of
this might be documented?  I'd love to be able to contribute a patch
to the avision backend to support the Dual III.

Cheers,
Gary.
-- 
     Gary Wong          gtw at cs.bu.edu          http://cs-people.bu.edu/gtw/




More information about the sane-devel mailing list