--- title: "Modbus Gateway | Configuration | N3uron KB V1.21" slug: "modbus-gateway-configuration" description: "Modbus Gateway is a N3uron module designed to increase the number of simultaneous connections to Modbus devices whose available connections are restricted" updated: 2023-06-27T09:32:04Z published: 2023-06-27T09:32:04Z canonical: "docs.n3uron.com/modbus-gateway-configuration" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.n3uron.com/llms.txt > Use this file to discover all available pages before exploring further. # Configuration Note:Before starting configuration, a new module instance must be created .[Click here for more information about creating Module instances](/v121/docs/platform-create-new-module-instance). Each module has an API and Logger section that need to be configured separately. The default settings will be sufficient for this, but users will need to actively open the API and Logger configuration settings and save the default values to fully apply the settings .[Click here for more information about API and Logger Configuration](/v121/docs/platform-api-and-logger-configuration). Note:Please note that starting from **N3uron** version **1.21.5**, the API section has been completely removed from the configuration options. ## Module Configuration ![Figure 1- Channel Creation](https://cdn.document360.io/54093ab5-6b22-4542-a265-04377931f11a/Images/Documentation/Figure%201-%20Channel%20Creation.png)Figure 1. Channel Creation As shown in the previous screenshot, multiple connections can be created in the Model Panel by clicking on the burger menu icon. Each connection is named **Channel**. See below for an explanation of the different configuration options. ## Channel Configuration A channel represents the physical medium of connecting one device. Each channel has the following parameters: - **Data collection:** When disabled, the connection will remain inactive. The default value is set to Enabled. - **Timing:** - **Request Timeout:** Maximum amount of time to wait for a valid response, displayed in milliseconds. The valid range is 100ms to 600,000ms. The default value is set to 3,000ms. - **Inter-request Delay:** Delay before sending subsequent requests to the target device, displayed in milliseconds. The valid range is 0ms to 600,000ms. The default is 0ms. - **Connection:** - **Type:** Specifies the connection type that will be established: - **TCP** - **Serial** When connecting via **TCP,** the following options are displayed: - **Modbus Mode:** Specifies the Modbus working mode: - **TCP:** Modbus TCP. - **RTU encapsulated:** Modbus RTU encapsulated over TCP. - **Config** - **Host:** Hostname or IP address of the target device. - **TCP port:** Determines which TCP Port to connect to. Valid values range from 1 to 65535. - **Reconnect delay:** Time before trying to re-open the connection after a failed attempt, displayed in milliseconds. The minimum value is 1,000ms. Whereas, **Serial** channels include the following available options: - **Modbus Mode:** Specifies the Modbus working mode. In this case, there is only one option: - **RTU:** Modbus RTU. - **Config** - **Port name:** Serial port as displayed by the operating system. For example, if **N3uron** is running on Windows, valid port names would be COM1, COM2, and so forth. If running on Linux, valid port names would be /dev/ttyS0, /dev/ttyS1, and so forth. - **Reconnect delay:** Time before trying to re-open the serial port after a failed attempt, displayed in milliseconds. The minimum value is 1,000ms. - **Port settings:** - **Baud rate:** Serial port transfer speed in milliseconds. Valid values are 110, 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, or 115200. - **Data bits:** Specifies the number of data bits per data word. Valid values are 5, 6, 7, or 8. - **Stop bits:** Specifies the number of stop bits per data word. Valid values are 1 or 2. - **Parity:** Specifies the type of parity for data. Valid values are None, even, mark, odd, or space. - **Flow Control:** Enables the use of RTS and DTR control lines. There are 3 options: None, RTS/CTS (RS232), and RTS (RS485/RS422). - **Buffer size:** Specifies the Serial communication buffer capacity. The valid range is 128 to 65536. ## TCP Server Configuration Regardless of the type of connection, Serial or TCP, a device (Channel) can have as many TCP Servers as needed. As shown in the image below, to create a new TCP Server click on the ellipsis button and select **New TcpServer**. ![Figure 2- TCP Server configuration](https://cdn.document360.io/54093ab5-6b22-4542-a265-04377931f11a/Images/Documentation/Figure%202-%20TCP%20Server%20configuration.png)Figure 2. TCP Servers creation Available configuration options for **TCP Servers** include: - **TCP Port:** Specifies the port number for incoming connections. The valid range 1 to 65535, the default value is 3005. Note:Make sure the port number is not used by any other application. - **Network Interface:** Specifies the interface via which the **TCP Server** will be accessible. If set to 0.0.0.0, the **TCP Server** will listen to connections on all interfaces. If set to 127.0.0.1 or localhost, the **TCP Server** will only listen to local applications. In addition to the above options, the IP address for a specific network interface can also be set to only allow connections from that interface. Note:In order to allow incoming connections from a specific network card, users will need to enter its IP address. - **Modbus Mode:** Defines the connection mode. The available options are: - TCP - RTU encapsulated - **Priority:** The priority of this **TCP Server** over the rest of **TCP Servers** on this channel. The valid range is 1 (highest priority) to 10 (lowest priority). The priority must be different for each gateway sharing the same channel. The default value is 1. - **Max. connections:** The maximum number of TCP clients supported by this server. Set to 0 to disable the limit. ![Figure 3- TCP Connection Configuration](https://cdn.document360.io/54093ab5-6b22-4542-a265-04377931f11a/Images/Documentation/Figure%203-%20TCP%20Connection%20Configuration.png)Figure 3. TCP connection configuration ![Figure 4- Serial connection configuration](https://cdn.document360.io/54093ab5-6b22-4542-a265-04377931f11a/Images/Documentation/Figure%204-%20Serial%20connection%20configuration.png)Figure 4. Serial connection configuration