[PARPORT] PPNEGOT and the ability to get to EPP or ECP mode

From: Nate (nate@uniwest.com)
Date: Mon Jun 10 2002 - 18:52:51 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] PPNEGOT and the ability to get to EPP or ECP mode"

    I am trying to figure out why I cannot negotiate into ECP or EPP mode. The
    machines are two PC's that appear as though they should both be able to, by
    looking at the BIOS.

    I am using RH 7.1 Linux --- So kernel 2.4.2-2. I noticed that the code I
    have for ppdev.h doesn't have all of the constants defined in Tim Waugh's
    HTML documentation.
    http://people.redhat.com/twaugh/parport/html/parportguide.html
    So I know my code has been outdated.

    The functionality I am trying to utilize is there though and I think it
    should work. In other words, I want to stick with this kernel and modules.

    I have the BIOS settings set to the correct values.

    Here is a sample of my code...

    <snip>

    #include <errno.h>
    #include <fcntl.h>
    #include <linux/ppdev.h>
    #include <linux/parport.h>
    // and other headers

    int main(void)
    {
    // after opening claiming the port successfully

    // I use the following values for "my_mode"
    // IEEE1284_MODE_COMPAT
    // IEEE1284_MODE_NIBBLE
    // IEEE1284_MODE_BYTE
    // IEEE1284_MODE_ECP
    // IEEE1284_MODE_EPP

    ret = ioctl(my_port, PPNEGOT, &my_mode);

    if( 0 == ret )
    {
          printf("Negotiation Successful");
    }
    else
    {
          printf("Negotiation Failed");
    }

    // read and write to port
    // close it when done

    return 0;
    }

    </snip>

    The only mode that successfully negotiates is the mode it starts in,
    (ieee1284 compatibility mode).

    To negotiate successfully, do I need to have a client on the other end
    running software in a negotiating loop? I am assuming I need to be
    connected to another machine so they can decide on the lowest common
    denominator...

    My cable is a "Laplink" style cable and I know its able to spit data across
    because I am printing it as it gets there on the other machine.

    Any help would be appreciated.

    Thank You,

    Nate

    -- 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 : Mon Jun 10 2002 - 19:00:11 EDT