[PARPORT] Bidirectional access to parallel port (JAVA)

From: Ramón Suárez Alvarez (rsuarez@dynasty.es)
Date: Tue Feb 25 2003 - 09:14:03 EST

  • Next message: Gora Mohanty: "[PARPORT] libieee1284 automatically loads ppdev, lp?"

    Hi all;

    I'm a newbie in this mailling list and I need some help with this problem:

    I'm developing a program in Java to control a parallel printer, sending
    directly to the printer it's escape sequences docummented by the printer

    In Windows I had a sys file provided by the printer manufacturer and using
    CreateFile, ReadFile and WriteFile, I sent commands to the printer without
    problems. Now, I need to do the same in Linux. Reading in Internet, I found
    that it's possible to use directly the lp device and, from Java, using
    FileInputStream and FileOutputStrem objets, open, read and write the file
    /dev/lp0. But it doesn't work. I be able to write but trying to read, I
    receive exceptions. The question is:

    How can I use the parallel port as a bidirectional port? Do I need to make
    something special to use the standard parallel port driver in linux? Do I
    need to write some c code to access to the port and then make a JNI access
    from Java to this c code? any idea?

    Thanks to all.

    (sorry if my english is not good as I want, it's not my first lenguage).


    -- 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 Feb 25 2003 - 09:22:10 EST