[sane-devel] OS/2 device driver for HP7450C

Ron Cemer ron at roncemer.com
Wed Feb 12 00:52:15 GMT 2003


Ok, I just got this Fujitsu fi-4220C scanner working via USB.  I've been 
doing the work on the 1.0.9 version of sane-backends, since that's the 
version that we've been using so far, and that's where our changes have 
been implemented to make this scanner work via SCSI.  So I need to port 
the changes forward into the latest version (I guess from CVS).  I'll 
get that done soon.

There were two commands that are different between USB and SCSI for this 
scanner.  They are MODE_SELECT and SET_WINDOW.  So I put some code in to 
detect when we're using an fi-series scanner over usb connection, and 
step around that problem by using properly formatted commands for USB.  
I found the differences using USB Snoopy and a Windoze ME box.

As far as the rest of it is concerned, I just added a do_usb_cmd 
function, and then added a new do_cmd function to dispatch the commands 
to either do_usb_cmd or do_scsi_cmd.  Then I changed all do_scsi_cmd 
calls into do_cmd calls.  Then I modified the config file reader to 
recognize "usb" prefix before device name, as with the epson scanner, 
and to set a flag bit in the fujitsu scanner structure (which I also 
added) to indicate that the scanner is connected via USB.  Also, 
wherever the sanei_scsi_open and sanei_scsi_close functions were being 
called, I test this USB connection flag, and if it's turned on, I call 
sanei_usb_open or sanei_usb_close instead sanei_scsi_open or 
sanei_scsi_close.

All in all, the changes are really simple, and when you see them, you 
may decide it's not worth doing a separate module to handle my changes.  
One reason I say this is because the Fujitsu scanner uses an Epson 
S1R72105 SCSI/USB interface chip.  When communicating via USB, the USB 
mass storage spec is implemented to "wrap" the SCSI commands, but it is 
implemented in a non-standard way (some things don't match up to the 
spec), so you may find that the protocol deviates from the standard so 
much that it's an exception rather than the rule.

Anyway, let me make the changes to the latest version from CVS, and once 
those are done and tested, I'll send you the output of "diff -u".  There 
are four files affected:
    backend/fujitsu.h
    backend/fujitsu-scsi.h
    backend/fujitsu.c
    backend/Makefile.in

So in the mean time, maybe you don't want to make lots of changes to 
these files.  It will only take me a day or two to get this 
re-implemented into the latest version from CVS.

Thanks!
Ron


Rene Rebe wrote:

>On: Tue, 11 Feb 2003 19:27:35 +0100,
>    Henning Meier-Geinitz <henning at meier-geinitz.de> wrote:
>  
>
>>Hi,
>>
>>On Tue, Feb 11, 2003 at 10:13:20AM -0800, Ron Cemer wrote:
>>[SCSI-over-USB]
>>    
>>
>>>I'm already working on this in the fujitsu driver.  I've almost gotten 
>>>it working.  Fujitsu is supposed to get back to me with the specs on the 
>>>chip that they're using to do the USB and SCSI interface.  After I get 
>>>it working, you can probably use the same technique for any other 
>>>scanners which have both a SCSI and a USB interface.
>>>      
>>>
>>If it's really the same scheme for all scanners, I propose to write a
>>sanei/sanei_uos.c (usb ober scsi) file and provide an interface
>>similar to sanei_scsi.c. So SANE backends can use SCSI and USB
>>scanners without much change.
>>    
>>
>
>Interesting - I'll also take a look into the hpusbscsi driver - since
>the hpusbscsi is rather touchy it would be nice to have a user-space
>only solution.
>
>  
>
>>Bye,
>>  Henning
>>    
>>
>
>- René
>
>--  
>René Rebe - Europe/Germany/Berlin
>e-mail:   rene.rebe at gmx.net, rene at rocklinux.org
>web:      www.rocklinux.org, drocklinux.dyndns.org/rene/
>
>Anyone sending unwanted advertising e-mail to this address will be
>charged $25 for network traffic and computing time. By extracting my
>address from this message or its header, you agree to these terms.
>_______________________________________________
>Sane-devel mailing list
>Sane-devel at www.mostang.com
>http://www.mostang.com/mailman/listinfo/sane-devel
>
>  
>





More information about the sane-devel mailing list