Suchen Sie etwas anderes?
Table of Contents
Introduction
The Titan mini router family (MTX-Router-Titan-mini , MTX-Router-Titan-3G-mini, MTX-Router-Titan-3Gmini-GPS and MTX-Router-Titan-4G-mini-GPS) have a digital input in the PIN13 of their DB15 connector. That digital input has a dry contact, that is, it can be activated through GND. In order to activate the digital input, we just need to connect PIN13 with PIN14 (GND). If we want to disable it, we simply disconnect it from PIN14. That simple.
To configure Titan mini routers to send SMS messages, emails or SNMP traps when detecting a digital input (useful, for example, in cases of detection of intrusion, etc. …) is very simple.
Example Scenario
This application note will clearly explain how to configure the Titan router to send an SMS and an SNMP trap when a digital input changes. To do that, we will use the following example.
In order to achieve our goal, the Titan router can be configured in several ways. We will do it using the section “Titan Scripts” of the Titan router, because if we end up needing more digital inputs (remember the Titan mini router only has one), it would be necessary to use additional equipment that would have to be controlled from this same section.
WAN Configuration
In order to send SNMP traps via 3G or 4G network, the first thing we need to do is configure the section “WAN > Basic Settings” entering the APN, User and Password according to the SIM card being used. The following screen shows how to do that:
Let’s not forget to select Remote Management if we want to run the Titan router remotely via 3G/4G.
Titan Scripts Configuration
Titan Scrips were created to manage external Modbus RTU devices so, even if we do not use them (we are going to use the router Titan digital input), we need to configure the modbus device section. To do that, we will configure the section “External Devices > Modbus Devices” as shown next:
Then we need to configure the section “Other > Titan Scripts”. In order to send an SMS and SNMP trap every time a digital input changes, we just need to specify a script. We are going to explain it in two different steps for clarity’s sake. The next picture shows which parameters we need to configure.
Once we configure this section, the router is set. We just need to restart it so it resets to the new configuration.
Let’s see what this configuration is about. Remember a script is a simple order like:
if (condition) { action1 } else { action2 }
That is, if “condition” happens, “action 1” will be executed, and if it does not, “action 2” will. In the case of our Trap example, the condition is:
If the digital input is ‘1’…
If (DI1[]==1)
ST[.1.3.6.1.4.1.45711.1.1.11.1.1,myMessage1] “Send this SNMP trap”
on the contrary…
ST[.1.3.6.1.4.1.45711.1.1.11.1.1,myMessage0] “Send this other SNMP trap”
In the case of sending an SMS the condition is:
If the digital input is ‘1’…
If (DI1[]==1)
SS[+34666123456,myMessage1] “Send the SMS with the text myMessage1”
on the contrary…
ST[+34666123456,myMessage0] “Send the SMS with the text myMessage0”
It is also possible to send emails. The same way we have the ST (Send Trap) and SS (Send SMS) command, we have the SE (Send Email) command. A command like SE[emailaddress@gmail. com,message] would send the text “message” to emailaddress@gmail.com. To do that, we previously need to configure the section “Other > Email” as indicated in the user guide.