Tunnel – Relays control, MTX modem digital and analog inputs from a SCADA system using Modbus TCP protocol

¿Buscas alguna otra cosa?

Scenario details:

  • It is necessary to control 4 relays located in 3 locations, as well as 4 digital inputs and 2 analog inputs. This will use 3 2G/3G/4G modems, each in a different location
  • The communication will be made from a SCADA system using Modbus TCP protocol
  • For simplicity it is intended to use SIM cards with public IP address, so it is necessary for Modbus slave devices to have some security mechanism (via Password) for Modbus communications and to prevent any intruders from acting on the relays
  • The modem must be able to be configured remotely by SMS, Telnet and Modbus

Solution: MTX-Tunnel firmware + MTX-Java-IoT/MTX-Java-T/MTX-Java-T2

Configuration example (config.txt file) for the indicated scenario:

Configuration Observations
GPRS_apn: internetestatico.movistar.es
GPRS_login: MOVISTAR
GPRS_password: MOVISTAR
GPRS_timeout: 0
MTX_PIN: 0000
MTX_mode: none
MTX_model: 199801451
MTX_ping: 35
MTX_pingIP: 8.8.8.8
MTX_rssiLevel: 10
MODBUSTCP_enabled: on
MODBUSTCP_port: 502
MODBUSTCP_password: ABCD
SMS_allPhones: on
SMS_sendIP: on
SMS_ATEnabled: on
SMS_ATResponse: on
FIREWALL_enabled: off
TELNET_enabled: on
TELNET_login: user
TELNET_password: 1234
GPRS APN from your GSM operator
GPRS Login
GPRS Password
Modem is permanently connected to GPRS
The SIM card PIN
No 3G-RS232 gateway is required
Modem model where the MTX-Tunnel is installed
Every 35 mins without communication, we will ping
Address where the ping is performed
Activate the MTX-65i coverage LED
Modbus TCP service is enabled for the MTX-Tunnel
Specifes the TCP port to use for modbus
Specifies a Password for modbus communications
Possible to send SMS with commands from phone
Modem responds with IP to a missed call or SMS
It is possible to send commands to MTX via SMS
MTX responds with SMS to a sent SMS command
It is possible to connect to the modem from any IP
We enable the Telnet of the modem
Login for Telnet
Password for Telnet

Details:

  • Remember that when specifying a Password in the MODBUSTCP_password parameter, each time your scada system establishes a communication socket with the MTX modem, you must enter the specified Password (in the case of this ABCD example) in the modbus addresses 50, 51, 52 and 53 as shown in this manual, which details the parameters MODBUSTCP_ Specifically, you need to write 65 (ASCII corresponding to A) in the register @50, 66 (ASCII corresponding to B) in the register @51, 67 (ASCII corresponding to C) in the register @52 and 68 (ASCII Corresponding to D) in register @53.
  • For simplicity’s sake we have not used it, but remember there are FIREWALL_ parameters you can use to increase the security in all communications