Issues with parport/parport_pc/lp

From: Mircea Ciocan (
Date: Tue Feb 13 2001 - 14:45:34 EST

        Hi all,

        Yesterday I see a request for help from the cups printing system
        Basicly it ask you to read the options from the PJL enabled printer you
may have by running this small shell script:

echo "Writing PJL options into opts.txt"
echo -en "\033%-12345X@PJL\r\n@PJL INFO VARIABLES\r\n" > /dev/lp0
sleep 1
echo "Press Ctrl+C"
cat < /dev/lp0 > opts.txt

 on a machine with CONFIG_PRINTER_READBACK enabled, and send the
renamed, non-empty opts.txt to a more intuitive printer_name.txt to (I strongly advise you all to read the link and
do the deed if you like better printing support with Linux)

        I've got a Kyocera FS-800 that is PJL compatible and have 2.4.1ac10
with all the parport and printing stuff compiled as modules, and tryed
running the script.
        Now the issue:
The script partially works only first time when is runned, any other
time it just blocks and wait for Ctrl-C.
If I remove ALL the modules involved (lp, parport_pc, parport, in that
order) it works again once and so on.
It is working only partialy because it only reads a fixed amount of
data, no matter what the printer have to say :(.
        This amount is on my machine ( dual PIII 950, Winbond SUPER-i/o chip,
ECC+EPP dma 3 and irq7 port) always 483 chars.
By booting in the default Mandrake-7.2 kernel (2.2.17-SMP) the script
has a totaly different behaviour:
        It returns different amount of data on each run but is not necessary to
remove and reload the modules and the maximum data amount that I can
read back was 1649 chars.
        I want to know if this issue could be solved with 2.4.x kernels and I'm
available for testing eventual patches.

                                Thank you,

                                Mircea C.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:22 EST