I am writing an application that communicate via a serial port to an external board. In this phase i need to test the serial protocol, but the external hardware is not yet usable. Is there a way to open a terminal over a (virtual) serial port to my app?
Using the "ptmx" interface is probably the best bet. Here is an example program that will attach to
For details, see "man pty".
When you run this, it will tell you the name of the pts to attach to with your application, and you can simulate the hardware by just typing in the terminal.