How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? - Linux

This is a discussion on How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux? - Linux ; Hi All: I need to interface my computer to a digital circuit and I'm needing to control (reading, setting and resetting) the pins of a usb-to-parallel port device that uses usblp kernel module (kernel 2.6.21). After googling around I did ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux?

  1. How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux?

    Hi All:

    I need to interface my computer to a digital circuit and I'm needing
    to control (reading, setting and resetting) the pins
    of a usb-to-parallel port device that uses usblp kernel module (kernel
    2.6.21). After googling around I did not figure out
    how to do it.
    How can I do that? Is there any ioctl()'s call ? Or some way to get an
    address to use outb() and inb() ??

    Thanks a lot in advance.

    Lucas Brasilino


  2. Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux?

    brasilino@yahoo.com schrieb:

    > Hi All:
    >
    > I need to interface my computer to a digital circuit and I'm needing
    > to control (reading, setting and resetting) the pins
    > of a usb-to-parallel port device that uses usblp kernel module (kernel
    > 2.6.21). After googling around I did not figure out
    > how to do it.
    >

    It's just not possible. USB<->Centronics converters aren't just "port pins"
    as built-in ports. Like USB<->RS232 converters, they do all the handshaking
    on the remote device side alone. The host computer cannot control their
    port pins directly.

    Short: If you don't connect a printer to a USB<->Centronics converter, it
    won't work at all.

    Kind regards

    Jan



  3. Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux?

    Hi Jan:

    > It's just not possible. USB<->Centronics converters aren't just "port pins"
    > as built-in ports. Like USB<->RS232 converters, they do all the handshaking
    > on the remote device side alone. The host computer cannot control their
    > port pins directly.
    >
    > Short: If you don't connect a printer to a USB<->Centronics converter, it
    > won't work at all.


    Thanks for your answer.
    Well, it is not possible since USB<->Centronics kernel module (usblp)
    does not
    implement this kind of 'pin control', right? But it is possible to
    write a kernel module
    which implements, for example, some proc files that it's content is
    written directly
    to pins, ie, a file like /proc/lp/strobe that when:

    echo 1 > /proc/lp/strobe

    the strobe pin is set, isn't it?

    regards
    Lucas Brasilino


  4. Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux?

    Lucas Brasilino writes:
    > Well, it is not possible since USB<->Centronics kernel module (usblp)
    > does not implement this kind of 'pin control', right?


    It is alos possible that the firmware in the converter does not permit it.
    --
    John Hasler
    john@dhh.gt.org
    Dancing Horse Hill
    Elmwood, WI USA

  5. Re: How to set (and reset) pins of parallel port of a usb-to-parallel device with Linux?

    brasilino@yahoo.com schrieb:
    > But it is possible to
    > write a kernel module
    > which implements, for example, some proc files that it's content is
    > written directly
    > to pins, ie, a file like /proc/lp/strobe that when:
    >
    > echo 1 > /proc/lp/strobe
    >
    > the strobe pin is set, isn't it?
    >

    No, the converters available most certainly do not support such a function.
    They expect a data block to be sent through the USB wire, buffer it, and do
    *all* the handshaking on the Centronics wire itself. No need to let the
    computer control a wire directly, so there most certainly no command to
    advice it to do so.

    Find out which controller chip your converter uses and get and read its
    datasheet.

    Kind regards

    Jan

+ Reply to Thread