TRB142 RS232: Difference between revisions

From Teltonika Networks Wiki
No edit summary
No edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template: Networking_rutos_manual_rs232
{{Template: Networking_rutos_manual_rs232
<!------------------------DEVICE----------------------->
<!------------------------DEVICE----------------------->
| name     = TRB142
| name       = TRB142
| series   = TRB1
| series     = TRB1
<!----------------------SEPARATORS--------------------->
<!----------------------SEPARATORS--------------------->
| baud_rate  = 115200                                                                                            <!-- Default baud rate -->
| baud_rate  = 115200                                                                                            <!-- Default baud rate -->
| baud_rates = 300 {{!}} 1200 {{!}} 2400 {{!}} 4800 {{!}} 9600 {{!}} 19200 {{!}} 38400 {{!}}  57600 {{!}} 115200 <!-- All baud rate values-->
| baud_rates = 300 {{!}} 600 {{!}} 1200 {{!}} 2400 {{!}} 4800 {{!}} 9600 {{!}} 19200 {{!}} 38400 {{!}}  57600 {{!}} 115200 <!-- All baud rate values-->
| data_bit  = 8                                                                                                  <!-- Default data bits -->
| data_bit  = 8                                                                                                  <!-- Default data bits -->
| data_bits  = 5 {{!}} 6 {{!}} 7 {{!}} 8                                                                          <!-- All data bits values -->
| data_bits  = 5 {{!}} 6 {{!}} 7 {{!}} 8                                                                          <!-- All data bits values -->
| modem      = 1
}}
}}

Latest revision as of 14:51, 25 April 2022

Main Page > TRB Gateways > TRB142 > TRB142 Manual > TRB142 WebUI > TRB142 Services section > TRB142 RS232

The information in this page is updated in accordance with firmware version TRB1_R_00.07.10.2.

RS232 service was moved to Serial Utilities page from FW version TRB1_R_00.07.03.


Summary

The RS232 page is used to configure the operating parameter of RS232 serial connector.

This manual page provides an overview of the RS232 page in TRB142 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 +3.8V 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 RUT955, 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.

RS232 Configuration

The RS232 Configuration section is used to set up the main operating parameters and the serial type of the RS232 connector.

Field Value Description
Enabled off | on; default: off Turns the RS232 service on or off.
Baud rate 300 | 600 | 1200 | 2400 | 4800 | 9600 | 19200 | 38400 | 57600 | 115200; default: 115200 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.
Parity None | Odd | Even; 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.
  • None (N) - no parity method is used.
  • Odd (O) - the parity bit is set so that the number of "logical ones (1s)" has to be odd.
  • Even (E) - the parity bit is set so that the number of "logical ones (1s)" has to be even.
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.
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.
  • RTS/CTS - hardware handshaking. RTS and CTS are turned OFF and ON from alternate ends to control data flow, for instance when a buffer is almost full.
  • Xon/Xoff - software handshaking. The Xon and Xoff characters are sent by the receiver to the sender to control when the sender will send data, i.e., these characters go in the opposite direction to the data being sent. The circuit starts in the "sending allowed" state. When the receiver's buffers approach capacity, the receiver sends the Xoff character to tell the sender to stop sending data. Later, after the receiver has emptied its buffers, it sends an Xon character to tell the sender to resume transmission.
Serial type Console | Over IP | Modem | Modbus gateway; default: Console Specifies the serial connection type.
Look to the sections below for information on different RS232 serial type options.

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.

Over IP


The Over IP serial type is used to manage serial connections over a TCP/IP network.

Field Value Description
Protocol TCP | UDP; default: TCP Protocol used in the communication process.
Raw mode off | on; default; default: off When enabled, all data will be transmitted transparently.
Mode Server | Client | Bidirect; default: Server This device's role in the connection:
  • Server - the device waits for incoming connections.
  • Client - the device initiates the connection.
  • Bidirect - acts as client by default but waits for incoming connections at the same time.
