# Configuration by the Serial Console

## Modbus TCP/RTU Gateways (G20, G30)

Another way to configure the device is via a serial console. In case of the G11 - G13 Modbus gateways an additional USB/UART converter is needed.

##### Procedure to enter serial console mode

- Turn off the power of the device.
- Connect Ethernet converter to the dedicated USB/UART converter via the microUSB port (for example our [C38 converter](https://doc.redisage.com/books/usb-rs232-rs485-converters/page/usb-ftdi-converters-data-sheet)).
- Connect the USB/UART converter to the PC.
- Open the serial console (default baud rate is 115200 bps).
- Short the FG and GND ports.
- Turn on the power.
- Wait until the ST indicator (orange LED) lights up (it should light up after red light - service mode).
- Open the the FG and GND ports.
- Login using user’s personal credentials or default login details.
- If the process is successful, configuration command can be typed into the terminal.

[![image.png](https://doc.redisage.com/uploads/images/gallery/2025-08/scaled-1680-/4eeimage.png)](https://doc.redisage.com/uploads/images/gallery/2025-08/4eeimage.png)

### List of all commands

<table border="1" id="bkmrk-command-description-"><thead><tr><td aria-sort="Brak" class="ak-renderer-tableHeader-sortable-column__wrapper align-center" data-colwidth="340">**Command**

</td><td aria-sort="Brak" class="ak-renderer-tableHeader-sortable-column__wrapper align-center" data-colwidth="340">**Description**

</td></tr></thead><tbody><tr><td data-colwidth="340">help

</td><td data-colwidth="340">Print the help.

</td></tr><tr><td data-colwidth="340">conn

</td><td data-colwidth="340">Print active TCP connections.

</td></tr><tr><td data-colwidth="340">net\_stat

</td><td data-colwidth="340">Print lwIP statistics.

</td></tr><tr><td data-colwidth="340">eth\_mac

</td><td data-colwidth="340">Print or change MAC address.

</td></tr><tr><td>wifi\_mac

</td><td>Print or change Wi-Fi MAC address

</td></tr><tr><td data-colwidth="340">ipconfig

</td><td data-colwidth="340">Print or change the network configuration.

</td></tr><tr><td data-colwidth="340">http\_port

</td><td data-colwidth="340">Print or change default http port.

</td></tr><tr><td data-colwidth="340">telnet\_port

</td><td data-colwidth="340">Print or change default telnet port.

</td></tr><tr><td data-colwidth="340">modbus

</td><td data-colwidth="340">Print or changes modbus settings.

</td></tr><tr><td data-colwidth="340">ping

</td><td data-colwidth="340">Check internet connection with the desired host.

</td></tr><tr><td>defaults

</td><td>Reset application variables to defaults

</td></tr><tr><td data-colwidth="340">restart

</td><td data-colwidth="340">Restart the system.

</td></tr><tr><td data-colwidth="340">user

</td><td data-colwidth="340">Print or change user configuration.

</td></tr><tr><td data-colwidth="340">sys\_heap\_usage

</td><td data-colwidth="340">Print current heap usage.

</td></tr><tr><td data-colwidth="340">mbus

</td><td data-colwidth="340">Print or changes M-Bus ports settings.

</td></tr><tr><td>wificonf

</td><td>Wi-Fi interface configuration

</td></tr><tr><td data-colwidth="340">exit

</td><td data-colwidth="340">Exit console.

</td></tr></tbody></table>

##### Modbus ports configuration commands

- **modbus**
    - **modbus help**  
        Print command help.
    - **modbus tcp\_port PORT\_NUMBER**  
         Set modbus port to PORT\_NUMBER. A PORT\_NUMBER value must be in range:  
         1-65535  
         Example: modbus tcp\_port 502
    - **modbus tcp\_port PORT\_NUMBER**  
         Set modbus port to PORT\_NUMBER. A PORT\_NUMBER value must be in range:  
         1-65535  
         Example: modbus tcp\_port 502
    - **modbus idle\_time TIME**  
         Set the timeout when waiting for the client's data \[in miliseconds\].  
         A TIME value must be in range:  
         0-4294967295  
         Example: modbus idle\_time 50000
    - **modbus status**  
         Print current modbus tcp\_port as well as idle\_time.  
         Example: modbus status  
         A current tcp port is 502.  
         A current idle time is 50000 \[ms\].


##### M-Bus ports configuration commands

- **mbus {com\_number} {subcommand} \[arguments\]**  
     Print or change mbus\_ports configuration  
     *com\_number* - COM port number, as labeled in device's manual, to which mbus applies. This field is ignored for the subcommands 'period', 'availability' and 'help'  
     *subcommand* - subcommand to execute  
     *arguments* - subcommand parameters  
      
    
    - **mbus help**  Print current modbus tcp\_port as well as idle\_time
    - **mbus mode \[MBUS/MODBUS/DISABLED\]**  
         Sets port mode.  
         MBUS - Operates as an M-Bus master polling slave devices.  
         MODBUS - Acts as a Modbus slave, providing access to MBUS register data.
    - **mbus add\_slaves \[SLAVE\_ADDR ;/- SLAVE\_ADDR, \*\]\[\]**  
         Sets all addresses of slaves connected to com\_port.  
         A star in value means fill rest free slaves. It means all slaves that are not set to other ports will be set to this one.  
         Example: mbus 1 add\_slaves 124  
         Example: mbus 1 add\_slaves 12-124  
         Example: mbus 1 add\_slaves 12;14;18  
         Example: mbus 1 add\_slaves 12;14-17;150-200  
         Example: mbus 1 add\_slaves 12;14-17;150-200, \*
    - **mbus availability**  
         Lists the actually reachable slaves  
         Example: mbus available
    - **mbus show\_slaves**  
         Show addresses of slaves connected to com\_port  
         Example: mbus 1 show\_slaves
    - **mbus baud \[RATE\]**  
         Sets the baudrate to RATE. For a list of acceptable baudrates please  
         refer to manual.  
         Example: mbus 1 baud 9600
    - **mbus bits \[PS\]**  
         Sets parity to P and stop bits to S. Valid values are:  
         P: N, E or O  
         S: 1 or 2  
         Example: mbus 1 bits N1  
         Example: mbus 2 bits O2
    - **mbus data**  
         Show data at desired address. 'com\_number' is an address of MBUS slave  
         Example: mbus 4 data
    - **mbus period TIME**  
         Sets the period of readouts from the slaves to TIME \[in seconds\].  
         A TIME value must be in range:  
         1-4294967295  
         Example: mbus period 30
    - **mbus resp\_to TIME**  
         Sets the response timeout to TIME \[in miliseconds\].  
         A TIME value must be in range:  
         0-65535  
         Example: mbus 1 resp\_to 30
    - **mbus termination \[on/off\]**  
         Enable or disable termination on RS485 port  
         Example: mbus 1 termination on

If a subcommand which normally sets a value is not given an argument, it will print the current value.  
Example:  
 #&gt;mbus 2 baud  
 Set baudrate is 9600

##### Network settings

The following commands might be helpful to change network settings according to target LAN parameters,

- **ipconfig**
    - **ipconfig addr ADDRESS**  
         Set IP address to ADDRESS.  
          
         Example:  
         ipconfig addr 192.168.0.10
    - **ipconfig mask NETMASK**  
         Set subnet mask to NETMASK (in dot-decimal format).  
          
         Example:  
         ipconfig mask 255.255.255.0
    - **ipconfig mask BIT\_COUNT**  
         Set subnet mask to BIT\_COUNT bits.  
          
         Example:  
         ipconfig mask 24
    - **ipconfig gateway GATEWAY\_IP**  
         Set network gateway to GATEWAY\_IP.  
          
         Example:  
         ipconfig gateway 192.168.0.1
    - **ipconfig dhcp \[enable/disable\]**  
         Enable or disable DHCP client.  
          
         Example:  
         ipconfig dhcp enable
    - **ipconfig dns&lt;num&gt; ADDRESS**  
         Set DNS to ADDRESS, disable getting DNS from DHCP if enabled.  
          
         Example:  
         ipconfig dns1 192.168.100.1
    - **ipconfig default\_netif \[NETIF\_NAME\]**  
         Sets interface as a default. If interface name is not given,  
         displays current default interface.  
         Example: default\_netif e02

- **http\_port**
    - **http\_port help**  
         Print the help message.
    - **http\_port PORT\_NUMBER**  
         Set http port to PORT\_NUMBER. A PORT\_NUMBER value must be in range: 1-65535.  
          
         Example:  
         http\_port 80
    - **http\_port status**  
         Print current http port.  
          
         Example:  
         http\_port status  
         A current http port is 80
- **telnet\_port**
    - **telnet\_port help**  
         Print the help message.
    - **telnet\_port PORT\_NUMBER**  
         Set Telnet port to PORT\_NUMBER. A PORT\_NUMBER value must be in range: 1-65535.  
          
         Example:  
         telnet\_port 23
    - **telnet\_port status**  
         Print current Telnet port.  
          
         Example:  
         telnet\_port status  
         A current telnet port is 23

##### Changing username or password

To change username or password, use user command. Available commands:

- **user help**  
    Print the help message.
- **user mod\_name USER\_NAME NEW\_NAME**  
    Change the user name to NEW\_NAME. It fails if the name is used by another user.  
      
    Example:  
    user mod\_name admin NEW\_NAME
- **user passwd USER\_NAME**  
    Change USER\_NAME's password.  
      
    Example:  
    user passwd admin  
    \*\*\*\*\*\* &lt;- here is entered password, but '\*' appears instead  
      
    Note: Everyone can change the password for themselves.

### Additional notes

After some time of inactivity, session will be disconnected automatically.

In order to avoid issues like connecting to host, type “help” to get more information.

To get more details about every particular command, append “help” after each commands (example: "ipconfig help").

### Service mode

Entering the service mode is almost the same as entering the serial console. One different is to open FG and GND ports earlier (when the red LED is still blinking).

Available commands in the service mode:

<table border="1" id="bkmrk-command-description--1"><thead><tr><td aria-sort="Brak" class="ak-renderer-tableHeader-sortable-column__wrapper align-center" data-colwidth="340">**Command**

</td><td aria-sort="Brak" class="ak-renderer-tableHeader-sortable-column__wrapper align-center" data-colwidth="340">**Description**

</td></tr></thead><tbody><tr><td data-colwidth="340">help

</td><td data-colwidth="340">Print the help.

</td></tr><tr><td data-colwidth="340">credits

</td><td data-colwidth="340">Print current credits value for this device.

</td></tr><tr><td data-colwidth="340">dev\_ident

</td><td data-colwidth="340">Print the device identificator value.

</td></tr><tr><td data-colwidth="340">restart

</td><td data-colwidth="340">Restart the system.

</td></tr><tr><td>serial\_num

</td><td>Print the serial number of this device.

</td></tr><tr><td data-colwidth="340">version

</td><td data-colwidth="340">Display the bootloader version.

</td></tr><tr><td data-colwidth="340">xmodem

</td><td data-colwidth="340">Download image to the internal Flash using xmodem.

</td></tr><tr><td data-colwidth="340">defaults

</td><td data-colwidth="340">Reset application variables to defaults.

</td></tr><tr><td data-colwidth="340">ipconfig

</td><td data-colwidth="340">Print or change the network configuration.

</td></tr><tr><td data-colwidth="340">flash\_read

</td><td data-colwidth="340">Read bytes from flash memory.

</td></tr><tr><td>md

</td><td>Read bytes from memory address.

</td></tr></tbody></table>