Tunnel – Example of meter reading via IP connection for real-time readings and for Energy operator. Preference for Energy operator’s IP connection

¿Buscas alguna otra cosa?

Scenario details:

  • We need to read an energy meter, periodically, every 10 minutes through a 3G-RS232 gateway. We will call it “Real-Time” connection
  • In parallel, an energy operator (like Endesa, Iberdrola, …) once a day will establish a IP connection (i.e., a 3G-RS232 gateway AS WELL, NOT A GSM CALL) to carry out the daily meter reading
  • Operator’s IP connection should be of TOP PRIORITY. That is to say, when receiving a IP connection from the energy operator, the modem should “freeze” the ‘Real Time” connection to give way to operator’s readings. “Real Time” communication should be re-etablished after the operator’s IP connection is ended

Config.txt configuration file:

Configuration Observations
COMM_baudrate: 9600
COMM_bitsperchar: 8
COMM_autorts: off
COMM_autocts: off
COMM_stopbits: 1
COMM_parity: none

GPRS_apn: internetestatico.movistar.es
GPRS_login: MOVISTAR
GPRS_password: MOVISTAR
GPRS_timeout: 0

MTX_mode: server
MTX_model: 199801422
MTX_ping: 35
MTX_pingIP: 8.8.8.8
MTX_port: 20010
MTX_portb: 2001
1
Firewall_enabled: off
Serial port baud rate
Number of bits
No flow control
No flow control
1 stop bit
No parity
GPRS APN
GPRS Login
GPRS Password
Modem is always GPRS connected
MTX server mode
MTX terminal model
Ping every 35 minutes without comms
IP address to ping
TCP port for real time reading
ETCP port for Energy Operator
Accept incoming connections from any IP

Details:

  • RS232 port of MTX-Java-T modem is used to establish a 3G-RS232 transparent gateway
  • 2 simultaneous 3G-RS232 gateways are created. 1 in TCP20010 port, other in TCP 20011 port
  • Both gateways can’t run simultaneously. When the operator establishes connects with 20011, communications with 20010 are suspended. Then, only the operator has access to the meter
  • When the operator connection ends in 20011, communications with 20010 are resumed