@sierdzio Thank you very much for the answer. I tried some tips, but unfortunately not all were applicable in my case, since let's say the same Q_OBJECT is missing in Qt microcontrollers. And in the examples that I'm looking at, it seems that there is no such thing (Q_OBJECT), which is why I ran into a problem, since everything works in the usual Qt for Desktop but not in Qt MCU
Sorry if used the wrong term. I am new on qt. I wanted to indicate that I read the data I wrote to the tnt0 serial port from terminal with using cat /dev/tnt0. But How can I do this with client code instead of reading from terminal. I just wanna open the tnt1 serial port from code., and I wanna read from there.
You are confusing to me.
Do you want to use /dev/tnt0 or /dev/tnt1?
With the code example you have provided, you are writing hello on serial device /dev/tnt0. Is this working?
You have defined a slot MySerialPort::readData() , which is called when data are ready to be read from serial port.
I have proposed you some changes to display debug message when slot is called. Is this slot called?
I don't know:
what kind of device is connected to this serial port?
if the serial port configuration is correct according to attached device?
the attached device communication protocol: It is a binary or text protocol? Are carriage return or line feed required?
@SGaist Your comment was very helpful. I checked the contents by printing them and saw that when I called the process, the file was still being written (since I write a JSON file from the GUI). So I added one more line QFile.close() and now the python script is called only after JSON gets written from the GUI. Now it is running fine.