Victor Stone
Victor Stone

Reputation: 528

Redirect TCP data to ttyS0

I have a closed application running on a different, but network accessible, Linux OS that is using SerialIO to open /dev/ttyS0.

How can I write to ttyS0 from a different device so that the existing application will see what I'm writing as actual serial data?

Ive tried quite a few different socat commands and havent had luck.

socat -d -d /dev/ttyS0,raw,echo=0,b9600 tcp-l:6174,reuseaddr
socat -d -d pty,link=/dev/ttyS0,raw,echo=0 tcp-l:6174,reuseaddr

Any ideas on what is the best way to do this so that the existing (untouchable) application will think nothing has happened?

Upvotes: 1

Views: 992

Answers (1)

Jon Trauntvein
Jon Trauntvein

Reputation: 4554

Take a look at the ser2net daemon. It is able to act as a TCP serial server for either raw or RFC2217 connections.

Upvotes: 1

Related Questions