Critical infrastructure

RS-232 and RS-485

Nitesh Malviya
March 4, 2020 by
Nitesh Malviya

Introduction

RS-232 and RS-485 both belong to the serial interface family. A serial interface is a communication interface in which data is transmitted bit by bit. A high logical voltage is represented as “1” and a low logical voltage is represented as “0.”

Among all the serial interfaces in the market, RS-232 and RS-485 are the oldest ones and are still widely used.

Learn ICS/SCADA Security

Learn ICS/SCADA Security

Explore realistic critical infrastructure scenarios and build your security skills with hands-on labs, on-demand courses and live boot camps.

RS-232

RS-232 stands for Recommended Standards 232. It was created in 1960 by the Electronic Industries Association (EIA) and is widely used in connecting computers and their peripheral devices. It provides a data rate of 1.42kbps and can send data up to 50 feet.

  1.  RS-232 working: RS-232 is used in connecting and transferring data between Data Transmission Equipment (DTE) and Data Communication Equipment (DCE). DTEs basically act as transmitters, while DCEs act as receivers. The following pins are used:

TXD TRANSMITTER

RXD RECEIVER

RTS REQUEST TO SEND

CTS CLEAR TO SEND

GND GROUND

From DTE, RTS generates requests to send data to DCE. From DCE, CTS clears the path to receive the data and the data is sent. Similarly, RTS generates requests and is cleared by CTS to transfer data from DCE to DTE.

  1. Electrical specifications of RS-232: The following are the electrical specifications of RS-232:
    1. Voltage levels: Voltage level in RS-232 ranges from -25V to +25V. Voltage levels are categorized as signal voltage and control voltage.

Signal voltage between -3V to -25V represents logic “0,” while signal voltage between +3V to +25V represents logic “1.” On the contrary, the control voltage between -3V to -25V represents logic “1” while signal voltage between +3V to +25V represents logic “0.” Voltage between -3V to +3V is considered to be indeterminate.

      1. Slew rate: Slew rate is the rate of change of signal levels. RS-232 supports a slew rate of up to 30V/microsecond
      2. Operation voltage: Operation voltage is 250v AC max
      3. Current rating: Current rating is 3 amps max
      4. Baud rate: RS-232 supports baud rate from 110 to 230400. 1200, 4800, 9600 and 115200 are commonly used
  • Application of RS-232:

    1. Older-generation PCs for connecting printers, modems, mouse and so on
    2. PLC machines, CNC machines and servo controllers
    3. Microcontroller boards, receipt printers, point of sale (PoS) systems and so on

RS-485

RS-485 is also known as TIA-485/EIA-485. It was widely used for connecting one DTE to one DCE and it provided a maximum speed of 20 kbps. As times changed and demand for speed and cost scaled up, industry started looking for an interface which could cater to the following needs:

  1. Faster communication rate
  2. Long-distance communication
  3. Connect directly to DTE
  4. Connect multiple DTE

Keeping in mind the above considerations, RS-485 was designed and introduced. RS-485 is the most versatile and widely-used industry communication standard, since it caters to all of the above needs. 

Using RS-485, it is possible to send data at the speed of 10 Mbps covering up to 50 feet. It is possible to send data up to the distance of 4,000 feet, but speed decreases gradually.

Data transmission in RS-485

RS-485 uses twisted-pair wire for data transmission. This means there are two wires (other than ground) for sending and receiving the data. 

RS-485 follows a master-slave arrangement for sending the data. The master device is responsible for sending the data between two or more slaves. This master device is centrally located, with two slaves on either end and all the data flow and transmission coordinated by the master device.

Key differences between RS-232 and RS-485

There is not much difference between RS-232 and RS-485. Although they are similar in look and design, there exists few differences in specification and functionality. They are:

  1. RS-232 has one sender and multiple listeners, while an RS-485 setup can have multiple senders and multiple listeners. Using RS-485, it is possible for multiple listeners and transmitters to talk to each other, which is not possible with an RS-232 setup. Thus, RS-485 supports full- and half-duplex communication, while RS-232 supports only duplex communication
  2. Designing and wiring RS-485 is easier because it involves two wires, while a typical RS-232 design involves four wires
  3. Programming RS-485 is difficult compared to RS-232. This is due to the fact that RS-485 gives only two wires for sending and receiving the data, while in RS-232 we have four wires for transmission of data
  4. RS-232 can send over a distance of 15 meters, while RS-485 can send data up to 1200 meters
  5. RS-232 supports point-to-point topology, while RS-485 supports multi-point topology

Application of RS-485

  1. Widely used in computer and automation systems
  2. Commercial aircraft cabin vehicle bus
  3. PLCs, factory floors and ICS implementation
  4. Theatre and performances venues, for controlling lighting

Security issues

Prior to the development of Ethernet, security wasn’t a large concern for RS-232 and RS-485 systems. Even now, they are rarely connected to the internet, and that provides a buffer from attack. RS-485 systems running Modbus TCP/IP are connected more often, but the added risk is minimal.

Conclusion

Both RS-232 and RS-485 are widely used serial interfaces, with each having their application as suited and required. While RS-232 is favorable for short-distance low-speed requirements, RS-485 is more suitable for high-speed and long-range for duplex communication. There are many interfaces available in the market for interfacing and connecting these interfaces, thus providing freedom to vendors to choose either of them.

Learn ICS/SCADA Security

Learn ICS/SCADA Security

Explore realistic critical infrastructure scenarios and build your security skills with hands-on labs, on-demand courses and live boot camps.

 

Sources

  1. RS485, RS422 and RS232, Omega
  2. RS232 Serial Communication Protocol: Basics, Working & Specifications, CircuitDigest
  3. What is RS232 Protocol and How it Works, Codrey
  4. RS485, specifications and in depth tutorial, Lammert Bies
Nitesh Malviya
Nitesh Malviya

Nitesh Malviya is a Security Consultant. He has prior experience in Web Appsec, Mobile Appsec and VAPT. At present he works on IoT, Radio and Cloud Security and open to explore various domains of CyberSecurity. He can be reached on his personal blog - https://nitmalviya03.wordpress.com/ and Linkedin - https://www.linkedin.com/in/nitmalviya03/.