0

I've a problem with the QExtSerialPort in QT. I'm developing for an IMX6UL CPU under a linux based operating system.

I've noticed that, at baud 9600, SIGNAL readyRead is "active" about 35ms after having sent my serial string (which is composed of 3 characters, so about 3ms)

In this way, if I try to communicate with the CPU, I can use a maximum frequency of about 30Hz, which is too low for my application.

Furthermore, if I use lower baudrates, the time of 35 ms becomes bigger ( 80ms for 4800, 175 ms for 2400).

My goal is that readyReady becomes active when I'm not transmitting for a time of 3,5 characters (i.e. or baud of 9600, a time of 3,5 / 4 ms).

Should I modify the readyread funcion?

I'd like to keep this library because I've already wrote a lot of code.

Thank you in advance

MatD
  • 97
  • 1
  • 8
  • What you're facing has nothing to do with Qt. Also note that `readyRead` is machine generated signal code that has nothing to do with serial ports and you never need to modify that. So you really meant modifying the place where `readyRead` is emitted: you'd notice that there's nothing special about that either, it's emitted as soon as the kernel notifies the userland about data being available. So your goal is to make the kernel notify you quicker. None of this has anything to do with Qt, and `QExtSerialPort` provides no flag to set low latency itself. – Kuba hasn't forgotten Monica Apr 19 '17 at 13:15
  • Thank you very much for your answer. Actually I've tried with several different serial QT libraries and I have the same problem. Your answer confirms me what I see. In your opinion is it possible to modify the kernel in order to obtain faster response? – MatD Apr 19 '17 at 14:00
  • Have you read the question and answers this is a duplicate of? – Kuba hasn't forgotten Monica Apr 19 '17 at 14:17

0 Answers0