Olhando através do Stackoverflow, encontrei este Q & A intitulado: Convertendo dados da porta serial para TCP / IP em um ambiente Linux . Especificamente, uma das respostas a essa pergunta destacou duas ferramentas que parecem com o que você está procurando:
-
ser2net - Serial ao proxy de rede (ser2net)
ser2net provides a way for a user to connect from a network connection to a serial port. I tried all the other ones I could find and found them lacking, so I wrote my own. It provides all the serial port setup, a configuration file to configure the ports, a control login for modifying port parameters, monitoring ports, and controlling ports.
-
remtty (short for "remote tty") makes TCP connections available as pseudo ttys. It allows you to use access servers with direct access to the modems (such as Cisco NAS) as ordinary dial-out modems for faxing, sending sms or visiting BBS'. It offers functionality similar to Cisco's Dialout Utility, but on GNU/Linux instead of Windows.
Você também pode querer dar uma olhada nesta documentação que discute como usar socat
, o que eu esperaria poder fazer exatamente o que você está tentando fazer.
trecho dessa página
- You have a host with some serial device like a modem or a bluetooth interface
(modem server)
- You want to make use of this device on a different host. (client)
1) on the modem server start a process that accepts network connections and
links them with the serial device /dev/tty0:
$ socat tcp-l:54321,reuseaddr,fork \
file:/dev/tty0,nonblock,waitlock=/var/run/tty0.lock
2) on the client start a process that creates a pseudo tty and links it with a
tcp connection to the modem server:
$ socat pty,link=$HOME/dev/vmodem0,waitslave tcp:modem-server:54321
NETWORK CONNECTION
There a some choices if a simple TCPv4 connection does not meet your
requirements:
TCPv6: simply replace the "tcp-l" and "tcp" keywords with "tcp6-l" and "tcp6"
Socks: if a socks server protects the connection, you can replace the
"tcp:modem-server:54321" clause with something like
"socks:socks-server:modem-server:54321" or
"socks:socks-server:modem-server:54321,socksport=1081,socksuser=nobody"
SECURITY
SSL
If you want to protect your server from misuse or your data from sniffing and
manipulation, use a SSL connection with client and server authentication
(currently only over TCPv4 without socks or proxy).
See <a href="socat-openssl.txt">socat-openssl.txt</a> for instructions.
IP Addresses
!!! bind=...
!!! range=...
!!! lowport (for root)
!!! sourceport
!!! tcpwrap=
FULL FEATURES
$ socat -d -d ssl-l:54321,reuseaddr,cert=server.pem,cafile=client.crt,fork \
file:/dev/tty0,nonblock,echo=0,raw,waitlock=/var/run/tty0.lock
TROUBLESHOOTING
-v -x