Re: Problems with Mustek 600 II N

Henning Meier-Geinitz (st002354@hrz1.hrz.tu-darmstadt.de)
Wed, 14 Jan 1998 22:54:01 +0100

Hi!

> > I tried to do some debugging and set SANE_DEBUG_SANEI_AB306. If I use
> > a value of 4 or higher I can use the scanner, if its 3 or lower, the
> > driver hangs. Some Output with SANE_DEBUG_SANEI_AB306=3:
>
> Really loks like a timing problem ! Have you tried to use xscanimage
> as "normal" user ? If you do so, make sure to make /dev/port accessable
> for read and write to the user.

Yes, I tried this now, and it works without these problems. But with
/dev/port enabled, the scanner isn't turned off after leaving
xscanimage any more.

> Background: I/O via /dev/port is very much slower than by direct
> inb/outb assembler inline instructions (but these can only be used
> if the program is executed by root or is run with the SUID bit set).

I tried another one: I put a usleep in sanei_ab306.c:

/* Send a single command-byte over the AB306N-interface. */
static void
ab306_cout (Port *p, int val)
{
u_long base = p->base;

usleep(100); /* <---------- */
while ((ab306_inb (p, base + 1) & 0x80)); /* wait for dir flag */
ab306_outb (p, base, val);
ab306_outb (p, base + 1, 0xe0);
while ((ab306_inb (p, base + 1) & 0x80) == 0); /* wait for ack */
ab306_outb (p, base + 1, 0x60);
}

This works for me (without the SANE_DEBUG trick), but I don't know
much about programming and C.

Two other points:
If I press "Cancel" during the scan, xscanimage hangs for about 2
minutes before it is working again.

Color doesn't work for me. The colors seem to overlap some milimeters
if I use 150 dpi. If I use other resolutions I will get horizontal
lines and "ugly" colors. Without the line-distance-fix it's even uglier.

> I'll have a look at it as I have the time.

Thank you very much. If I can help you (do testing ...), please mail
me.

Ciao, Henning

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