No leading zeros off | on; default: off When checked, indicates that the first hex zeros should be skipped.
Server settings: Port integer [0..65535]; default: none Internal port number used to listen for incoming connections.
Server settings | TCP: Timeout (s) integer [0..32767]; default: 300 Specifies an inactivity time limit (in seconds) after which an inactive clients is disconnected.
Bidirect: OutputConfigurable Input/Output (3) | Configurable Input/Output (4); default: Configurable Input/Output (3) Specifies which output to manage.
Bidirect: Output state 0 | 1; default: 0 Default output state value, when the application is started.
Server settings | UDP: Number of clients 1-10; default: 1 Specifies how many UDP clients will be supported simultaneously (predefined clients does not count towards this limit).
Server settings | UDP: Predefined client 1 address ip4; default: none Specifies IP address for predefined connection 1.
Server settings | UDP: Predefined port 1 port; default: none Specifies port number for predefined connection 1.
Server settings | UDP: Predefined client 2 address ip4; default: none Specifies IP address for predefined connection 2.
Server settings | UDP: Predefined port 2 port; default: none Specifies port number for predefined connection 2.
Client settings: Server Address ip | host; default: none IP address or hostname of the server that this client will connect to.
Client settings: Port integer [0..65535]; default: none Server's listening port number.
Client settings: Reconnect interval (s) integer; default: none Time period (in seconds) between reconnection attempts in case a connection fails.
Serial device read time integer [0..1000]; default: none Specifies custom read time for the serial device.
Echo off | on; default: off Turns RS232 echo on or off. RS232 echo is a loopback test usually used to check whether the RS232 cable is working properly.
Server settings | TCP: Max clients integer [1..32]; default: 32 Specifies how many clients are allowed to connect simultaneously.
TCP: CD pin indication off | on; default: off Enable to use CD pin for TCP connection state indication.
TCP: CD pin invert off | on; default: off Change default status to active (Active when no connection).
TCP: DSR pin indication off | on; default: off Enable to use DSR pin for TCP connection state indication.
TCP: DSR pin invert off | on; default: off Change default status to active (Active when no connection).
TCP: Always reconnect off | on; default: off When enabled, a new TCP connection will be made after sending every data package.

Modem


The Modem serial type is used to manage modem functionality which could be accessed using shell interface. For this purpose you may want use such applications with CR/LF (Carriage Return, Line Feed) capable applications like PuTTY on Windows and microcom, minicom, cutecom or similar applications on Linux.

Field Value Description
Mode Partial control | Full control; default: Partial control Specifies modem control mode.
    • Partial control- enables modem control with AT commands, mobile connection will be controlled by RUTOS.
    • Full control- enables modem control with AT commands, mobile connection will be controlled by user.

Modbus gateway


The Modbus gateway serial type allows redirecting TCP data coming to a specified port to an RTU specified by the Slave ID. The Slave ID can be specified by the user or be obtained directly from the Modbus header.

Field Value Description
Listening IP ip; default: 0.0.0.0 IP address to listen for incoming connections. The default value (0.0.0.0) means that this device will listen for incoming connections on any interface or IP address.
Port integer [0..65535]; default: 502 Port number to listen for incoming connections.
Slave ID configuration type User defined | Obtained from TCP;
default: User defined
Specifies whether slave IDs are user defined or automatically obtained from TCP.
Slave ID | Permitted slave IDs integer | range of integers;
default: 1 or 1-247
Specifies the slave ID of range of permitted slave IDs. The way this field is named and its function depends on the value of the Slave ID configuration field.
A range of IDs can be specified by placing a hyphen (-) between two integer numbers. For example, if you permit slave IDs in the range of 10 to 20, you would specify it as: 10-20
You can also specify multiple values that are not connected in a range using commas (,). For example, to specify 6, 50 and 100 as permitted slave IDs, you would have to use: 6,50,100
Open port automatically off | on; default: on Automatically adds a traffic rule in the firewall configuration to open the required port for serial communication.
Caution: use with care if listening IP is left as the default value (0.0.0.0). Leaving it as such will leave the device open for remote connections on the specified port.
Echo off | on; default: off Turns RS232 echo on or off. RS232 echo is a loopback test usually used to check whether the RS232 cable is working properly.

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.