Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a serial port that can receive text messages from the external device. Now I want to pass these messages to a special software. But that software can only receive TCP/IP packet. For example, I can use telnet to connect it and send the text messages. Will I emulate a NIC device? Is there free software or commercial software that can do such things?

share|improve this question
What OS? This would be fairly straightforward on linux. – Paul Dec 28 '12 at 2:35
I use Windows now. – flypen Dec 29 '12 at 3:28

I'll assume linux.

First you need to identify your serial connection, usually these are of the form /dev/ttyS0. Using dmesg | grep tty should help find it.

Next you want to set the speed of the serial connection - 9600, 8n1 is common:

stty -F /dev/ttyS0 9600 cs8 -parenb -cstopb

Now you can read the tty with cat /dev/ttyS0, however we want to direct anything coming in via the tty to a tcp connection. To do this we will use netcat:

sudo apt-get install netcat     # this is debian style package management, yours may differ

Now assuming your software is listening on IP address on port 3322, we will direct the output from cat to nc, which is netcat, which will connect and pass the incoming traffic to the service:

cat /dev/ttyS0 | nc 3322
share|improve this answer

Check out ser2net

ser2net provides a way for a user to connect from a network connection to a serial port.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.