I am trying to develop a custom application which has a built-in serial port terminal, but it will be able to suspend terminal and do some I/O in the custom command and data format.
e.g. When I click "Get Data" button, the software will send some binary command and get some binary data in return and do its stuff with the data. And the terminal will ignore all of this transaction.
As I just learned, simply write()'ing to and read()'ing from /dev/ttyxx is not enough for a proper terminal connection.
What is the easiest way to include a simple terminal in my application? I don't want to use an external terminal application. I am currently examining source code of cutecom to implement it from ground up, but maybe there is an easier method.
note: please don't suggest thins like using xmodem/ymodem software, i have to use the custom commands.