As we know that the router is supported by MikroTik RouterOS has a wide range of features. Because of the many features in MikroTik, there may be some features that are rarely used. So it can be likened to a forgotten feature. Well, one example is the SMS (Short Massage Service). We can find these features in the “Tools” menu.
in general we have to know the function of the feature. As well as an SMS service on mobile devices, SMS features in MikroTik also have the same function, namely Sending / Receiving SMS messages. To use this feature we also need a connection to the telecommunications provider. We can use a modem to connect to the provider and also RouterBoard that has a USB port or slot SIM 3G / 4G miniPCIe.
With this SMS feature we can use to support the networking purposes, among which,
1. Make / disable User
2. Changing the rule Queue
3. Reset / Shutdown Router
4. Monitoring Internet connection
5. Provide information if there is a link is down.
We can be more flexible and easier to manage our network. As with other examples we can reboot the router by simply sending an SMS to Mikrotik. However, to be able to do all of the above, we have to combine this feature with the existing script features in MikroTik. this example we will use a 3G USB Modem (Sierra AirCad) and RB 751U (v6.26 mipsbe). Previous note that not all devices are supported by RouterOS modem. We can see what modem devices that have been supported by RouterOS.
Setting 3G Modem dan SMS
The first, we connect the modem to the router‘s USB port. Then we check if the modem is connected to the router properly and supported by RouterOS. We can see through the menu System> Resources> select USB. Then it will appear as follows.
And we can also see it using New Terminal> type / Port Print. Then it will appear as follows.
Next we will do the configuration for the SMS feature. Select the Tools menu> SMS. Check for the option ‘recieve Enabled‘ (It has a function that can receive SMS router to run a script or command). Then specify the parameters for ‘Port‘ select USB1 (This parameter is adjusted to the current usb port for modem devices. Each router is usually different). For ‘Channel’ can be tailored to each modem devices, because each modem has a different channel.
Decide also for the parameter ‘Secret‘, for example here we fill 696969 (This serves as a password that will be used to run scripts / command when the router receives a SMS).
Finally click Apply.
This time we will try to send an SMS via Mikrotik. The trick was also easy, just click on the ‘Send SMS‘. Then we set the parameters that exist. At Port and Channel we adjust the previous configuration. On the Phone Number, enter the number that will be addressed. At SMSC, we fill in the SMS Center number of providers that we use. In the Message, we fill in the message that we send. to send a message just click the ‘Send SMS‘.
If we choose the option ‘Receive Enabled’ then the router can receive SMS and we can see in the ‘Inbox’ on the SMS Settings. In addition, we can also run scripts / command upon receiving the SMS router. For this example we will reboot the router via SMS. For its configuration is as follows. The first, we create a script that is used to reboot the router.
add name=reboot policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api
After that we tried to send an SMS from the mobile phone to the SIM numbers contained on a USB Modem with the following pattern.
:cmd 696969 script reboot
When the router is rebooted it for the option ‘Receive Enabled‘ will automatically disable ter. To overcome this, we can use a script and a scheduler to automatically activate the option.