I'm working on an IO expansion device.
Among other things, it exposes a bunch of serial ports, which I want to expose on my Linux host as /dev/ttySomethingN
I could write a TTY kernel module for that, but I'd like to keep it on userspace for now.
The solution I've found is to use a PTY as a proxy: The master side talks to my device and the slave talks to my applications, and I use TIOCPKT_IOCTL to know when the device needs to reconfigure its speed/bits/parity/stop bits.
It works pretty well! See my source
But there is one little issue: I cannot set the number of bits (CS5/CS6/CS7) or parity (PARENB) in a PTY:
Any ideas why this restriction is in place? And how to work around it?