Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday, 24 November 2013

Mikrotik DUDE SMS Notification !



Scenario:
GSM device is connected with Mikrotik for SEND/RECEIVE purposes.
DUDE is installed in Windows base PC.
As far as my research goes, there is no direct method in Dude to send SMS using DUDE own mechanism, you must have to involve / call 3rd party tool to accomplish the sms sending task. It can be windows CLI base SMS sender program like smssender.exe/gammu for win32 , sms base HTTP gateway or whatever.
You can also connect gsm device to your windows base PC, but in my scenario, my gsm device was not supported in 64 bit version of Windows 7, that’s why I had to take a long route of sending sms via mikrotik, also my mikrotik is set to receive sms to to perform various function like reboot, wan status etc , so chill :) )
Now the simple task is that we want to send DUDE notification via SMS using Mikrotik GSM/Mobile device, Just in case any critical device/server goes down.
We have to configure both Mirkotik server as well as DUDE too. so first Mikrotik section.

MIKROTIK Section:

First make sure you have configured your gsm/mobile device properly in mikrotik and you have tested it by sending an test SMS. Read the following article for reference.
http://aacable.wordpress.com/2012/11/22/howto-enable-mikrotik-to-sendreceive-sms-using-gsm-modem/
Also don’t forget to enable SSH service in Mikrotik as we will use ssh to execute sms send command from DUDE server.
[Note: Be careful , enabling SSH service can potentially open door for some unwanted guests/possible hackers, So better to allow only DUDE server IP for ssh access via filter rule]
.

DUDE Section:

First Download PLINK which will be used to SSH in to Mikrotik and execute send sms command on behalf of dude. click here to download plink and copy it to any folder like c:\temp\ , Also turn off File Run warning from Windows Firewall.
http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe
Now at DUDE Service, on the left menu, Goto Notifications and add new one by click on + sign or right click/add.

As showed in the image below . . .

add-notify
Now use following details.
Name = SMS Notification
Type = Execute on Server
Command:
c:\temp\plink.exe -ssh -l admin -pw 123 192.168.1.11 “/tool sms send phone-number=03333021909 usb3 message=[Probe.Name]_on_[Device.Name]_is_now__[Service.Status]“
[Change the password + IP + mobile number + USB Port number from above command]
Make sure your device name and message have no BLANK SPACES in it, thats why I used underscore or dash.
It took me 3-4 hours just to figure out that spaces were not supported or create problems with brackets [( )]
hope this will help some one


As showed in the image below . . .

sms-notify-image
.
From your MAP, select the device you want to monitor and receive sms alert for.
Goto POLLING , and click on USE NOTIFICATION
Now you will “SMS NOTIFICATION” , Simply Select it, and click on APPLY/OK.
As showed in image below . . .


dude-monitor-target.
Now test it by disconnecting that target device (or for test change the IP address to some unreachable IP in target IP)
You should receive the alert on your SMS :) . Do monitor the Mikrotik LOG window for the activities. also enable GSM debug so that you can aware of its activity.



Regard’s
naveed ahmad

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT → , ,
FOLLOW US →
SHARE IT →

1 comments:

  1. The interactive presence of your brand is definitely going to help you have the increment in the sales graph. I am also using the app that allows us to receive and send sms to slack. It is a good tool that allows our customers too to send us SMS directly via their phone SMS carriers.

    ReplyDelete

 
".