Re: ppSCSI and Microtek Phantom 330 CX

Bernd Schroeder (bernd@aquila.muc.de)
Wed, 22 Sep 1999 18:59:22 +0200

Hi,

On Wed, Sep 22, 1999 at 01:53:02PM +0200, Camille DIOU wrote:
>
> Hi Bernd,
>
> * "BS" == Bernd Schroeder écrivait le Wed, 22 Sep 1999 12:37:13 +0200:
>
> onscsi.1: Arbitration failure, bs=31 cb=0 [...cut...]
>
> BS> Even if the 'no-backtrack-option' is set it is possible that
> BS> the scanner stops and starts, but should not move back. Here it
> BS> looks as if one or more buffers are read, but then the device
> BS> fails to read another buffer. I don't know what the error
> BS> messages mean, but it looks like a problem with the ppSCSI
> BS> stuff. Maybe you should ask on the linux-parport mailinglist.
>
> The 'arbitration failure' error message also arise when I turn off the
> scanner while scanning. Maybe a communication problem between the
> module and the hardware. I'll try the parport mailing-list.
>
> I forgot something: scanimage seems to work with lineart mode.

Hhm..

> >> Is there any way to avoid the head hitting the borders of the
> >> scanner? (I didn't find any solution in the archive since Juny).
>
> BS> For some reason the device doesn't find the zero position. I
> BS> think that if a preview scan is done it tries to scan an A4
> BS> sized image, but because a number of lines are missing at the
> BS> beginning it tries to scan beyond the bottom of the scan
> BS> area. If this is the case it should at least work better, if
> BS> you do a normal scan, but don't specify the whole scan area.
>
> That's right.
>
> BS> There is one SCSI command that sets all the parameters for a
> BS> scan - including the scan area - and these are set correctly,
> BS> so it should start at position 0.
>
> I tried the -t -b -x -y options to define the scan area without
> success. I got an error message concerning the --br-c (sorry but I
> don't remember it exactly).

But it would be interesting. And what does it mean "without success" ?
Are the settings completely ignored or does the scan still start at
the wrong position, even if the settings are changed.

> BS> One thing you can try is: Set the still experimental and
> BS> undocumented 'option backend-calibration on' in the
> BS> microtek2.conf file, if it exists in your version. Otherwise
> BS> download a newer version from
> BS> ftp://ftp.muc.de/people/bernds/mtek2.
>
> I'll try that.

It is possible that it doesn't work. According to Michele Bini the
Phantom 330cx doesn't understand one of the SCSI commands. This command
is not executed for the Phantom 330cx during a normal scan. But it is
still used in the calibration process. If you experience problems
you must remove the call to scsi_wait_for_image() in the do-calibration()
function.

> BS> If this option is set this will enable an additional option in
> BS> the frontend (Calibration by backend). If this option is
> BS> checked the backend instead of the device will do a colour
> BS> calibration at the beginning of a scan. This will involve some
> BS> additional commands to position the scan head. I don't know if
> BS> it helps, but I think it's worth a try.
>
> BS> When the scan head returns to its home position after a scan
> BS> the backend it not involved at all. After the last buffer has
> BS> been read the head moves back automatically, and there is no
> BS> command to position it.
>
> I tested the scanner with the -T option. What I got is:
>
> scanimage: scanning image of size 612x838 pixels at 24 bits/pixel
> scanimage: acquiring RGB frame, 8 bits/sample
> scanimage: reading one scanline, 1836 bytes... PASS
> scanimage: reading one byte... PASS
> scanimage: stepped read, 2 bytes... PASS
> scanimage: stepped read, 4 bytes... PASS
> scanimage: stepped read, 8 bytes... PASS
> scanimage: stepped read, 16 bytes... PASS
> scanimage: stepped read, 32 bytes... PASS
> scanimage: stepped read, 64 bytes... PASS
> scanimage: stepped read, 128 bytes... PASS
> scanimage: stepped read, 256 bytes... PASS
> scanimage: stepped read, 512 bytes... PASS
> scanimage: stepped read, 1024 bytes... PASS
> scanimage: stepped read, 2048 bytes... PASS
> scanimage: stepped read, 2047 bytes... PASS
> scanimage: stepped read, 1023 bytes... PASS
> scanimage: stepped read, 511 bytes... PASS
> scanimage: stepped read, 255 bytes... PASS
> scanimage: stepped read, 127 bytes... PASS
> scanimage: stepped read, 63 bytes... PASS
> scanimage: stepped read, 31 bytes... PASS
> scanimage: stepped read, 15 bytes... PASS
> scanimage: stepped read, 7 bytes... PASS
> scanimage: stepped read, 3 bytes... PASS
> [root@localhost sane-1.0.1]# scanimage: stopping scanner...
> scanimage: stopping scanner...
> scanimage: stopping scanner...
> scanimage: stopping scanner...
>
> .. and so on: the scanner never stop.

This is a bug in the backend. scanimage issues a sane-cancel() command, but
the cancel stuff is broken. I have fixed this, but do not want to make
it available right now, because there is another bug, that needs to be
fixed first.

Apart from that the scanimage output looks good, and it shows that
the Phantom 330cx basically understands all the SCSI commands. The main
problem is that it skips lines at the beginning of the scan area, although
it is definitely told to start at position 0 (according to a debug output
I have).

Bernd

-- 
Bernd Schroeder 
Email: mailto:bernd@aquila.muc.de
PGP public key available: mailto:pgp@aquila.muc.de | Subject: send key 

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com