Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. USB to Parallel Port Converter
Forum Updated to NodeBB v4.3 + New Features

USB to Parallel Port Converter

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 5 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QT_fan
    wrote on last edited by
    #1

    USB to parallel port adapter

    I have a USB to parallel port adapter cable which I want to use with devices which have parallel port interfaces. When I plug it into the USB port I receive the usual message that it is installed. In the past I have used USB to parallel port modules which appear in device manager as a COM port which I can communicate with using QserialPort. However, this cable does not appear as a COM port but as a USB Serial Bus controller named USB Printing Support.Its location is Port_#0004.Hub_#004 and the hardware Ids is USB\VID_1A86%PID_7584. I am using the following code:

    #include <QApplication>
    #include <QIODevice>
    #include <QSerialPort>
    #include <QSerialPortInfo>
    #include <QDebug>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    char C = 0xFA;
    QSerialPort serial;
    serial.setPortName ("Port_#0004.Hub_#0004");
    serial.open(QIODevice::ReadWrite);
    qDebug() << serial.portName();
    serial.putChar(C);
    serial.close();
    return 0;
    }
    The screen output is:

    “Port_#0004.Hub_#0004”
    QIODevice::write (QserialPort): device not open
    Press <RETURN> to close this window...

    My question is how can I send/receive data to this device.
    Thanks in advance.

    aha_1980A 1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by Kent-Dorfman
      #2

      You make a faulty assumption, that the USB device uses the serial device driver class. USB is not that simple.

      It's still nowhere near as simple as you'd like it to be. USB has many endpoints and you really need to know what if any driver class the thing uses. If no driver class then it's vendor specific and requires (often proprietary) drivers.

      1 Reply Last reply
      2
      • Q QT_fan

        USB to parallel port adapter

        I have a USB to parallel port adapter cable which I want to use with devices which have parallel port interfaces. When I plug it into the USB port I receive the usual message that it is installed. In the past I have used USB to parallel port modules which appear in device manager as a COM port which I can communicate with using QserialPort. However, this cable does not appear as a COM port but as a USB Serial Bus controller named USB Printing Support.Its location is Port_#0004.Hub_#004 and the hardware Ids is USB\VID_1A86%PID_7584. I am using the following code:

        #include <QApplication>
        #include <QIODevice>
        #include <QSerialPort>
        #include <QSerialPortInfo>
        #include <QDebug>

        int main(int argc, char *argv[])
        {
        QApplication a(argc, argv);
        char C = 0xFA;
        QSerialPort serial;
        serial.setPortName ("Port_#0004.Hub_#0004");
        serial.open(QIODevice::ReadWrite);
        qDebug() << serial.portName();
        serial.putChar(C);
        serial.close();
        return 0;
        }
        The screen output is:

        “Port_#0004.Hub_#0004”
        QIODevice::write (QserialPort): device not open
        Press <RETURN> to close this window...

        My question is how can I send/receive data to this device.
        Thanks in advance.

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @QT_fan

        It's simple: "Serial port" != "Parallel port".

        You cannot use QSerialPort for them.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        5
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Just as a note.
          It has been years since i saw a true
          USB to Parallel Port Converter. (on windows)
          Those I have tried was made for printers and did not work with my
          Parallel device since it did not emulate a true port.
          ( its a eprom burner from ancient times)

          So what type of device is it ? ( if i may ask)

          1 Reply Last reply
          2
          • Q Offline
            Q Offline
            QT_fan
            wrote on last edited by
            #5

            The device is a CATV tuner project board which, in the original design, uses three bits of the parallel port controlled directly from a C program from Windows 95. Since I no longer have a PC which uses Windows 95 and has a parallel port I am attempting to upgrade it to use on my current computer with Windows 10 and the converter. I rewrote the program with Qt 5.14. I had previously used an FTDI USB to parallel port module with Qt 5.4 to control similar devices but the tuner has a DB25M connector. To use the FTDI module would involve rebuilding the entire board. I prefer to modify software to accommodate hardware instead of the other way around. I tried communicating with the board as if it were a printer but was unsuccessful. (Incidentally I also still have an EPROM burner from ancient times).

            This link is for the tuner website: http://www.mtmscientific.com/tuner.html

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rondog
              wrote on last edited by
              #6

              When the USB-Parallel is connected it should show up as a parallel port through the device manager (LPT1, LPT2, ...). It sounds like this is not happening which means you need a driver.

              Q 1 Reply Last reply
              2
              • R Rondog

                When the USB-Parallel is connected it should show up as a parallel port through the device manager (LPT1, LPT2, ...). It sounds like this is not happening which means you need a driver.

                Q Offline
                Q Offline
                QT_fan
                wrote on last edited by
                #7

                @Rondog
                When I plug this into a USB port it shows up in device manager as USB Printing Support. In Settings/Devices it is an "Unspecified device" with a driver of C:\WINDOWS\system32\DRIVERS\usbprint.sys. The buttons for changing the driver are all grayed out. I do not have a printer to plug the converter into. I have connected the pins to logic levels to simulate printer status signals like Select, /Busy, Paper Out, Error, etc. No luck so far. What else can I try?

                mrjjM 1 Reply Last reply
                0
                • Q QT_fan

                  @Rondog
                  When I plug this into a USB port it shows up in device manager as USB Printing Support. In Settings/Devices it is an "Unspecified device" with a driver of C:\WINDOWS\system32\DRIVERS\usbprint.sys. The buttons for changing the driver are all grayed out. I do not have a printer to plug the converter into. I have connected the pins to logic levels to simulate printer status signals like Select, /Busy, Paper Out, Error, etc. No luck so far. What else can I try?

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @QT_fan said in USB to Parallel Port Converter:

                  USB Printing Support.

                  Just as a note. I had issues using usb 3 ports with usbprint.sys so if possible try to plug it in to 2.0 port.

                  1 Reply Last reply
                  1

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved