Re: [PARPORT] Lost characters again


Andrea Arcangeli (andrea@e-mind.com)
Sun, 4 Oct 1998 23:48:36 +0200 (CEST)


On Sat, 3 Oct 1998, Tim Waugh wrote:

>Hi guys,
>
>I think the lost characters bug might still be there, but I don't know for
>sure. Here's what I did:
>
>- printer is off
>- ghostscript | lpr
>- turn printer on

The same works fine here with the ZIP drive in the middle. I can guess
what' s happening:

printer lp
---------- ---------------------------
                                wait for ACK (for the irq)
spurious ACK and BUSY due
poweron
                                cool we can send the first byte
nono I am not ready yet
to get data
                                wait for the new ACK
real ACK and BUSY
                                continue to send the second byte

This way the first byte get lost.

I am not sure this is the case but since the same thing works reliable
here I suppose it' s a bug in the printer. If the printer at poweron set
a spurious BUSY and ACK line we can do nothing of trivial in software to
workaround. We just check for BUSY after we get the interrupt/ACK.

You could also try to run:

/usr/sbin/tunelp /dev/lp0 -w 30

With my old printer my machine (P5233MMX) is too fast and the default WAIT
value of 0 it' s too small for me and I get lost chars too in the middle
of a printing without setting the wait timeout >5/10.

Maybe your printer at boot is a bit strange and need an increased
wait before remove the strobe from the bus.

>- turn printer on again
>- ghostscript | lpr as before
>- correct output on paper

This is the important thing and this seems fine from your report.

>So, it could either be the printer driver's handling of an unpowered
>printer, or it could be my printer (Canon BJC210) getting confused as it
>initializes.

lp only check for BUSY. If BUSY is not set lp will not go ahead. BUSY is
the only signal we can trust to know if the printer is just ready to
receieve data.

>Another possibility is that the Zip drive is swallowing data by accident -
>it sits between the printer and parallel port.

Here works fine and make no sense to me.

>I don't really have time now to see if I can reproduce it. Does anyone
>feel like trying to find possible data lossage in lp.c?

Try lptune and let me know...

Andrea[s] Arcangeli

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:18:30 EST