Re: ppSCSI and Microtek Phantom 330 CX

Bernd Schroeder (bernd@aquila.muc.de)
Wed, 22 Sep 1999 12:37:13 +0200

Hi,

On Tue, Sep 21, 1999 at 05:52:18PM +0200, Camille DIOU wrote:
> Hi all,
>
> I've been looking the mailing-list archive to get my Phantom 330 CX
> working until Linux. I found what I was looking for, but there are
> still some problems.
>
> First, I attached the ppscsi 0.91 patch to my 2.2.10 kernel. I also
> applied the patch (thanks to Michele Bini) I found in the
> mailing-list Juny archive to the microtek2 backend source.
>
> That seems to work. When I load the onscsi module, I get the following
> message :
>
> [root@localhost scsi]# insmod onscsi
> onscsi.1: onscsi 0.90 (0.91), OnSpec 90c26 at 0x378 mode 0 (Nybble) dly 1 nice
> 0 sg 16
> scsi0 : onscsi
> scsi : 1 host.
> Vendor: Model: scanner 330CS Rev: 1.26
> Type: Scanner ANSI SCSI revision: 02
> Detected scsi generic sga at scsi0, channel 0, id 2, lun 0
> [root@localhost scsi]#
>
> Also, 'find-scanner' responds:
>
> [root@localhost /root]# find-scanner
> find-scanner: found scanner " scanner 330CS 1.26" at device /dev/sg0
> find-scanner: found scanner " scanner 330CS 1.26" at device /dev/sga
> [root@localhost /root]#
>
>
> All right, but :
>
> - scanimage doesn't work. The message I get is identical to those I
> could have read on the Juny archive concerning the Phantom 330/336
> CX. The only difference is that the revision number is 1.26.
> The scanner doesn't scan anything but goes forward and backward for
> 2 or 3 cm, never more (even if the 'no-backtrack-option' is set to
> 'on' in microtek2.conf), until the programm die a few seconds
> later. All what I get is:
>
>
> [ ... I cut the scanner-ID output ... ]
> P6
> # SANE data follows
> 612 838
> 255
> onscsi.1: PDMA timeout, bs=11 cb=10 db=1842 bu=1 sg=0 rd=1 lp=31 pe=0 cc=41
> onscsi.1: Arbitration failure, bs=11 cb=0 db=1842 bu=0 sg=0 rd=1 lp=0 pe=0 cc=42
> onscsi.1: Bus reset
> onscsi.1: Arbitration failure, bs=31 cb=0 db=1842 bu=0 sg=0 rd=1 lp=0 pe=0 cc=43
> [root@localhost scsi]#

Even if the 'no-backtrack-option' is set it is possible that the scanner
stops and starts, but should not move back. Here it looks as if one
or more buffers are read, but then the device fails to read another buffer.
I don't know what the error messages mean, but it looks like a problem
with the ppSCSI stuff. Maybe you should ask on the linux-parport mailinglist.

> After that, I have to unload the onscsi module, turn off the
> scanner and then on, and last reload the module.
>
> - xscanimage works better, but I have the same problems as Michele Bini:
> * I also have an offset around 15-20 mm (at 24bpp)
> * the preview is working well but the head doesn't stop and hits
> the upper side of the scanner: I must turn off the scanner by hand.
> * the acquisition itself does work well too, but when finished, the
> head comes back to the bottom side, doesn't stop, and hits it.
>
> Note that with xscanimage, the no-backtrack-option seems to work well.
>
>
> Thus, some questions now.
> How could you explain that xscanimage (almost) works, but scanimage
> doesn't ? How to get it working ?

I don't know. During a scan the only commands that are executed are
'read image', and they should be the same for scanimage and xscanimage.
Maybe scanimage and xscanimage use different internal buffer sizes for
the scan data.

> 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).

For some reason the device doesn't find the zero position. I think that
if a preview scan is done it tries to scan an A4 sized image, but because
a number of lines are missing at the beginning it tries to scan beyond
the bottom of the scan area. If this is the case it should at least work
better, if you do a normal scan, but don't specify the whole scan area.

There is one SCSI command that sets all the parameters for a scan - including
the scan area - and these are set correctly, so it should start at
position 0.

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

If this option is set this will enable an additional option in the
frontend (Calibration by backend). If this option is checked the backend
instead of the device will do a colour calibration at the beginning
of a scan. This will involve some additional commands to position the
scan head. I don't know if it helps, but I think it's worth a try.

When the scan head returns to its home position after a scan the backend
it not involved at all. After the last buffer has been read the head moves
back automatically, and there is no command to position it.

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