Getting started

  • Make sure that Modbus gateway is connected to power supply and to the LAN using the patch cord

  • open the Telnet console

  • Create a new connection with the modbus gateway (gateway’s IP address will be necessary)

  • Login using your personal credentials or default login details

  • If login is successful, you will be ready to start typing configuration commands

Configuration is available only if devices are connected to the same Local Area Network as the computer you are using.

List of all commands

Command

Description

help

Print the help

conn

Print active TCP connections

net_stat

Print lwIP statistics

eth_mac

Print or change MAC address

ipconfig

Print or change the network configuration

http_port

Print or change default http port

telnet_port

Print or change default telnet port

modbus_tcp_port

Print or change modbus port

ping

Check internet connection with the desired host

restart

Restart the system

user

Print or change user configuration

sys_heap_usage

Print current heap usage

modbus

Prints or changes Modbus settings

modbus_ports

Prints or changes Modbus ports settings

modbus_routing

Prints or changes Modbus routing settings

exit

Close current CLI session

Modbus ports configuration commands

  • modbus

    • modbus help

      Prints command help

    • modbus int_addr VALUE

      Sets internal Modbus address
      Example: modbus int_addr 5

    • modbus idlet VALUE

      Shows or sets the idle TIME (in seconds) of the TCP connection after which the TCP
      connection is terminated by the converter and the TCP socket is released.
      Example: modbus idlet 720

    • If a subcommand that normally sets a value is not given an argument,
      it will print the current value.
      Example:
      #>modbus idlet
      Set idle time is 5000

  • modbus_ports

    • modbus_ports help

      Prints command help, does not require com_number

    • modbus_ports PORT_NUMBER 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: modbus_ports 1 addslaves 124
      Example: modbus_ports 1 addslaves 12-124
      Example: modbus_ports 1 addslaves 12;14;18
      Example: modbus_ports 1 addslaves 12;14-17;150-200
      Example: modbus_ports 1 addslaves 12;14-17;150-200, *

    • modbus_ports PORT_NUMBER show_slaves

      Show addresses of slaves connected to com_port.
      Example: modbus_ports 1 showslaves

    • modbus_ports PORT_NUMBER mode [ascii/rtu]

      Sets Modbus port mode to ASCII or RTU.
      Example: modbus_ports 2 mode ascii

    • modbus_ports PORT_NUMBER baud [RATE]

      Sets the baud rate to RATE. For a list of acceptable baud rates, please.
      refer to the manual.
      Example: modbus_ports 1 baud 9600

    • modbus_ports PORT_NUMBER bits [CPS]

      Sets bit count to C, parity to P, and stop bits to S. Valid values are:
      C: 7, 8 or 9
      P: N, E or O (N- none, E- even, O- odd)
      S: 1 or 2
      Example: modbus_ports 1 bits 8N1
      Example: modbus_ports 2 bits 7O1

    • modbus_ports PORT_NUMBER state [GATEWAY/ROUTER/DISABLE]

      Enable or disable uart functionality.
      Example: modbus_ports 1 state GATEWAY
      Example: modbus_ports 2 state DISABLE

    • modbus_ports PORT_NUMBER termination [on/off]

      Enable or disable termination on RS485 port.
      Example: modbus_ports 1 termination on

    • modbus_ports PORT_NUMBER slave_response_timeout TIMEOUT

      Set response timeout(serial slave) in ms. When this timeout expires,
      delayed frames are dropped.
      Example: modbus_ports 1 slave_response_timeout 2000

    • If a subcommand that normally sets a value is not given an argument,
      it will print the current value.
      Example:
      #>modbus_ports 2 baud
      Set baud rate is 115200

PORT_NUMBER is a number of ports in modbus gateway and it is counted from 0

  • modbus_routing

    • modbus_routing help

      Print routing's help

    • modbus_routing show

      Display all active routing table in system
      [LP]: [SLAVES NUMBERS] [IP/HOSTNAME] [PORT] [TIMEOUT]

    • modbus_routing add SLAVE_ADDR HOSTNAME PORT TIMEOUT

      SLAVE_ADDR with HOSTNAME PORT is used by uarts working in Modbus router mode. TIMEOUT
      (in ms) is used to close the connection if a slave is not
      responding.
      The maximum records is 8.
      One record for one adress/ip.
      Example: modbus_routing add 18 192.168.0.10 502 2000
      Example: modbus_routing add 18;25 192.168.0.10 502 2000
      Example: modbus_routing add 18-25 192.168.0.10 502 2000
      Example: modbus_routing add 18-25;* 192.168.0.10 502 2000
      Example: modbus_routing add 18-25 modbus.local 502 2000

    • modbus_routing remove [HOSTNAME_NUMBER/all]

      Remove Modbus Routing Table record
      HOSTNAME_NUMBER is line number from /show/ command
      Example: modbus_routing remove 2
      Example: modbus_routing remove all

Network settings

If you need to change network settings according to target LAN parameters, the following commands might me helpful.

  • ipconfig

    • ipconfig addr ADDRESS

      Set IP addres 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 dns1 ADDRESS

      Set primary DNS to ADDRESS, disables getting DNS from DHCP if enabled.
      Example: ipconfig dns1 192.168.100.1

    • ipconfig dns2 ADDRESS

      Set secondary DNS to ADDRESS, disables getting DNS from DHCP if enabled.
      Example: ipconfig dns2 1.1.1.1

  • eth_mac

    • eth_mac help

      Prints this help message

    • eth_mac default

      Set device’s MAC address to factory-default one

    • eth_mac set MAC_ADDR

      Set device’s MAC address to MAC_ADDR. Accepts both dash- and colon-separated formats

      Example: eth_mac set 01-02-03-04-05-06

      Example: eth_mac set 01:02:03:04:05:06

  • http_port

    • http_port help

      Print this 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 this 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

  • modbus_tcp_port

    • modbus_tcp_port help

      Print this help message

    • modbus_tcp_port PORT_NUMBER

      Set http port to PORT_NUMBER. A PORT_NUMBER value must be in range: 1-65535
      Example: modbus_port 502

    • modbus_tcp_port status

      Print current Modbus port
      Example: Modbus_port status
      A current Modbus port is 502

Changing username or password

To change username or password, use user command.

Available commands:

  • user help

    Print help
    Example: user help

  • user mod_name USER_NAME NEW_NAME

    Change the user name to NEW_NAME
    It fails in case 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
    ****** <- here is entered password, but '*' appears instead
    Note: Everyone can change the password for themselves

Additional notes

After few time of inactivity, session will be disconnected automaticly.

In case 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).

Factory reset is not available from the level of Telnet console.