4 ms·
I'll join the chorus praising socat, but also share my gratitude for Gerhard, the developer / maintainer. We exchanged emails back and forth about a use case I
by rgovostes 6y ago
I'll join the chorus praising socat, but also share my gratitude for Gerhard, the developer / maintainer.
We exchanged emails back and forth about a use case I had, which was to split a serial device into two PTYs, allowing a process to control one while I monitor the other with picocom. We couldn't get it to work, so I gave up, but then Gerhard wrote back a few months later saying he added it as a feature.
It can be frustrating to figure out the right incantation for some advanced use cases, but this is more a complaint about esoteric corners of the operating system than socat which exposes the full complexity to you.
One of the invocations I recently worked out was to wrap an interactive process with a PTY, so that I could make a mock serial device that emulates a piece of hardware.
socat PTY,link=/tmp/dev,rawer,wait-slave \
EXEC:"./emulator",pty,setsid,ctty,echo=0