RUT906 Serial Utilities
The information in this page is updated in accordance with firmware version RUT9M_R_00.07.10.
Summary
The Serial Utilities page is used to make serial communication configurations of different types. This manual page provides an overview of the Serial Utilities page in RUT906 devices.
General information
RS232
Connector pinout
The RS232 connector type on this device is a DCE female. DCE stands for Data Communication Equipment.
PIN | NAME* | DESCRIPTION* | DIRECTION ON THIS DEVICE |
---|---|---|---|
1 | DCD | Data Carrier Detect | Output |
2 | RXD | Receive Data | Output |
3 | TXD | Transmit Data | Input |
4 | DTR | Data Terminal Ready | Input |
5 | GND | Signal Ground | - |
6 | DSR | Data Set Ready | Output |
7 | RTS | Ready To Send | Input |
8 | CTS | Clear To Send | Output |
9 | RI | Ring Indicator | Output (connected to +5V permanently via a 4.7k resistor) |
Cables
There are two types of RS232 serial devices: DTE and DCE. DTE typically refers to the serial port on a PC or terminal, while DCE refers to communication devices. Connectors mounted on DTE are likely to be male, and those mounted on DCE are likely to be female.
This device is DCE and has a female connector.
To connect a standard DTE device, use a straight-through Female/Male RS232 cable:
See straight cable pinout below:
To connect another DCE device to RUT/TRB, a Null-modem (crossed) Male/Male cable should be used:
See straight crossed cable pinout below:
Maximum cable length is 15 meters or the cable length equal to a capacitance of 2500 pF (for a 19200 baud rate). Using lower capacitance cables can increase the distance. Reducing communication speed can also increase maximum cable length.
RS485
Connector pinout
Below is a depiction of the RS485 connector pins:
RS485 connector pinout | |||
---|---|---|---|
Pin | Name | Description | |
1 | D_N | Driver negative signal | |
2 | R_N | Receiver negative signal | |
3 | GND | Device ground | |
4 | D_P | Driver positive signal | |
5 | R_P | Receiver positive signal | |
6 | NC | Power input 9-30 VDC | filler text |
Cable type
Recommended cable parameters:
PARAMETER | VALUE |
---|---|
Cable Type | 22-24 AWG, 2 – pair (used for full-duplex networks ) or 1-pair (used for half duplex networks). One addtitional wire for ground connection is needed |
Characteristic cable Impedance | 120 Ω @ 1MHz |
Capacitance (conductor to conductor) | 36 pF/m |
Propagation Velocity | 78% (1.3 ns/ft) |
Maximum data rate vs. transmission line length
The RS485 standard can be used for network lengths up to 1200 meters, but the maximum usable data rate decreases as the transmission length increases. A device operating at the maximum data transfer rate (10 Mbps) is limited to a transmission length of about 12 meters, while a distance up to 1200 meters can be achieved at 100 Kbps. A rough relation between maximum transmission length and data rate can be calculated using this approximation:
Where:
- Lmax - maximum cable length in meters.
- DR - maximum data rate in bits per second.
Twisted pair is the preferred cable type for RS485 networks. Twisted pair cables pick up noise and other electromagnetically induced voltages as common mode signals, which are rejected by the differential receivers.
2-Wire and 4-Wire Networks
Below is an example of a 4-wire network electrical connection. There are 3 devices shown in the example. One of the devices is the "master" and other two are "slaves". Termination resistors (120 Ω each) are placed at each cable end. Four-wire networks consists of one master with its transmitter connected to each of the slaves' receivers on one twisted pair. The slave transmitters are all connected to the master receiver on a second twisted pair:
Example 2-wire network electrical connection: to enable a 2-wire RS485 configuration you need to connect D_P to R_P and D_N to R_N on the device’s RS485 socket. Termination resistors are placed at each cable end (120 Ω each):
Modem Control
The Modem serial type is used to manage modem functionality which could be accessed using shell interface. For this purpose you may want use CR/LF (Carriage Return, Line Feed) capable applications like PuTTY on Windows and microcom, minicom, cutecom or similar applications on Linux.
Status
General settings
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Turns the instance on or off. |
Name | string; default: none | Instance name, generated by the user when first creating the configuration. |
Device | RS232 | RS485 | USB RS232 interface; default: RS232 | Specifies which serial port will be used for serial communication. |
Baud rate (RS485) | integer [300..230400]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Baud rate (RS232) | integer [300..115200]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Baud rate (USB) | integer [300..4000000]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Data bits | 5 | 6 | 7 | 8; default: 8 | Number of data bits for each character. |
Stop bits | 1 | 2; default: 1 | Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to resynchronise with the character stream. Electronic devices usually use one stop bit. Two stop bits are required if slow electromechanical devices are used. |
Parity | None | Odd | Even | Mark | Space; default: None | In serial transmission, parity is a method of detecting errors. An extra data bit is sent with each data character, arranged so that the number of 1 bits in each character, including the parity bit, is always odd or always even. If a byte is received with the wrong number of 1s, then it must have been corrupted. However, an even number of errors can pass the parity check.
|
Flow control | None| RTS/CTS | Xon/Xoff; default: None | In many circumstances a transmitter might be able to send data faster than the receiver is able to process it. To cope with this, serial lines often incorporate a "handshaking" method, usually distinguished between hardware and software handshaking.
|
Mode | Partial control | Full control; default: Partial control | Specifies modem control mode.
|
RS485: Full Duplex | off | on; default: off | Turns Full Duplex mode on or off. This option is available only on the RS485 device. |
Advanced settings
Field | Value | Description |
---|---|---|
Start up message | string; default: none | Prints message to serial device when modem control is ready. |
Canonical mode | off | on; default: off | Forwards data to modem only when new line symbol ('\n') is detected. |
Console
Console mode requires no further configuration than the settings above and is used as a direct-access method to the device's shell interface. For this purpose you may want use such applications as PuTTY on Windows and microcom, minicom, picocom or similar applications on Linux.
Status
General settings
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Turns the instance on or off. |
Name | string; default: none | Instance name, generated by the user when first creating the configuration. |
Device | RS232 | RS485 | USB RS232 interface; default: RS232 | Specifies which serial port will be used for serial communication. |
Baud rate (RS485) | integer [300..230400]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Baud rate (RS232) | integer [300..115200]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Baud rate (USB) | integer [300..4000000]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Data bits | 5 | 6 | 7 | 8; default: 8 | Number of data bits for each character. |
Stop bits | 1 | 2; default: 1 | Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to resynchronize with the character stream. Electronic devices usually use one stop bit. Two stop bits are required if slow electromechanical devices are used. |
Parity | None | Odd | Even | Mark | Space; default: None | In serial transmission, parity is a method of detecting errors. An extra data bit is sent with each data character, arranged so that the number of 1 bits in each character, including the parity bit, is always odd or always even. If a byte is received with the wrong number of 1s, then it must have been corrupted. However, an even number of errors can pass the parity check.
|
Flow control | None| RTS/CTS | Xon/Xoff; default: None | In many circumstances a transmitter might be able to send data faster than the receiver is able to process it. To cope with this, serial lines often incorporate a "handshaking" method, usually distinguished between hardware and software handshaking.
|
RS485: Full Duplex | off | on; default: off | Turns Full Duplex mode on or off. This option is available only on the RS485 device. |
Over IP
The Over IP serial type is used to manage serial connections over a TCP/IP network.
Instance Example
Here's an example demonstrating Over IP in action, running in Client + Server Mode.
Serial Device Configuration
Configure serial port communication parameters in the Serial Device Configuration section.
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Turns the instance on or off. |
Name | string; default: none | Instance name, generated by the user when first creating the configuration. |
Device | RS232 | RS485 | USB RS232 interface; default: RS232 | Specifies which serial port will be used for serial communication. |
Baud rate (RS485) | integer [300..230400]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Baud rate (RS232) | integer [300..115200]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Baud rate (USB) | integer [300..4000000]; default:9600 | Data rate for serial data transmission (in bits per second (bps)). |
Data bits | 5 | 6 | 7 | 8; default: 8 | Number of data bits for each character. |
Stop bits | 1 | 2; default: 1 | Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to resynchronise with the character stream. Electronic devices usually use one stop bit. Two stop bits are required if slow electromechanical devices are used. |
Parity | None | Odd | Even | Mark | Space; default: None | In serial transmission, parity is a method of detecting errors. An extra data bit is sent with each data character, arranged so that the number of 1 bits in each character, including the parity bit, is always odd or always even. If a byte is received with the wrong number of 1s, then it must have been corrupted. However, an even number of errors can pass the parity check.
|
Flow control | None| RTS/CTS | Xon/Xoff; default: None | In many circumstances a transmitter might be able to send data faster than the receiver is able to process it. To cope with this, serial lines often incorporate a "handshaking" method, usually distinguished between hardware and software handshaking.
|
RS485: Full Duplex | off | on; default: off | Turns Full Duplex mode on or off. This option is available only on the RS485 device. |
RS232: Echo | off | on; default: off | Enable serial device echo. This option is available only on the RS232 device. |
Over IP Configuration Settings
You can configure network related parameters of the serial connection in the Over IP Configuration secion.
Field | Value | Description |
---|---|---|
Mode | Server | Client | Client + server | Bidirect; default: Server | This device's role in the connection:
|
Protocol | TCP | UDP; default: TCP | Protocol used in the communication process. |
Client: Destination address | IP | Port; default: empty | Specify server address and port for client to connect to. E.g first field for address second for port. 16 destination addresses are allowed. |
Server: UDP: Predefined addresses | IP | Port; default: empty | Set predefined IP and port for UDP connection. E.g first field for address second for port. |
Listening port | [1..65535]; default: empty | When enabled, all data will be transmitted transparently. |
Field | Value | Description |
---|---|---|
Use TLS/SSL | off | on; default: off | Mark to use TLS/SSL for connection. |
TLS version | Support all | tlsv1.0 | tlsv1.1 | tlsv1.2 | tlsv1.3; default: Support all | Minimum TLS version allowed to be used. |
TLS type | Certificate based | Pre-Shared-Key based; default: Certificate based | Select the type of TLS encryption. |
Require certificate | off | on; default: on | Demand certificate and key from peer and verify them against certificate authority. |
Verify host | off | on; default: off | Check if the server certificates Common Name (CN) matches hostname to which client is connecting. |
Certificate files from device | off | on; default: off | Choose this option if you want to select certificate files from device. Certificate files can be generated <a class=link href="/system/admin/certificates/generation">here</a>. |
Certificate file | .crt file; default: none | Upload certificate file. |
Key file | .key file; default: none | Upload key file. |
CA file | .ca file; default: none | Upload CA file. |
Pre-Shared-Key | string; default: none | The pre-shared-key in hex format with no leading “0x”. |
Identify | string; default: none | Specify the identity. |
Field | Value | Description |
---|---|---|
Raw mode | off | on; default: on | When enabled, all data will be transmitted transparently. |
Remove all zeros | off | on; default: off | When checked, indicates that the first hex zeros should be skipped. |
Inactivity timeout | integer [0..36000]; default: 300 | Specifies period of time in seconds, where server connection must be inactive, to disconnect client. To disable timeout input 0. |
Serial timeout | integer [0..1000]; default: none | Specifies the maximum milliseconds to wait for serial data. |
Max clients | integer [1..32]; default: 4 | Specify how many clients are allowed to connect simultaneously. |
TCP echo | on | off; default: off | Enable software TCP echo. |
Close connections | on | off; default: off | Close TCP connections everytime data is sent or received (might result in serial data loss). |
Keep alive | on | off; default: off | Enable keep alive. |
Keep alive time | integer [0..32000]; default: 0 | Close TCP connections everytime data is sent or received (might result in serial data loss). |
Keep alive interval | integer [0..32000]; default: 0 | The interval between subsequential keepalive probes. |
Keep alive probes | integer [0..32000]; default: 0 | The number of unacknowledged probes. |
IP Filter
The IP Filter section is used for configuring which network is allowed to communicate with the device. You may add a new instance by selecting the Interface and pressing Add.
Then enter the IP address and save.