cups is blocking /dev/lp1

ekkard gerlach jack at aiai.de
Mon May 31 10:30:47 PDT 2004


cups is sometimes blocking /dev/lp1. Anybody here has made the same 
experience?
cat file > /dev/lp0  works. The file "file" seems to be sent to
/dev/lp1. But the printer doesn't work! (the file "file" is already in 
the right format for printing). After typing cat file > /dev/lp1  for 
about 10 times the printer suddenly works and prints the document  for 
one time. There are no queues defined on /dev/lp1 but on /dev/lp0.
I got the pointer to delete /usr/lib/cups/backend/parallel. Lets
wait and see if this helps. The blocking appears only sometimes on a PC 
of some of my customers.

The parports are interrupt driven. I already changed lp0 with lp1.
No success. lp0 was blocked then.

I don't really delete "parallel" but I changed it to

#! /bin/bash
# see the "CUPS Software Programmers Manual":
# "Writing Filters" and "Writing Backends"

# debug info in /var/log/cups/error_log
set -x

# output "Device Discovery" information on stdout
if [ "$#" -eq "0" ]
then
   echo 'direct lp0 "Unknown" "lp0 Printer"'
   exit 0
fi

# have the input at fd0 (stdin) in any case
if [ -n "$6" ]
then
   exec <"$6"
fi

# infinite retries to access the device
until cat /dev/null >/dev/lp0
do
   echo 'INFO: cannot access /dev/lp0 - retry in 30 seconds' 1>&2
   sleep 30
done
echo 'INFO: sending the data to /dev/lp0' 1>&2

# forward the data from stdin to the device
if cat - >/dev/lp0
then
   echo 'INFO:' 1>&2
   exit 0
else
   echo 'ERROR: failed to send the data to /dev/lp0' 1>&2
   exit 1
fi


It's not my code, I don't understand much. But replacing
"parallel" with that code printing to lp0 works and lp1
not (driven by cups). lp1 is untouched. I hope lp1 is
working without beeing blocked or deferred. Tomorrow there
will be a test in one of my customers office. Lets wait and see.

using cups 1.1.18 / cupsd , Suse 8.2

tia
Ekkard




More information about the cups mailing list