Tunnel – A basic example for meter reading with simultaneous GPRS connections and GSM calls

¿Buscas alguna otra cosa?

Scenario details:

  • The intention is to take electrical meter readings periodically, every 10 minutes. By obtaining readings so frequently you will access the meter via GPRS instead of with GSM calls in order to save costs
  • At the same time, the energy operator (Endesa, Iberdrola, etc.) will obtain a reading once a day with a conventional GSM call
  • The GSM call will have priority. When the modem receives a call from the operator it will “freeze” GPRS connections to allow the operator to obtain readings. Once the GSM call has ended, GPRS connections are re-established

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: movistar.es
GPRS_login: MOVISTAR
GPRS_password: MOVISTAR
GPRS_timeout: 0

MTX_mode: server
MTX_model: 199801421
MTX_ping: 35
MTX_pingIP: 8.8.8.8
MTX_radioBand: europe
TCP_port: 20010

Firewall_enabled: off
CSD_enabled: on
Serial port baud rate
Number of bits
No flow control
No flow control
1 stop bit
No parity
APN GPRS from the network operator
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
If modem is installed in Europe
Establish GPRS Gateway, read the energy meter
Accept incoming connections from any IP
Accepts GSM calls from energy operator