Folks, I really really really want to add better parallel port support to the LPRng on Linux, but it doesn't look like it will be soon. Here is the reply to a question a I got from Tim Waugh, who is definately the person to ask about this, and is very good. If Tim has problems, then I will not touch this with the long pointy stick I keep for poking at problems like this. Note: I am CC'ng Tim on this as well. > From [EMAIL PROTECTED] Fri Jun 30 09:39:18 2000 > Date: Fri, 30 Jun 2000 16:22:24 +0100 > From: Tim Waugh <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [PARPORT] Bidirectional Port > > > --RUqJLqMNe5u4kDWT > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: quoted-printable > > On Sun, Jun 25, 2000 at 11:03:46AM -0700, [EMAIL PROTECTED] wrote: > > > Tim, have you tried this lately? > > I ripped out the select()-read support that I started because it > causes problems with at least some printers (in particular, the one I > have). Sigh.... > > (Which kernel branch are you thinking of by the way?) > > > I cannot make this work reliably. The last time > > I tried this > > a) you could not set the parallel port into asynch write mode > > b) you could not set it into asynch read mode > > Are you talking about O_NONBLOCK? Yes. Sorry about that. > > > c) select failed on write > > Yes. Getting this to work would more than double the driver's > complexity. Getting O_NONBLOCK working on the other hand would > probably be quite easy. But now you put the burden up into the user... Still... It is better than nothing... > > (I had thought that it was already working, but looking at the source > I appear to be wrong about that.) > > > I am willing to give up the 'asynch read mode' as long as the read > > is nonblocking.=20 > > It should already work. Use O_NONBLOCK (I'm looking at the 2.4 > branch). > > > And I will give up the 'async write mode' as long > > as write terminates (with a count of the number of characters written) > > if there is input. > l > The trouble with that is: when do you check to see if there is input? > If I'm using DMA, for instance, am I supposed to only DMA a few kb > before stopping, negotiating to reverse nibble, checking a flag, > terminating, and carrying on? Ew.. I suppose it could be controlled > by an ioctl or something.. would that be acceptable? Yes! Yes! Anything would be acceptible if it works. Well... short of needing to sprinkle the cable with Holy Water and put garlic beside the printer. > > > If you can give me the magic recipe to do this, I will add it to the > > LPRng support and there will be singing and dancing in the streets. > > I would really like to help. I'm afraid it just doesn't look like > select() is really the way forward. Then how do we know that there is input pending? > > Tim. > */ > > --RUqJLqMNe5u4kDWT > Content-Type: application/pgp-signature > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.1 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE5XLswzNKoNUTpbygRAdqoAJwKEMFxMIu49rMHB/foZswRqAB8UwCgpBbr > ikv5v+sXGbWxBWTP1oZzC8M= > =qCSf > -----END PGP SIGNATURE----- > > --RUqJLqMNe5u4kDWT-- > ----------------------------------------------------------------------------- If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
