[sane-devel] Umax 1220P not detected with /dev/parport0

Ryan Harkin linux@harkin.org
Wed, 16 Oct 2002 23:10:08 +0100


As a quick update, I am tracing through the scanner detection using umax_=
pp=20
and I think have found where the scanner hangs in this program:

I have added a few debug lines of my own:

umax_pp_low.c
3416: int
3417: sanei_umax_pp_ReleaseScanner (void)
3418: {
3419:   int reg;
3420:=20
3421:   DBG (0, "RMH - about to EPPRegisterWrite (0x0A)\n");
3422:   EPPREGISTERWRITE (0x0A, 0x00);
3423:   DBG (0, "RMH - about to EPPRegisterRead (0x0D)\n");
3424:   reg =3D EPPRegisterRead (0x0D);
3425:   reg =3D (reg & 0xBF);
3426:   DBG (0, "RMH - about to EPPRegisterWrite (0x0D)\n");
3427:   EPPRegisterWrite (0x0D, reg);


# ./umax_pp -p -t 255 -n /dev/parport0
=2E... lots of output ....
[umax_pp_low] EPPRegisterWrite(0xD,0x0) passed...   (umax_pp_low.c:5216)
[umax_pp_low] RMH - about to EPPRegisterWrite (0x0A)
[umax_pp_low] EPPRegisterWrite(0xA,0x0) passed...   (umax_pp_low.c:3422)
[umax_pp_low] RMH - about to EPPRegisterRead (0x0D)


And if I then run scanimage, I find that it hangs in the same place:

# SANE_DEBUG_UMAX_PP=3D255 scanimage -L
[umax_pp] init: SANE_Auth_Callback not supported (yet) ...
[umax_pp] init: SANE v1.0.9-pre1, backend v1.0.8-devel
[umax_pp] init: evaluating option <option buffer 2097152>
[umax_pp] init: option buffer 2097152
[umax_pp] init: setting global option buffer to 2097152
[umax_pp] init: trying port `/dev/parport0'
[umax_pp] attach(/dev/parport0)
[umax_pp_low] SlowNibbleRegisterRead: found 0x20 expected 0x0=20
(umax_pp_low.c:4591)
[umax_pp_low] RMH - about to EPPRegisterWrite (0x0A)
[umax_pp_low] RMH - about to EPPRegisterRead (0x0D)

So, it fails to read register 0x0D, a register is has read many time befo=
re.
I hope this helps someone to help me!

Cheers,
Ryan.