[PARPORT] Parallel port for printing

From: Guillaume Muller (gmuller@evc.net)
Date: Tue May 16 2000 - 13:10:50 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] vmware, EPP, ECP, ZIP drive, printer port"

    Hi

    I program printer drivers for an Image Processing Application, and I'm
    currently investigating the problem to know why my transfer rates are so
    slow when I use the (standard) parallel port under linux.

    Please forgive me if my questions are naive, but I'm very new to this
    mailing list and to the parport world as well. I've already spent a
    considerable amount of time browsing the internet, but could not find any
    clear answer to my questions.

    Currently, the way I write into a parallel port is (roughly) this one:

    fd = open( "dev/lp0", (O_WRONLY|O_CREAT|O_TRUNC), 0666) ;
    write( fd, datas, size ) ;
    write( fd, datas, size ) ;
    ...
    close(fd) ;

    As you can see, this is the same than just copying a file into /dev/lp0. I
    agree this is not very sophisticated, but it works, and has always worked,
    on every Unix-like system.

    Now, using that code, I can't seem to get a transfer rate higher than
    100k/sec, whatever my settings in the BIOS are (ECP, EPP, ...). This means,
    I suppose, that the "advanced" modes are not used at all, even if they are
    enabled. It is extremely annoying, since most printers today need between
    200 and 500 k/sec to print at full speed.

    My questions (btw I'm running a 2.2.9-27 kernel).

    1) Is there any hope of improving the situation by just re-configuring
    correctly the device (or another one), using the same code ? And if it is
    possible, how? Is the situation different with the a kernel 2.3? Or do I
    absolutely need special programmation with parport to use ECP or EPP modes?
    (BTW I'm not interested in the bi-directional functionalities. I just want
    speed).

    2) If there is no hope, then could someone give me a starting point? Should
    I look at the "lp" code?

    I'm also wondering why there is so few people complaining about their
    printer beeing slow under linux. I've searched both through the usenet and
    the parport archives, but there's really very very few people reporting such
    a problem. That's why I think it may be just a configuration issue. Yet it
    may also be that the unix people mostly print text-based graphics, which
    compress very well, and thus transfer very fastly compared to the speed of
    any printer.

    Thanks,

    Guillaume Muller.

    -- 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 May 16 2000 - 12:41:58 EDT