Problems on QT SerialPort



  • Dear all

    I am trying to communicate to a RS232 device. I used the example code 'simple terminal', everything works fine, I can send and receive messages. But, when I tried my code, it`s not working when I try to send messages. The receive part is working (because I trig the deceive with terminal first, and the deceive replies continually.)

    I did it like this:

    QByteArray msg = "COM,1";
    serial->write(msg );

    But, nothing happens at all, I`m not sure is the deceive receive the message or not, and also, how to send <CR> at the end of the message?

    Thanks in advance!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Without any code, it's pretty much Crystal Ball debugging. However the first thing that jumps to mind is a misconfigured port. Also did you check that you can open it successfully ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.