When user disconnects from socat the process terminates, so you have to restart it.
To automate this process, you can use /etc/inittab.
This file contains 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
s1:2345:respawn:/usr/bin/socat tcp-l:12001,reuseaddr,forever /dev/ttyS2,b9600,cs8,cstopb=0,raw,unlink-close=0,echo=0 |
Here
2345 -- is enumeration of runlevels for which process is started,
s1 -- is a unique sequence of 1-4 characters which identifies an entry in inittab.
This socat configuration is used to provide access to serial port (UART / RS-485) over TCP/IP.
2345 -- is enumeration of runlevels for which process is started,
s1 -- is a unique sequence of 1-4 characters which identifies an entry in inittab.
This socat configuration is used to provide access to serial port (UART / RS-485) over TCP/IP.