Hi, Currently libserialport fails to use PTYs under Linux due to several reasons: * PTYs do not have entries under /sys/class/tty for each created pts (only /dev/pts/X entries) * Some TTY operations are not supported by PTYs (TIOCMGET, etc) Most terminal/serial applications are able to handle PTYs gracefully (minicom, gtkterm), but not sigrok. PTY support is useful for using hardware emulators and/or to use bridging software when there is no low-level access to the communication channel (only via an external API). I managed to implement a few changes that do allow PTY support, mostly by modifying get_port_details() and get_config()/set_config(). It uses an extra variable in the sp_port definition, but could as well use a separate transport enumerator entry (alternatively it can ignore TIOCxx return values as other serial applications do) If there is interest I can provide a patch with minimal support for PTYs (which I believe does not break any other functionality).
Hi Alvie, There's actually already a pull request for PTY support here: https://github.com/sigrokproject/libserialport/pull/4 I had some issues with it and I think it needs a bit more work, but could you have a look at it and see if it would cover your needs?