[sane-devel] Canon IX-4015 not working

Ondrej Zary linux at rainbow-software.org
Tue Jul 17 08:26:29 UTC 2012


On Friday 13 July 2012, Ondrej Zary wrote:
> Hello,
> I've found an old Canon IX-4015 scanner:
> scsi2 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
>         <Adaptec 2940 SCSI adapter>
>         aic7870: Single Channel A, SCSI Id=7, 16/253 SCBs
> scsi 2:0:2:0: Scanner           CANON    IX-4015          3.03 PQ: 0 ANSI:
> 2 scsi target2:0:2: Beginning Domain Validation
> scsi target2:0:2: Ending Domain Validation
> scsi 2:0:2:0: Attached scsi generic sg3 type 6
>
> sane-find-scanner is happy:
> found SCSI scanner "CANON IX-4015 3.03" at /dev/sg3
>
> But scanimage seems not be so happy - the first run after scanner power
> cycle crashes:
> $ scanimage -L
> Segmentation fault
> $ scanimage -L
> device `canon:/dev/sg3' is a CANON IX-4015          flatbed scanner
>
> And even after that, scanimage does not work:
> $ scanimage >/dev/null
> scanimage: sane_start: Operation not supported
>
> Old canon backend web says:
> "IX-4015: you have to make a simple modification in the backend sources,
> then it seems to work. See the archived mailing list for details. The
> modification will be included in the next backend release."
> (http://home.rzg.mpg.de/~mpd/sane/index-old.html)
>
> I wonder if that "next release" with modification was ever made. I also
> haven't found the details in the mailing list archive, only some old posts
> about IX-4015 docs:
> http://www.sane-project.org/old-archive/1998-07/0042.html
>
>
> Can someone provide me the IX-4015 documentation and/or some (old) code?

As a start, got the scanner working in Wine. The documentation about Wine, 
SCSI, ASPI and TWAIN is mostly absent so here's a guide:

0. The SCSI scanner must be visible to Linux.

1. Download ScanGear Twain driver here: 
http://software.canon-europe.com/products/0000521.asp

2. Install it in Wine (I used Wine 1.5.6). It installs twain_32.dll, 
fortunately.

3. Configure a library override (native, builtin) for twain_32.dll (using 
winecfg, add twain_32.dll on the Libraries tab).

4. Install some TWAIN-capable graphics program, preferably an older one that 
will work fine in Wine. I used old Paint Shop Pro (3.12) 32-bit.

5. Wine will attempt to use /dev/sg0. This will not be the scanner (mine is at 
sg3). As a hack, I renamed /dev/sg0 to /dev/sg0- and created a 
symlink /dev/sg0->/dev/sg3.
If you don't do this, scanning will fail with "Device initialization failed" 
and "err:aspi:SCSI_OpenDevice Failed to open device /dev/sg0: Permission 
denied" message from Wine. Or if your /dev/sg0 is another device (and is 
writable), it might do bad things to your system!

6. Run the graphics program in Wine, use "Select source" function to 
select "Canon IX-4015". Use "Acquire" function to scan.

For tracing, use WINEDEBUG variable to enable aspi debugging, e.g:
WINEDEBUG=aspi wine PSP32BIT.EXE


-- 
Ondrej Zary



More information about the sane-devel mailing list