pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp
Here it goes:
I remember that quite some time ago I could pair 2 programs like "screen" or "minicom" using /dev/ptyp master and a corresponding /dev/ttyp slave device. These devices are gone for some time now.
Nowadays I think I have to start one of these accessing /dev/ptmx and a slave device is automatically created as /dev/pts/<something>. This auto-create seems to work.
The problem I have is that although I have rw permissions on the devices, no data is going through and I get an error.
- screen /dev/ptmx
- /dev/pts/X is created with proper perms
- screen /dev/pts/X
--> "I/O error, no pty found" or similar.
Better late than never? Reproduced here because I had a hard time finding this link:
socat PTY,link=COM8 PTY,link=COM9
This creates COM8 and COM9 as appropriate symbolic links in the current working directory; now you can open two new terminal windows in the same directory and type
and the two terminals will now be communicating. Notice that unlike pty/tty, you don't have to worry about starting up the master first anymore! (COM8 and COM9 both point to "slave" /dev/pts entities). Also, dare I point out that once socat has been called, this is just as user-friendly as com0com in Windows??
Thanks for the late (haha) follow up.
I had completely forgotten about this. I started to dig through the man-pages myself, but I didn't want to go and write C-code just for a local loop-back. And I got pretty upset about the fact that the non-multiplexed way was removed - apparently (to me) without adding a way to manage the multiplexer using something like bash.
I will remember 'socat' for the future for sure.
|All times are GMT -5. The time now is 08:39 PM.|