Last active
March 31, 2025 17:48
-
-
Save PyroAVR/2ba2b3ad51c7f902cbfe6b7a8ba3912a to your computer and use it in GitHub Desktop.
Mirror a serial port with socat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socat /dev/ttyUSB2,rawer system:'tee in.log | socat stdio "pty,rawer,link=/tmp/relay" | tee out.log' | |
# this doesn't seem to work with all applications, but it's a start. Redirect your application to talk to /tmp/relay instead of /dev/ttyUSB2, in this example. | |
# IOCTLs are not transferred, so you may need to set the port speed manually with stty -F <port> <speed> <settings> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment