Example scenario details:

• The aim is to monitor the level of a water tank. To do this a GPRS modem’s analog input is used. The modem is permanently connected to GPRS and uses a card with a dynamic IP address.

• The modem must take a measurement every 5 minutes and send it to a Web server via GPRS through HTTP GET to create a LOG file with daily consumption statistics.

• Also, you must be able to access the modem’s internal webserver to check the tank’s state in real time. You must be able to change the relay, that allows the water flow input into the tank, from the internal websever. There will be no firewall to access webserver (from any IP), but it will be protected with a username and password.

Proposed solution with MTX-65IND + MTXTunnel:

telemetrias-gprs-http

 MTX-65IND + MTXTunnel configuration file for the proposed solution above:

You have to enter this into the modem’s configuration file to be able to run the application as described in the scenario.

GPRS_apn: movistar.es GPRS APN provided by the GSM operator
GPRS_login: MOVISTAR GPRS Login provided by the GSM operator
GPRS_password: MOVISTAR GPRS Password provided by the GSM operator
GPRS_timeout: 0 With 0 the modem will be permanently connected to GPRS
   
MTX_PIN: 0000 If the SIM card doesn’t have a pin, leave it as 0000
MTX_model: MTX65IND MTX65IND is the chosen MTX model
MTX_mode: none The modem isn’t set as anything (we don’t use a GPRS-Serial gateway)
MTX_urc: off We don’t need the URC information messages
   
TCP_port: 20010 The MTX TCP port that waits for IP connections (from webserver)
   
FIREWALL_enabled: off Firewall deactivated
   
WAKEUP_gpioEnabled: on The GPRS session will be activated by a digital input
WAKEUP_value: 0 It will be activated when the digital input is “0”.
   
DNS_enabled: on IP send to activated DNS
DNS_mode: http You will be informed by HTTP GET
DNS_password: 12345678 String password for more security
DNS_server: www.miweb.com:8080/datosIP.asp The modem’s telemetries and the IP will be sent to the server’s URL
DNS_extended: on We want MTXTunnel to send the GPIO and ADC statuses
DNS_period: 300 We want to send values every 300 seconds (5 minutes)
 

 

 

 

 

Comments





Example scenario details:

•6 digital inputs and 2 analog inputs must be sent to a web server via JSON object.

• MTX will collect digital and analog data every 10 minutes, sending them to the web server via JSON object. If there is no GPRS coverage or the web server isn’t available, MTX must save the data to memory (a maximum of 1000 records).

• Also you need to activate a GPRSRS232 gateway in parallel to the telemetries in order to remotely read the device. For convenience, a SIM with a fixed IP address is used.

Proposed solution with  MTX-65IND + MTXTunnel:

telemetry-gprs-json

 MTX-65IND + MTXTunnel configuration file for the proposed solution above:

You have to enter this into the modem’s configuration file to be able to run the application as described in the scenario.

Details.

1.- The JSON object send to the server via GPRS will have the following example format:
{“IMEI”:353234028103206,”P”:”ID00001″,”TS”:”11/11/12 08:31:44″,
“IO1″:1,”IO2″:0,”IO3″:1,”IO4″:1,”IO5”:0,”IO6”:0,”IO7”:1,”IO8”:0,”IO9”:1,”IO10”:0,

”AD1”:1250,”AD2”:1700}

COMM_baudrate: 9600 Serial port 1 bauds for GPRS-RS232 gateway
COMM_bitsperchar: 8 8 bits of data
COMM_autocts: on CTS hardware flow control enabled
COMM_autorts: on RTS hardware flow control enabled
COMM_stopbits: 1 1 stop bit
COMM_parity: none No parity
   
GPRS_apn: movistar.es GPRS APN provided by the GSM operator
GPRS_login: MOVISTAR GPRS Login provided by the GSM operator
GPRS_password: MOVISTAR GPRS Password provided by the GSM operator
GPRS_timeout: 0 With 0 the modem will be permanently connected to GPRS
   
MTX_PIN: 0000 If the SIM card doesn’t have a pin, leave it as 0000
MTX_model: MTX65IND MTX65IND is the chosen MTX model
MTX_mode: server The modem is set as a server
MTX_urc: off We don’t need the URC information messages
   
TCP_port: 20010 The MTX TCP port that waits for IP connections (from webserver)
   
FIREWALL_enabled: off Firewall deactivated. Connections will be accepted from any IP
   
LOGGER_enabled: on MTX Logger is enabled to store readings
LOGGER_password: ID00001 This field allows us to identify where frames come from
LOGGER_server: www.miservidorWeb.com/json.asp?data= The JSON and data will be sent to this URL
LOGGER_registerSize: 300 The MTX’s internal register size
LOGGER_numRegistersFlash: 1000 The maximum number of registers inside MTX
LOGGER_ioPeriod: 600 Every 10 minutes the modem’s digital and analog inputs will be read and sent. 

 

 

 

 

Comments