Important: Please read the Qt Code of Conduct -

The problem with the interprocess communication

  • Hello! I am really sorry for my bad English.

    I'm trying to create a program that will make connection with network device (switch) via TELNET protocol and execute some device configuration.

    To establish TELNET connection, my program uses another program, - "Netcat". I want to use switch output (Netcat's output stream) to control configuration process (check switch answers to my commands) and Netcat's input stream, to control switch.

    Here is my simple test program to explore this possibility:

    @#include <QCoreApplication>
    #include <QProcess>
    #include <QTimer>

    int main(int argc, char *argv[])
    QCoreApplication a(argc, argv);
    QProcess *telnet = new QProcess;

    QString location = "C:/Users/Konstantin/Desktop/nc111nt/nc";
    QStringList arguments;
    arguments << "-t" << "" << "23";
    telnet->start(location, arguments);
        return 1;
    return a.exec&#40;&#41;;


    So, in Wireshark program I see, that Netcat establish TELNET connection with, but my program doesn't show switch command promt at runtime.

    When I stop debugging process in Qt Creator, I see, that my program show switch command promt.

    Please, help me establish a process of exchange of information between Netcat program and my program at runtime.

Log in to reply