Tunnel – Advanced Tunnel 4G-RS232. Set up the modem as a TCP/IP Server connected occasionally when a GPIO and ADC level changes

¿Buscas alguna otra cosa?

Scenario details:

  • There are several devices with an RS232 port and they need to be monitored from a Central PC via a Tunnel 4G-RS232
  • We will very rarely need to access the RS232 devices, only when there is a special incoming SMS/missed call, when there is a change from “0” to “1” on a digital input or when the level of the Analog/Digital converter of the modem is below 500mV or above 1500mV
  • Therefore, the 4G-RS232 Tunnel should be activated for 10 minutes when it receives a missed call or a special SMS with the word “on” from any phone number or when the trigger is met for the Analog/Digital input. If there is a call or SMS, the MTX Tunnel will return an SMS with the IP address from the GSM operator because SIM cards with a dynamic IP will be used. The modem must also send its current IP address, the GPIOs and ADCs readings to a server and to a Control Centre (to report the event)

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

Config.txt configuration file:

Configuration Observations
COMM_baudrate: 9600
COMM_bitsperchar: 8
COMM_autocts: on
COMM_autorts: on
COMM_stopbits: 1
COMM_parity: none
GPRS_apn: movistar.es
GPRS_login: MOVISTAR
GPRS_password: MOVISTAR
GPRS_DNS: 8.8.8.8
GPRS_timeout: 10
MTX_model: MTX-4G-JAVA-IOT-STD-N
MTX_mode: server
MTX_urc: off
TCP_port: 20010
FIREWALL_enabled: off
SMS_sendIP: on
SMS_alPhones: on
WAKEUP_gpioEnabled: on
WAKEUP_gpioValue: 1
WAKEUP_adcEnabled: on
WAKEUP_adcValueMin: 500
WAKEUP_adcValueMax: 1500
DNS_enabled: on
DNS_server: 200.201.202.203
DNS_mode: socket
DNS_password: 12345678
DNS_port: 20000
Serial port baud rate
8 bit data
CTS hardware control enabled
RTS hardware control enabled
1 stop bit
No parity
GPRS APN from your network operator
GPRS Login
GPRS Password
Google DNS. Must be used if TCP_IP is set to DNS
Connected for 10 min if there’s no serial data traffic
MTXTerminal modem model used
TCP server mode
URC messages will not be sent
TCP port used
Accepts incoming connections from any IP
GPRS IP sent by SMS to mobile call or SMS text “on”
All number phones are authorized
3G-RS232 active when GPIO input level changes
Active when GPIO input level changes to “1”
3G-RS232 active by ACD1
3G-RS232 active when Analog input level below 500mV
3G-RS232 active when Analog input level above 1500mV
Enables DNS service
Server DNS IP address
DNS communication socket type
Password string sent in DNS communication
DNS server port used