Hi Koromix, great work on a very useful piece of software. I know this thread is getting old and I'm not sure how active you might still be with the project, but if you have the time here is a question/issue with tycmd specifically.
I have also a QT project of my own that connects to various Arduino devices including Teensys. I've been using the Qt QSerialPort class but I'd like to replace it with tycmd if possible. I am using a pre-compiled version of your
tycmd from here. I am using Qt but only to compile my own application, not your code.
It is easy enough to manipulate command-line programs using Qt's QProcess. And in testing this works well for "connecting" to my Teensy (what you call monitor-ing) with tycmd but I'm having an issue getting the serial output from the Teensy read by my Qt application.
I am using Windows 7 x64 for all my testing.
Qt as you know uses "signals and slots" and the way to do this is to connect the readyRead() or readyReadStandardOutput() signals from the tycmd process to a slot within my Qt application that will then handle the output from the Teensy and do whatever, by using readAll() or readAllStandardOutput(). However all I read after connection is the message "Monitoring '123456-Teensy'". So I know the readyRead() signal is getting sent from tycmd for that at least, and that I am able to use readAll() from the tycmd process to parse those characters, but afterwards I get nothing further even though I know my Teensy is spitting out data on the serial port.
If I connect using tycmd manually in a plain old Windows command line window I see the subsequent serial data, so tycmd has no problem receiving it but for some reason tycmd doesn't seem to be raising readyRead() when instantiated through QProcess in Qt.
Here is another strange thing which seems to be a hint. In Qt there are various settings when you create a process, one of which is setChannelProcessMode, which gives options for the output from the process. Typically we want this output to go to the application running the process, but by using the QProcess::ForwardedChannels option I can send the output instead back to the Qt Creator IDE and see it in the debug window instead. Here again the same thing initially seems to happen - after connection I see only the first message "Monitoring '123456 - Teensy'" and I can wait however long I want and none of the transmitted serial data appears. BUT, when I close the running Qt application, now all the accumulated serial data finally gets printed in one large dump to Qt Creator's debug window. So it seems tycmd was sending it all along but it was just getting buffered and never processed, I presume because tycmd is not raising QProcess.readyRead() somehow.
As you can probably tell from the words I've used I only partly know what I'm talking about but I hope I've described the issue clearly. I've looked at tycmd's source code and I'm not seeing what might be the issue, but you are dealing with low level things which are not my expertise.
My hope is that your clear familiarity with Qt might make something stand out to you that hopefully would be an easy fix, or even just point me in the general direction in your source code to what I might need to change.
Thanks in advance for any advice!