Philipp's Computing Blog

Success is about speed and efficiency

Make RS232 Serial Devices Accessible via Ethernet

Standards

The RFC 2217 standardizes the transmission of serial connection data via Ethernet, allowing to change remote serial port parameters (such as speed, parity, stop bits) over TCP using NVT (Network Virtual Terminal).

Implementations

Connection between your serial device and the Ethernet

Connection from Ethernet to a virtual com port / serial port on your computer

  • socat
    use like this: socat PTY,link=/dev/YPort TCP:192.168.1.5:7970
    or on Mac: socat GOPEN:/dev/ptyp0,ignoreeof TCP:10.0.1.93:10002 (and open /dev/ttyp0 in your application as serial port)
  • HW VSP3 - Virtual Serial Port for Windows (Freeware)

More open source solutions

  • com0com - virtual serial port tools for Windows: com0com (null modem), com2tcp (COM port to TCP redirector), hub4com (COM port sharing))
  • MultiCom for Mac. TTY ↔ IP ↔ PTY (Serial to TCP to Pseudo-Serial). Verified on Snow Leopard. Also verified multiple instances of app function with each other (in Terminal: open -na MultiCom OR open -n \Applications\Multicom)
  • netfwd can be used as raw protocol server/client for BSD operating systems (e.g. OpenBSD)
  • remserial acts as a bridge between a TCP/IP network port and a linux character device (tty for example).
  • serproxy
  • socat - available in most linux distros, can link many socket based connections together, including serial ports, a branch with RFC2217 support exists
  • ser2sock.c - Mirrors or duplicates the serial data so all connected sockets can see the same serial message (Linux,BSD,...)
  • termnetd

Solutions that cost money & seem to be too expensive

Hardware Solutions

  • EXSYS EX-6030
  • ROLINE RS-232 over Ethernet Adapter
  • WIZnet WIZ110SR

Some Notes

  • virt-install supports virtual serial ports using a command line parameter similar to this: --serial tcp,host=:2222,mode=bind,protocol=telnet

Resources