Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a scenario where I demonstrated to my group @ work how to share a very expensive USB patient simulator plugged into a Raspberry Pi (Debian) using socat. The group wants to be able to have an on-demand, bi-directional connection to the serial device over Ethernet. Presently I have the device broadcasting via Telnet.

socat tcp-l:23,reuseaddr,fork,crlf file:/dev/ttyUSB0,echo=0,b115200,raw,crnl,icanon=1

I need to setup the consumer side whereby a Windows user connects to the Telnet port, but redirects the I/O to an available COM port on their machine. I was thinking Cygwin & socat on the Windows side, but I'm not a very skilled Windows guy.

Any ideas?

share|improve this question
add comment

1 Answer

I understood your question so that you want a Windows pc to be able share the serial port in the same way you can make a Linux box to share the port using socat.

There are open source applications for example in sourceforge.net that can connect tcp socket with a serial port in Windows. Also, just google "serial to ip" or "ip to serial". One simple example is "SerialToIP" http://sourceforge.net/projects/serialtoip/?source=directory It is developed in C#. It has command line and GUI versions available, but serial port control is minimal but that might be enough for your needs based on the socat-example.

Depending on how detailed serial port control needs you have and if your application needs to run whether a Windows user is logged in or not, you should select the application that fits your needs. GUI applications in Windows by default require the user to be logged in to work.

BTW, your socat-command has nothing to do with the Telnet-protocol. You are just creating a pure and simple TCP/IP "pipe" that connects to a serial port. Any possible top-layer protocols carried inside that "pipe" are irrelevant to the question and answers.

share|improve this answer
add comment

Your Answer

 
discard

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.