QSerialPort and local echo
-
I am using QSerialPort and it works well, does everything I expected. I am sending commands that end in '\r' to hardware. I get back my original command, minus the \r, followed by \n and the response to the command. So far, so good, but I asked the hardware developer if he was sending the original command back to me as described above, but he insists I have "local echo" turned-on. I don't think this is true. On Windows 10, qt6, would QSerialPort echo by default? I see in the documentation that QSerialPort does not offer control of "local echo", but what is the expected behavior? Would it vary based on the driver of the COM port itself? Looked into that a little, but find no reference at all to "local echo" in the driver documentation.
-
@Sumdood it doesn't sound like an echo issue. Somewhere along the line (either the remote app, the remote serial port driver, or your Windows serial port driver) the \r is being converted to a \n. I doubt it's happening on your machine, but if you have a communications analyzer, you could verify that.
-
@mzimmers Thanks for the reply! That is what I was thinking - that if something on my machine was "echoing", it would probably not be replacing the \r with a \n, and I could find nothing that indicated that QSerialPort would do such a thing - only that the ability to control local echo was not a part of the interface...which left me not knowing exaactly what to expect - read on one of these forums that I could get a "handle" for the port and maybe do something with that, but that was also a dead end. Will try an analyzer. Thanks again!