This version of the IFHP filter now supports parallel port
printers that report status under LINUX.  It may also support
them under other Operating Systems but I did not have access
to others systems with printers attached on parallel ports AND
whose operating systems provide bidirectional parallel port
support.  Any volunteers with such systems are encouraged to
report results.

If you want to use the birectional support, the lpd spooler
must open the device RW (read/write).  The printcap entry
would look like:

lp:
  :rw
  :lp=/dev/lp0
  :filter=/usr/local/libexec/filters/ifhp
  :of=/usr/local/libexec/filters/ifhp
  ...

You can test bidirectional support with ifhp in stand-alone mode
by using:

  ifhp -Tdev=/dev/lp0,trace  <some.file.to.print

You may have to use -Tmodel=xxx as well.

WARNING:  simultaneous use of multiple devices on the
parallel port caused system failures (we are talking
dead as a doornail and reboot time) during testing.
As in 'turn on the scanner and it go by by'.

WARNING:  simultaneous use of multiple devices on the
parallel port caused communication to the devices to
terminate.  Communication was restored only when both
devices were powered on and off and the programs
using them restarted.  As in 'scan a document and
it go by by.'

YOU HAVE BEEN WARNED!

Use this facility at your own risk and NOT for high
reliability printing.

Patrick Powell

Version 3.3.21 - Fri Aug 11 12:49:40 PDT 2000
 After a deep look into parallel port IO and bidirectionality,
  I have come to the conclusion that it is possible to handle
  this,  at the cost of a high polling rate at the process level.

  To this end,  the Read_write_timeout() code has been rewritten,
  and now does polling.  This actually works BETTER than the
  original version in my tests.

  First, the device must be opened read/write.  This is done
  by LPRng when you set the :rw flag -
   lp:
     :rw:lp=/dev/tty0

  Next, if the device is a character device (S_ISCHR(statb.st_mode)
  is true AND not a tty (isatty(fd) returns 0) then ifhp will perform
  IO by doing a write followed by a read().  On Linux systems
  the read is done in blocking mode;  on non-Linux systems it is
  done in nonblocking mode. It is expected that the read will
  either terminate with a 0 value (nothing to read), -1 and
  errno set to 'EWOULDBLOCK' or 'ENOAVAIL' or an appropriate
  error code indicating no status,  or  N where N is the number
  of bytes read.  If this code is run on a non-linux system
  which has implemented bidirectional IO and this does not work,
  I would be interested in hearing about this.  Note that on
  these systems the 'nonblocking' and 'blocking' calls might need
  to be removed.  Please try this and tell me the results and I
  will update the ifhp filter.

  I have added a small flag for the convenience of people who have
  some very strange accounting requirements.  The 'wait_for_banner'
  flag causes the OF filter mode to wait for banner printing
  to be completed before suspending.  This will allow the accounting
  facility to correctly assign pages to banners, jobs, and so
  forth.

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

Reply via email to