Template:Networking rutos manual serial utilities: Difference between revisions
Template:Networking rutos manual serial utilities (view source)
Revision as of 09:45, 13 May 2024
, 13 Mayno edit summary
No edit summary |
No edit summary |
||
(60 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{Template: | {{Template: Networking_device_manual_fw_disclosure | ||
| fw_version ={{Template: | | series = {{{series}}} | ||
| name = {{{name}}} | |||
| fw_version ={{Template: Networking_device_manual_latest_fw | |||
| series = {{{series}}} | | series = {{{series}}} | ||
| name = {{{name}}} | | name = {{{name}}} | ||
}} | }} | ||
}} | }} | ||
{{#ifeq: {{{series}}}| RUT9 |<i><b>Note</b>: <b>[[{{{name}}} RS232/RS485 (legacy WebUI)#RS232|click here]]</b> for the old style WebUI (FW version {{Template: Networking_device_manual_latest_fw | series = RUT9XX}} and earlier) user manual page.</i>|}} | |||
==Summary== | ==Summary== | ||
The <b>Serial Utilities</b> page is used to make serial communication configurations of different types. | The <b>Serial Utilities</b> page is used to make serial communication configurations of different types. | ||
This manual page provides an overview of the Serial Utilities page in {{{name}}} devices. | |||
{{#ifeq: {{#expr: {{{rs232}}} or {{{rs485}}}}}| 1 |==General information==|}} | |||
{{#switch:{{{series}}}|TRB2| TRB2M = | |||
===RS232/RS485=== | |||
---- | |||
====Connector pinout==== | |||
---- | |||
For {{{name}}} pinout, please refer to <b>[[{{{name}}} Input/Output#16_pin_Connector_Pinout|Input/Output]]</b> page.| #default = | |||
{{#ifeq: {{{rs232}}} | 1 | | |||
===RS232=== | |||
---- | |||
====Connector pinout==== | |||
---- | |||
The RS232 connector type on this device is a '''DCE female'''. DCE stands for Data Communication Equipment. | |||
[[File:Services_rs232_connector.PNG|400px]] | |||
<table class="nd-othertables"> | |||
<tr> | |||
<th style="width: 30px">PIN</th> | |||
<th style="width: 60px">NAME*</th> | |||
<th style="width: 170px">DESCRIPTION*</th> | |||
<th style="width: 400px">DIRECTION ON THIS DEVICE</th> | |||
</tr> | |||
<tr> | |||
<td>1</td> | |||
<td>DCD</td> | |||
<td>Data Carrier Detect</td> | |||
<td>Output</td> | |||
</tr> | |||
<tr> | |||
<td>2</td> | |||
<td>RXD</td> | |||
<td>Receive Data</td> | |||
<td>Output</td> | |||
</tr> | |||
<tr> | |||
<td>3</td> | |||
<td>TXD</td> | |||
<td>Transmit Data</td> | |||
<td>Input</td> | |||
</tr> | |||
<tr> | |||
<td>4</td> | |||
<td>DTR</td> | |||
<td>Data Terminal Ready</td> | |||
<td>Input</td> | |||
</tr> | |||
<tr> | |||
<td>5</td> | |||
<td>GND</td> | |||
<td>Signal Ground</td> | |||
<td>-</td> | |||
</tr> | |||
<tr> | |||
<td>6</td> | |||
<td>DSR</td> | |||
<td>Data Set Ready</td> | |||
<td>Output</td> | |||
</tr> | |||
<tr> | |||
<td>7</td> | |||
<td>RTS</td> | |||
<td>Ready To Send</td> | |||
<td>Input</td> | |||
</tr> | |||
<tr> | |||
<td>8</td> | |||
<td>CTS</td> | |||
<td>Clear To Send</td> | |||
<td>Output</td> | |||
</tr>{{#ifeq:{{{series}}}|TRB1| | |||
<tr> | |||
<td>9</td> | |||
<td>RI</td> | |||
<td>Ring Indicator</td> | |||
<td>Output (connected to +3.8V permanently via a 4.7k resistor) </td> | |||
</tr>| | |||
<tr> | |||
<td>9</td> | |||
<td>RI</td> | |||
<td>Ring Indicator</td> | |||
<td>Output (connected to +5V permanently via a 4.7k resistor) </td> | |||
</tr>}} | |||
</table> | |||
====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: | |||
[[File: | [[File:Services rs232 connector female male.PNG]] | ||
See straight cable pinout below: | |||
[[File: | [[File:Straight cable pinout v2.png|400px]] | ||
---- | |||
To connect another DCE device to RUT/TRB, a Null-modem (crossed) Male/Male cable should be used: | |||
[[File:Male male rs232 cable.jpg]] | |||
See straight crossed cable pinout below: | |||
[[File:Straight crossed rs232 cable pinout v2.png|400px]] | |||
---- | |||
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.|}} | |||
{{#ifeq: {{{rs485}}} | 1 | | |||
===RS485=== | |||
---- | |||
====Connector pinout==== | |||
---- | |||
Below is a depiction of the RS485 connector pins: | |||
<table class="wikitable" style="border: 1px solid black; background: white;"> | |||
<tr> | |||
<th style="border: 1px solid black; width: 250px" colspan="3"><span style=color:#104996><b>RS485 connector pinout</b></span></th> | |||
<th style="border: 1px solid white; border-left: 1px solid black; background: white;" rowspan="7">[[File:Trb145_rs485_pinout_v1.png|130px|right|bottom]]</th> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">Pin</td> | |||
<td style="border: 1px solid black;">Name</td> | |||
<td style="border: 1px solid black;">Description</td> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">1</td> | |||
<td style="border: 1px solid black;">D_N</td> | |||
<td style="border: 1px solid black;">Driver negative signal</td> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">2</td> | |||
<td style="border: 1px solid black;">R_N</td> | |||
<td style="border: 1px solid black;">Receiver negative signal</td> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">3</td> | |||
<td style="border: 1px solid black;">GND</td> | |||
<td style="border: 1px solid black;">Device ground</td> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">4</td> | |||
<td style="border: 1px solid black;">D_P</td> | |||
<td style="border: 1px solid black;">Driver positive signal</td> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">5</td> | |||
<td style="border: 1px solid black;">R_P</td> | |||
<td style="border: 1px solid black;">Receiver positive signal</td> | |||
</tr> | |||
<tr> | |||
<td style="border: 1px solid black;">6</td> | |||
<td style="border: 1px solid black;">NC</td> | |||
<td style="border: 1px solid black;">Power input 9-30 VDC</td> | |||
<td style="border: 1px solid white; border-left: 1px solid black; width: 250px" colspan="1"><span style=color:white>filler text</span></td> | |||
</tr> | |||
</table> | |||
====Cable type==== | |||
---- | |||
Recommended cable parameters: | |||
<table class="nd-othertables"> | |||
<tr> | |||
<th style="width: 300px">PARAMETER</th> | |||
<th style="width: 850px">VALUE</th> | |||
</tr> | |||
<tr> | |||
<td>Cable Type</td> | |||
<td>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</td> | |||
</tr> | |||
<tr> | |||
<td>Characteristic cable Impedance</td> | |||
<td>120 Ω @ 1MHz</td> | |||
</tr> | |||
<tr> | |||
<td>Capacitance (conductor to conductor)</td> | |||
<td>36 pF/m</td> | |||
</tr> | |||
<tr> | |||
<td>Propagation Velocity</td> | |||
<td>78% (1.3 ns/ft)</td> | |||
</tr> | |||
</table> | |||
====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: | |||
[[File:Services rs485 formula.PNG]] | |||
Where: | |||
<ul> | |||
<li><b>L<sub>max</sub></b> - maximum cable length in meters.</li> | |||
<li><b>DR</b> - maximum data rate in bits per second.</li> | |||
</ul> | |||
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: | |||
[[File:Services rs485 4wire_v2.PNG]] | |||
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): | |||
[[File:Services rs485 2wire_v2.PNG]] | |||
|}} | |||
}} | |||
==Modem Control== | {{#ifeq:{{{modem}}}|1|==Modem Control== | ||
The <b>Modem</b> 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. | The <b>Modem</b> 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. | ||
[[File:Networking_rutos_manual_serial_utilities_modem_control_default_{{{default}}} | {{#ifeq:{{{dual_modem}}} | 1 | | ||
[[File:Networking_rutos_manual_serial_utilities_modem_control_default_{{{default}}}_dual_modem_v1.png|border|class=tlt-border]]| | |||
[[File:Networking_rutos_manual_serial_utilities_modem_control_default_{{{default}}}_v2.png|border|class=tlt-border]] | |||
}} | |||
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
Line 35: | Line 245: | ||
<tr> | <tr> | ||
<td>Enable</td> | <td>Enable</td> | ||
<td>off | <td>off {{!}} on; default: <b>off</b></td> | ||
<td>Turns the instance on or off.</td> | <td>Turns the instance on or off.</td> | ||
</tr> | </tr> | ||
Line 45: | Line 255: | ||
<tr> | <tr> | ||
<td>Device</td> | <td>Device</td> | ||
<td>{{Template: | <td>{{Template: Networking_rutos_manual_serial_ports | rs232={{{rs232}}} | rs485={{{rs485}}} | usb={{{usb}}} }}; default: <b>{{Template: Networking_rutos_manual_default_serial_port | rs232={{{rs232}}} | rs485={{{rs485}}} | usb={{{usb}}} }}</b></td> | ||
<td>Specifies which serial port will be used for serial communication.</td> | <td>Specifies which serial port will be used for serial communication.</td> | ||
</tr> | </tr> | ||
Line 55: | Line 265: | ||
<tr> | <tr> | ||
<td>Data bits</td> | <td>Data bits</td> | ||
<td>7 | 8; default: <b>8</b></td> | <td>{{#ifeq: {{{rs232}}} | 1 | 5 {{!}} 6 {{!}} 7 {{!}} 8 | 8}}; default: <b>8</b></td> | ||
<td>Number of data bits for each character.</td> | <td>Number of data bits for each character.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Stop bits</td> | <td>Stop bits</td> | ||
<td>1 | <td>1 {{!}} 2; default: <b>1</b></td> | ||
<td>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.</td> | <td>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.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Parity</td> | <td>Parity</td> | ||
<td>None | <td>None {{!}} Odd {{!}} Even {{!}} Mark {{!}} Space; default: <b>None</b></td> | ||
<td>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. | <td>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. | ||
<ul> | <ul> | ||
Line 80: | Line 290: | ||
<ul> | <ul> | ||
<li><b>RTS/CTS</b> - 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.</li> | <li><b>RTS/CTS</b> - 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.</li> | ||
<li><b>Xon/Xoff</b> - 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. | <li><b>Xon/Xoff</b> - 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.</li> | ||
</ul>|}} | </ul>|}} | ||
</td> | </td> | ||
</tr> | </tr> | ||
{{#ifeq: {{{dual_modem}}} | 1 | | |||
<tr> | |||
<td>Modem</td> | |||
<td>Primary modem{{!}} Secondary modem; default: <b>Primary modem</b></td> | |||
<td>Specifies modem, which will be used for modem control. | |||
<ul> | |||
<li><b>Primary modem</b>- enables modem control for Primary modem.</li> | |||
<li><b>Secondary modem</b>- enables modem control for Secondary modem.</li> | |||
</ul> | |||
</td> | |||
</tr> |}} | |||
<tr> | <tr> | ||
<td>Mode</td> | <td>Mode</td> | ||
Line 89: | Line 310: | ||
<td>Specifies modem control mode. | <td>Specifies modem control mode. | ||
<ul> | <ul> | ||
<li><b>Partial control</b>- enables modem control with AT commands, mobile connection will be controlled by RUTOS. | <li><b>Partial control</b>- enables modem control with AT commands, mobile connection will be controlled by RUTOS.</li> | ||
<li><b>Full control</b>- enables modem control with AT commands, mobile connection will be controlled by user. | <li><b>Full control</b>- enables modem control with AT commands, mobile connection will be controlled by user. </li> | ||
</ul> | </ul> | ||
</td> | </td> | ||
</tr>{{#ifeq: {{{rs485}}} | 1 | | </tr>{{#ifeq: {{{rs485}}} | 1 | | ||
<tr> | <tr> | ||
<td>Full Duplex</td> | <td><span style="color: purple;">RS485:</span> Full Duplex</td> | ||
<td>off | <td>off {{!}} on; default: <b>off</b></td> | ||
<td>Turns Full Duplex mode on or off. This option is available only on the RS485 device.</td> | <td>Turns Full Duplex mode on or off. This option is available only on the RS485 device.</td> | ||
</tr>|}} | </tr>|}} | ||
</table> | <tr> | ||
<td>Start up message</td> | |||
<td>string; default: <b>none</b></td> | |||
<td>Message to print to serial device when modem control is ready.</td> | |||
</tr> | |||
</table>|}} | |||
==Console== | {{#switch: {{{name}}} | TRB143 = | #default = ==Console== | ||
<b>Console</b> 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. | <b>Console</b> 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. | ||
Line 115: | Line 341: | ||
<tr> | <tr> | ||
<td>Enable</td> | <td>Enable</td> | ||
<td>off | <td>off {{!}} on; default: <b>off</b></td> | ||
<td>Turns the instance on or off.</td> | <td>Turns the instance on or off.</td> | ||
</tr> | </tr> | ||
Line 125: | Line 351: | ||
<tr> | <tr> | ||
<td>Device</td> | <td>Device</td> | ||
<td>{{Template: | <td>{{Template: Networking_rutos_manual_serial_ports | rs232={{{rs232}}} | rs485={{{rs485}}} | usb={{{usb}}} }}; default: <b>{{Template: Networking_rutos_manual_default_serial_port | rs232={{{rs232}}} | rs485={{{rs485}}} | usb={{{usb}}} }}</b></td> | ||
<td>Specifies which serial port will be used for serial communication.</td> | <td>Specifies which serial port will be used for serial communication.</td> | ||
</tr> | </tr> | ||
Line 135: | Line 361: | ||
<tr> | <tr> | ||
<td>Data bits</td> | <td>Data bits</td> | ||
<td>7 | 8; default: <b>8</b></td> | <td>{{#ifeq: {{{rs232}}} | 1 | 5 {{!}} 6 {{!}} 7 {{!}} 8 | 8}}; default: <b>8</b></td> | ||
<td>Number of data bits for each character.</td> | <td>Number of data bits for each character.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Stop bits</td> | <td>Stop bits</td> | ||
<td>1 | <td>1 {{!}} 2; default: <b>1</b></td> | ||
<td>Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to | <td>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.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Parity</td> | <td>Parity</td> | ||
<td>None | <td>None {{!}} Odd {{!}} Even {{!}} Mark {{!}} Space; default: <b>None</b></td> | ||
<td>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. | <td>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. | ||
<ul> | <ul> | ||
Line 160: | Line 386: | ||
<ul> | <ul> | ||
<li><b>RTS/CTS</b> - 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.</li> | <li><b>RTS/CTS</b> - 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.</li> | ||
<li><b>Xon/Xoff</b> - 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. | <li><b>Xon/Xoff</b> - 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.</li> | ||
</ul>|}} | </ul>|}} | ||
</td> | </td> | ||
</tr | </tr>{{#ifeq: {{{rs485}}} | 1 | | ||
<tr> | <tr> | ||
<td>Full Duplex</td> | <td><span style="color: purple;">RS485:</span> Full Duplex</td> | ||
<td>off | <td>off {{!}} on; default: <b>off</b></td> | ||
<td>Turns Full Duplex mode on or off. This option is available only on the RS485 device.</td> | <td>Turns Full Duplex mode on or off. This option is available only on the RS485 device.</td> | ||
</tr>|}} | </tr>|}} | ||
</table> | </table> }} | ||
==Over IP== | ==Over IP== | ||
The <b>Over IP</b> serial type is used to manage serial connections over a TCP/IP network. | The <b>Over IP</b> 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. | |||
[[File:Networking_rutos_manual_serial_utilities_over_ip_configuration_example_v1.png|border|class=tlt-border]] | |||
===Serial Device Configuration=== | ===Serial Device Configuration=== | ||
---- | ---- | ||
[[File: | Configure serial port communication parameters in the <b>Serial Device Configuration</b> section. | ||
[[File:Networking_rutos_manual_serial_utilities_over_ip_serial_default_{{{default}}}_v2.png|border|class=tlt-border]] | |||
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
Line 187: | Line 420: | ||
<tr> | <tr> | ||
<td>Enable</td> | <td>Enable</td> | ||
<td>off | <td>off {{!}} on; default: <b>off</b></td> | ||
<td>Turns the instance on or off.</td> | <td>Turns the instance on or off.</td> | ||
</tr> | </tr> | ||
Line 197: | Line 430: | ||
<tr> | <tr> | ||
<td>Device</td> | <td>Device</td> | ||
<td>{{Template: | <td>{{#ifeq:{{{default}}}|mbus|MBUS| {{Template: Networking_rutos_manual_serial_ports | rs232={{{rs232}}} | rs485={{{rs485}}} | usb={{{usb}}} }}}}; default: <b>{{#ifeq:{{{default}}}|mbus|MBUS| {{Template: Networking_rutos_manual_default_serial_port | rs232={{{rs232}}} | rs485={{{rs485}}} | usb={{{usb}}} }}}}</b></td> | ||
<td>Specifies which serial port will be used for serial communication.</td> | <td>Specifies which serial port will be used for serial communication.</td> | ||
</tr> | </tr> | ||
Line 207: | Line 440: | ||
<tr> | <tr> | ||
<td>Data bits</td> | <td>Data bits</td> | ||
<td>7 | 8; default: <b>8</b></td> | <td>{{#ifeq: {{{rs232}}} | 1 | 5 {{!}} 6 {{!}} 7 {{!}} 8 | 8}}; default: <b>8</b></td> | ||
<td>Number of data bits for each character.</td> | <td>Number of data bits for each character.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Stop bits</td> | <td>Stop bits</td> | ||
<td>1 | 2; default: <b>1</b></td> | <td>{{#switch: {{{name}}} | TRB143 = 1; default: <b>1</b> | #default = 1 {{!}} 2; default: <b>1</b> }}</td> | ||
<td>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.</td> | <td>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.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Parity</td> | <td>Parity</td> | ||
<td>None | <td>{{#switch: {{{name}}} | TRB143 = Even {{!}} default: Even | #default = None {{!}} Odd {{!}} Even {{!}} Mark {{!}} Space; default: <b>None</b> }}</td> | ||
<td>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. | <td>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. | ||
<ul> | <ul> | ||
Line 232: | Line 465: | ||
<ul> | <ul> | ||
<li><b>RTS/CTS</b> - 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.</li> | <li><b>RTS/CTS</b> - 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.</li> | ||
<li><b>Xon/Xoff</b> - 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. | <li><b>Xon/Xoff</b> - 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.</li> | ||
</ul>|}} | </ul>|}} | ||
</td> | </td> | ||
</tr | </tr>{{#ifeq: {{{rs485}}} | 1 | | ||
<tr> | <tr> | ||
<td>Full Duplex</td> | <td><span style="color: purple;">RS485:</span> Full Duplex</td> | ||
<td>off | <td>off {{!}} on; default: <b>off</b></td> | ||
<td>Turns Full Duplex mode on or off. This option is available only on the RS485 device.</td> | <td>Turns Full Duplex mode on or off. This option is available only on the RS485 device.</td> | ||
</tr>|}}{{#ifeq: {{{rs232}}} | 1 | | |||
<tr> | |||
<td><span style="color: green;">RS232:</span> Echo</td> | |||
<td>off {{!}} on; default: <b>off</b></td> | |||
<td> Enable serial device echo. This option is available only on the RS232 device.</td> | |||
</tr>|}} | </tr>|}} | ||
</table> | </table> | ||
Line 245: | Line 483: | ||
===Over IP Configuration Settings=== | ===Over IP Configuration Settings=== | ||
---- | ---- | ||
You can configure network related parameters of the serial connection in the <b>Over IP Configuration</b> secion. | |||
[[File:Networking rutos manual serial utilities over ip mbus configuration general_v1.png|border|class=tlt-border]] | |||
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
Line 254: | Line 495: | ||
<tr> | <tr> | ||
<td>Mode</td> | <td>Mode</td> | ||
<td><span style="color: red;">Server</span> | <td><span style="color: red;">Server</span> {{!}} <span style="color: purple;">Client</span> {{!}} <span style="color: green;">Client + server</span> {{!}} <span style="color: orange;">Bidirect</span>; default: <b>Server</b></td> | ||
<td>This device's role in the connection: | <td>This device's role in the connection: | ||
<ul> | <ul> | ||
<li><b>Server</b> - the device waits for incoming connections.</li> | <li><b>Server</b> - the device waits for incoming connections.</li> | ||
<li><b>Client</b> - the device initiates the connection.</li> | <li><b>Client</b> - the device initiates the connection.</li> | ||
<li><b>Client + server</b> - launches service in server and client(s) mode simultaneously.</li> | |||
<li><b>Bidirect</b> - acts as client by default but waits for incoming connections at the same time.</li> | <li><b>Bidirect</b> - acts as client by default but waits for incoming connections at the same time.</li> | ||
</ul> | </ul> | ||
Line 265: | Line 507: | ||
<tr> | <tr> | ||
<td>Protocol</td> | <td>Protocol</td> | ||
<td><span style="color: blue;">TCP</span> | <td><span style="color: blue;">TCP</span> {{!}} <span style="color: brown;">UDP</span>; default: <b>TCP</b></td> | ||
<td>Protocol used in the communication process.</td> | <td>Protocol used in the communication process.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><span style="color: purple;">Client: </span>Destination address</td> | ||
<td> | <td>IP {{!}} Port; default: <b>empty</b></td> | ||
<td>Specify server address and port for client to connect to. E.g first field for address second for port. 16 destination addresses are allowed. </td> | |||
</tr> | |||
<tr> | |||
<td><span style="color: red;">Server: </span><span style="color: brown;">UDP: </span> Predefined addresses</td> | |||
<td>IP {{!}} Port; default: <b>empty</b></td> | |||
<td>Set predefined IP and port for UDP connection. E.g first field for address second for port.</td> | |||
</tr> | |||
<tr> | |||
<td>Listening port</td> | |||
<td>[1..65535]; default: <b>empty</b></td> | |||
<td>When enabled, all data will be transmitted transparently.</td> | <td>When enabled, all data will be transmitted transparently.</td> | ||
</tr> | |||
</table> | |||
[[File:Networking rutos manual serial utilities over ip mbus configuration security_v2.png|border|class=tlt-border]] | |||
<table class="nd-mantable"> | |||
<tr> | |||
<th style="width: 360px>Field</th> | |||
<th>Value</th> | |||
<th>Description</th> | |||
</tr> | |||
<tr> | |||
<td>Use TLS/SSL</td> | |||
<td>off {{!}} on; default: <b>off</b></td> | |||
<td>Mark to use TLS/SSL for connection.</td> | |||
</tr> | |||
<tr> | |||
<td>TLS version</td> | |||
<td>Support all {{!}} tlsv1.0 {{!}} tlsv1.1 {{!}} tlsv1.2 {{!}} tlsv1.3; default: <b>Support all</b></td> | |||
<td>Minimum TLS version allowed to be used.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>TLS type</td> | |||
<td>Certificate based {{!}} <span style="color: blue;">Pre-Shared-Key based</span>; default: <b>Certificate based</b></td> | |||
<td>Select the type of TLS encryption.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Require certificate</td> | |||
<td>off {{!}} on; default: <b>on</b></td> | |||
<td>Demand certificate and key from peer and verify them against certificate authority.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Verify host</td> | |||
<td>off {{!}} on; default: <b>off</b></td> | |||
<td>Check if the server certificates Common Name (CN) matches hostname to which client is connecting.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Certificate files from device</td> | |||
<td>off {{!}} on; default: <b>off</b></td> | |||
<td>Choose this option if you want to select certificate files from device.<br> Certificate files can be generated <a class=link href="/system/admin/certificates/generation">here</a>.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Certificate file</td> | |||
<td>.crt file; default: <b>none</b></td> | |||
<td>Upload certificate file.</td> | |||
</tr> | |||
<tr> | |||
<td>Key file</td> | |||
<td>.key file; default: <b>none</b></td> | |||
<td>Upload key file.</td> | |||
</tr> | |||
<tr> | |||
<td>CA file</td> | |||
<td>.ca file; default: <b>none</b></td> | |||
<td>Upload CA file.</td> | |||
</tr> | |||
<tr> | |||
<td><span style="color: blue;">Pre-Shared-Key</span></td> | |||
<td>string; default: <b>none</b></td> | |||
<td>The pre-shared-key in hex format with no leading “0x”.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span style="color: blue;">Identify</span></td> | |||
<td>string; default: <b>none</b></td> | |||
<td>Specify the identity.</td> | |||
</tr> | </tr> | ||
</table> | |||
[[File:Networking rutos manual serial utilities over ip mbus configuration advanced_v3.png|border|class=tlt-border]] | |||
<table class="nd-mantable"> | |||
<tr> | <tr> | ||
<th style="width: 360px>Field</th> | |||
<th>Value</th> | |||
<th>Description</th> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Raw mode</td> | ||
<td> | <td>off {{!}} on; default: <b>on</b></td> | ||
<td> | <td>When enabled, all data will be transmitted transparently.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Remove all zeros</td> | |||
<td>off {{!}} on; default: <b>off</b></td> | |||
<td>When checked, indicates that the first hex zeros should be skipped.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Inactivity timeout</td> | ||
<td>integer; default: <b> | <td>integer [0..36000]; default: <b>300</b></td> | ||
<td> | <td>Specifies period of time in seconds, where server connection must be inactive, to disconnect client. To disable timeout input 0.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Serial | <td>Serial timeout</td> | ||
<td>integer [0..1000]; default: <b>none</b></td> | <td>integer [0..1000]; default: <b>none</b></td> | ||
<td>Specifies | <td>Specifies the maximum milliseconds to wait for serial data.</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td>Max clients</td> | |||
<td>integer [1..32]; default: <b>4</b></td> | |||
<td>Specify how many clients are allowed to connect simultaneously.</td> | |||
</tr> | |||
<tr> | |||
<td>TCP echo</td> | |||
<td>on {{!}} off; default: <b>off</b></td> | |||
<td>Enable software TCP echo.</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td> | <td>Close connections</td> | ||
<td> | <td>on {{!}} off; default: <b>off</b></td> | ||
<td>Close TCP connections everytime data is sent or received (might result in serial data loss).</td> | |||
</tr> | </tr> | ||
<tr> | |||
<td>Keep alive</td> | |||
<td><span style="color: blue;">on</span> {{!}} off; default: <b>off</b></td> | |||
<td>Enable keep alive.</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td> | <td><span style="color: blue;">Keep alive time</span></td> | ||
<td>integer [ | <td>integer [0..32000]; default: <b>0</b></td> | ||
<td> | <td>Close TCP connections everytime data is sent or received (might result in serial data loss).</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span style="color: blue;"> | <td><span style="color: blue;">Keep alive interval</span></td> | ||
<td> | <td>integer [0..32000]; default: <b>0</b></td> | ||
<td> | <td>The interval between subsequential keepalive probes.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><span style="color: blue;"> | <td><span style="color: blue;">Keep alive probes</span></td> | ||
<td> | <td>integer [0..32000]; default: <b>0</b></td> | ||
<td> | <td>The number of unacknowledged probes.</td> | ||
</tr> | </tr> | ||
</table> | </table> |