[PARPORT] ECP pc to pc transfer

From: Cherry Cortes (osagimakoto@yahoo.com)
Date: Tue Oct 21 2003 - 09:16:47 EDT

  • Next message: Cherry Cortes: "[PARPORT] parport read"

    Hi! We're trying to do a pc to pc transfer in ECP mode
    with one computer acting as sender running windows xp
    and the other one as receiver runnng Red Hat Linux 8.0
    (kernel v 2.4.18-14) (the receiver is trying to
    function as printer).

    After grabbing data from the parallel port, we have to
    pause reading to process these characters and
    afterwards resume to grab more data (using inb()
    call). Our problem is that after this pause, we're
    encountering data loss which we assume is due to
    improper bit settings.

    Here's what we have done:

    outb(f2, controlport) //ready to receive data. w/
           
                          //reverse direction
    while (!(inb(BASE + 0x402) & 0x01)
    {
      *buffer++ = inb(BASE + 0x400);
      if (buffer_full)
      {
        outb(0xf4, controlport).
        while (!(inb(BASE + 0x402) & 0x01)
          *temp++ = inb(BASE + 0x400);

        outb(0xc0, controlport).
      }
    }

    Then we resume reading from parallel port after all of
    these characters have been processed using the same
    codes.

    And here's the pinouts of our cable:
    Pin# Pin#
     1----------------10
    10----------------1
    11----------------14
    14----------------11
    12----------------16
    16----------------12
    13----------------17
    17----------------13
     2----------------2
     3----------------3
     4----------------4
     5----------------5
     6----------------6
     7----------------7
     8----------------8
     9----------------9
    18----------------18
    19----------------19
    20----------------20
    21----------------21
    22----------------22
    23----------------23
    24----------------24
    25----------------25

    Any help would be greatly appreciated!! We're
    currently near our deadline. :-)

    Cherry

    __________________________________
    Do you Yahoo!?
    The New Yahoo! Shopping - with improved product search
    http://shopping.yahoo.com

    -- 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 : Tue Oct 21 2003 - 09:25:57 EDT