Qt Serial Communication

Posted on
Active2 years, 6 months ago

I am trying to rig up some basic serial communications in QTI am getting the port COM19 from QSerialPortInfo, and I speaking successfully to the port via Arduino. However, I cannot get anything back via QT.

As you can see, I am trying a simple connection along the lines of the documentation, and one where I write out all the baud rate information. They throw two different errors.

Like I said, I am connecting via arduino to this same port and having success. Any ideas what's wrong?

Any ideas for what I am doing wrong?

Simple C class example using serial port, USB, wireless This post is part of the Practical C programming tutorial for Bioloid Here you can find a post serie about using serial port communications with C/C and C#, for Windows, Linux and microcontrollers. @segtteee said in Qt serial communication using UART: Thank you for your reply. But i can't understand that you say. Please take a look at some Qt examples to better understand how it works. My code snippets are only an example how to use the QSerialPort, they have little to do with your actual use case. Framing in serial communications August 12, 2009 at 05:16 Tags Articles, EE & Embedded, Serial port. In the previous post we've seen how to send and receive data on the serial port with Python and plot it live using a pretty GUI. Notice that the sender script (sendersim.py) is just sending one byte at a time.

My idea is to send commands to the device, and read them back to the console.

Karafun 2.6 download

This is a simple serial communication example. Contribute to KROIA/QT-Serial-Communication-example development by creating an account on GitHub. @segtteee said in Qt serial communication using UART: Thank you for your reply. But i can't understand that you say. Please take a look at some Qt examples to better understand how it works. My code snippets are only an example how to use the QSerialPort, they have little to do with your actual use case.

dsolimano
7,6923 gold badges41 silver badges57 bronze badges
baordogbaordog
1,1761 gold badge12 silver badges26 bronze badges

2 Answers

the code looks a bit confuse. You open all port available and then you try to do something wrong.

NOTE: You use a GUI application like a shell application. It is wrong.

Try:

skypjack
35.7k14 gold badges64 silver badges140 bronze badges
EliaElia

Starting with the tenth port, his name will be .COM10

You can reassign the port to a different number in Device Manager

Marat GareevMarat Gareev

Not the answer you're looking for? Browse other questions tagged c++qtserial-port or ask your own question.

QT-Software

  1. Download the Repository.
  2. Extract the Files somewhere but let the file structure the same.
  3. Open QT-Creator and open the Project by Browsering to the extractet .pro file.
  4. I usually compile with MinGW so check if you have that or try other compilers.
  5. Compile the code.
  6. The example uses only qDebug() outputs for displaying any data
    so let the console in QT-Creator open while the program is running.

Device-Software

  • I used a Arduino to communicate to the GUI.
    The code for that is in the Device-code folder

Building

CommunicationSerial
  • YES For more Information click here.
  • NO When you don't need a standalone version putt all needed .dll files to the .exe.
    In the Compiled folder, you can find all needed .dll files for the program. You can find these in your QT install folder.
    C:Qt5.10.1mingw53_32bin
    It depends on your installation and compiler.
    The folder platforms is allso needed.
    The .dll in there you can find
    E:Qt5.10.1mingw53_32pluginsplatforms

Questions?

Qt Serial Thread

  • Then contact my. (if you can)