[PARPORT] Ecp Channel addressing read failure

From: Syed, Hassan (ETD) (Hassan.Syed@compaq.com)
Date: Fri Oct 05 2001 - 09:12:03 EDT

  • Next message: Marcel Wijlaars: "[PARPORT] Bug in parport_cs (kernel 2.4.x)?"


    I have been trying to write a channel address and read it back using ECP
    The following is the code.

       mode = IEEE1284_MODE_ECP | IEEE1284_ADDR;
       if (ioctl (hParPort, PPNEGOT, &mode)) {
            ParPortError = 1;
       // Channel address can be from 0 - 127
       WriteAddr[0] = (char) ChAddr;

       Result = write (hParPort, WriteAddr, 1);
       if (Result != 1) {
            ParPortError = 1;
       Result = read (hParPort, ReadAddr, 1);
       if (Result == -1) {
            ParPortError = 1;

       if (strncmp (WriteAddr, ReadAddr, 1))
            ParPortError = 1;

    I hooked up a Logic Analyzer and I can tell that the negotiation and
    commands work. I can see the transactions and they are according to
    theIEEE1284 spec.
    But, when I try to do an address read, a problem occurs.
    INIT goes low, then PERROR goes low, then STROBE goes low and BUSY
    goes low indicating that an address is to be read, but
    AUTOFD does not go high like it is supposed to. This causes zero bytes
    be read. AUTOFD is controlled by the host (parallel port driver).
    I can sent the screen capture, if that will help.

    Kernel: 2.4.4

    Appreciate your help.

    -- 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 2b29 : Fri Oct 05 2001 - 09:14:34 EDT