[sane-devel] Canoscan 2700f

abel deuring a.deuring@satzbau-gmbh.de
Mon, 16 Feb 2004 12:56:02 +0100


Jonathan Knight wrote:
> 
> Hi everyone.
> 
> I have a canoscan 2700F which has been the bain of my life on Linux since
> the day I bought it.  It basically doesn't work at all unless you fiddle
> a number of things to get it working.  I would like to make contact with
> other 2700F owners who have successfully got the canoscan to run on Redhat 9.
> 
> I had the scanner running on redhat 9 until a recent up2date which patched
> the kernel and sane.  Since then nothing worked.  I've gone through my
> checklist of things that need to be fiddled with and all of those seem fine.
> The sense buffer that's returned for sane 1.0.12 gives a lamp failure.  On
> 1.0.5 the process hangs when trying to preview or scan.
> 
> For the record - here's the checklist I go through:
> 
> 1.  Make sure IRQ 10 is set for legacy ISA in the BIOS

So you have an ISA SCSI adapter? they may indeed be a bit difficult to
configure. If this really bothers you, I'd recommend to buy a cheap PCI
SCSI adapter. You can get good used one for a few Euro or Pound at Ebay.
My personal favourites are adapters that work with the sym53c8xx driver
or the aic7xxx driver. And with a PCI SCSI adapter, you'll be able to
use SCSI transfer block sizes larger then 64kB.

> 2.  echo 131072 > /proc/scsi/sg/def_reserved_size

A buffer size larger than 64k is not reasonable for ISA adapters, due to
the broken ISA DMA architecture. Moreover, Sane negotiates the size of
the buffer independly (OK, perhaps not in Sane 1.0.5 -- I'd need to look
into the sources to be sure), but version 1.0.12 definitely does this.

> 3.  patch sg.c with the non-standard scsi command lengths

This patch is only necessary for really old SG drivers -- no need tor a
recent Linux version like RH9.

> 4.  configure /etc/sane.d/canon.conf
> 
> (I do smile when sane lists the 2700F driver status as "good" when in order
> to get it working you have to patch and recompile the kernel.  Hardly
> something most users will consider an easy option)

As said above, it should not be necessary to recompile the SG driver
since, ummm, I guess, at least 3 or 4 years. Can't recall, when exactly
the SG driver (version 2.x) got the ability to explicitly set the
command length, and when I made sanei_scsi.c aware of the capabilities
of version 3 of the SG driver.

> 
> That list has managed to get the scanner to run under redhat 7 and 9 until
> now.  If anyone has the scanner running under the latest redhat 9 kernel
> then I'd like to know what else needs changing to achieve that.
> 
> I intend to try and older version of sg.c to see if that's the problem.

Alternatively, it would be intersting to see what exactly goes wrong
with the unpatched SG driver. The output of "SANE_DEBUG_CANON=255
SANE_DEBUG_SANEI_SCSI=255 scanimage" (or the output some other Sane
program with SANE_DEBUG_CANON and SANE_DEBUG_SANEI_SCSI set to 255)
would give us a clue. 

Abel