[sane-devel] fujitsu duplex scan with usb

Oliver Schirrmeister oschirr at abm.de
Tue Apr 6 09:15:13 BST 2004


Thanks,
I think the status of the fujitsu scanners with USB interface should not
be reported 'good'.

Oliver

Am Montag 05 April 2004 22:23 schrieb m. allan noah:

> so, i tracked it down using usb snoopy in windows. the problem is simple
> to explain, but harder to fix:
>
> most scsi commands that use a data block after the command block (mode
> select, set window, scan) are formatted differently when sent via usb. the
> command block is sent first, in a single urb, padded to 31 bytes with null
> bytes. then the data block(s) are sent in another urb, not padded.
>
> the existing fujitsu code is very scsi specific, and only uses one buffer
> for scsi cmd/data to the do_cmd() function. this means that the caller has
> to either pad the single buffer with just the right number of 0's in the
> middle of the buffer, or the do_usb_cmd() function will have to break the
> buffer inhalf, and pad the data itself.
>
> for an example, see fujitsu_set_sleep_mode().
>
> you see this problem only with scanning duplex or back side because the
> code at line 3112 (talks about opcode==SCAN) is wrong. it should take the
> last one or two bytes and send as adifferent urb, rather than assuming 00.
>
> i have started a new version of the fujitsu backend, which uses a command
> and a data buffer to do_cmd() but have been far too busy to make much
> headway. take a shot if you would like.





More information about the sane-devel mailing list