Extend the length of Serial Port Device beyond limit


RS232 Serial Port exist since the era of IBM PC as early as year 1981. Although the physical serial-port in modern computer and product had mostly replaced by USB to Serial converter, serial port is still commonly used in industrial automation environment, scientific instruments, as well as consumer products. Serial ports are still used in these areas as they are simple, cheap and their console functions are highly standardized and widespread. A serial port requires very little supporting software from the host system. (Source: Wikipedia - Serial Port).


The maximum cable length for Serial Port device is a hot discussion topic on the web. You can easily get a list on topics from Google. Theoretically, the maximum length of RS232 cable is around 15 meters. However, it's not easy to achieve the maximum length in practical where a lots of external factor may impact the maximum signal length. The maximum length for a USB to serial converter device is even shorter due to the voltage swing which is 5V / 3.V.

Besides, a device which emulate serial port using USB to serial converter always caused confusion to user as OS especially Windows automatically assigned the serial port when device is connected to USB port. The assigned port for the particular instrument is then changed when user connect device to another port. Moreover, when you have more than one USB serial port device connected to one machine, you will most probably get a list of device showing similar description if the hardware manufacturer does not correctly implement the device description.


Imagine that you need to deploy one or more RS232 based sensors in industrial environment or home automation where each sensors is intended to be installed in different area, the cable length will be a big challenge. To overcome this limitation without replacing the existing software which of the device, Protocol Converter is a possible solution to extend the RS232 device length via TCP/IP while still giving you the full control of the device from the monitoring software.

On the receiving side, you can have another machine to convert from TCP/IP to RS232. It's not necessary to be a PC running on Windows, you can even have a mini computer running on Linux environment to convert TCP/IP to RS232 using socat. If you are using another Window based machine, you can easily deploy another instance of Protocol Converter.

Besides extending the length of RS232 cable, you can also have multiple host machine connect to one device by leveraging the power of TCP Server which allow multiple incoming connection in parallel.

What Next

What if you decide to replace the original software for the device with a TCP Server interface? That's even better where you able to make one and get full control of the device with the latest coding technology. Protocol Converter may still come in handy if you want to figure out how's the existing software communicate with the device, especially when you don't have the complete updated documentation of the device.