Community discussions

MikroTik App
 
angelo18
just joined
Topic Author
Posts: 12
Joined: Fri May 11, 2012 11:55 am

SMS send by Dude

Mon Nov 12, 2012 9:17 pm

I want to do something like that. Dude starts using putty and I connect via ssh to mikrotik by which I can send text messages. In "execute on server" I wrote something like this:
"putty user@ip-pw pass"
How can I now add the following command to have been made ​​for the above machine:
/tool sms send usb2 "com" message = "xxxxx"
 
angelo18
just joined
Topic Author
Posts: 12
Joined: Fri May 11, 2012 11:55 am

Re: SMS send by Dude

Tue Nov 13, 2012 4:10 pm

Please help me. How do I connect using "DUDE" via ssh with "MT" and execute any command on it?
 
ditonet
Forum Veteran
Forum Veteran
Posts: 841
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: SMS send by Dude

Tue Nov 13, 2012 4:46 pm

Try to create batch file to send commands using 'Plink.exe' (it's a part of PuTTY package).
http://the.earth.li/~sgtatham/putty/0.6 ... html#plink

HTH,
Grzegorz | MTCNA, MTCRE, MTCSE | konsultacje MikroTik Warszawa
It is a book about a Spanish guy called Manual. You should read it. - Dilbert
 
angelo18
just joined
Topic Author
Posts: 12
Joined: Fri May 11, 2012 11:55 am

Re: SMS send by Dude

Wed Nov 14, 2012 1:40 pm

When I connect with plink now on Mikrotik information in the logs I get the following:
"plink -ssh user@ip -pw pass -s /tool"

"ssh error, unknown subsystem requsted"
 
ditonet
Forum Veteran
Forum Veteran
Posts: 841
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: SMS send by Dude

Wed Nov 14, 2012 11:39 pm

You did it wrong way, read chapter '7.2.2 Using Plink for automated connections' from mentioned documentation.
Proper way is:

batch code

>plink.exe IP_address -ssh -l user_name -pw user_password your_command
This works for me.

HTH,
Grzegorz | MTCNA, MTCRE, MTCSE | konsultacje MikroTik Warszawa
It is a book about a Spanish guy called Manual. You should read it. - Dilbert
 
angelo18
just joined
Topic Author
Posts: 12
Joined: Fri May 11, 2012 11:55 am

Re: SMS send by Dude

Thu Nov 15, 2012 11:29 am

Ok thanks, I did not check this.
But there was another problem. "Plink" in the sent messages will not tolerate spaces. I'd have to change all the names of the station: "station name" on "station_name". Something else you can do about it?
 
ditonet
Forum Veteran
Forum Veteran
Posts: 841
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: SMS send by Dude

Thu Nov 15, 2012 12:01 pm

Try to surround these names (or even whole command too) with double quotes
or use plink '-m' switch to specify file containing all necessary commands.

HTH,
Grzegorz | MTCNA, MTCRE, MTCSE | konsultacje MikroTik Warszawa
It is a book about a Spanish guy called Manual. You should read it. - Dilbert
 
User avatar
aacable
Member
Member
Posts: 431
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: SMS send by Dude

Sat Nov 02, 2013 2:30 pm

I want to do something like that. Dude starts using putty and I connect via ssh to mikrotik by which I can send text messages. In "execute on server" I wrote something like this:
"putty user@ip-pw pass"
How can I now add the following command to have been made ​​for the above machine:
/tool sms send usb2 "com" message = "xxxxx"
Sorry to awake a year old thread, but I thought it may be useful for others.

I have a gsm device connected with Mirkotik , and DUDE is installed on Windows base PC x86 (for send and receive purposes) , now i want to send dude sms notifications via mikrotik. download plink and use the following syntax.
c:\temp\plink.exe -ssh -l admin -pw YOURPASS 192.168.1.1 "/tool sms send phone-number=03333021909 usb3 message=[Probe.Name]_on_[Device.Name]_is_now__[Service.Status]"
Make sure yoru device name and message have no BLANK SPACES in it, thats why I used _ or -
It took me 3-4 hours just to figure out that spaces were not supported or create problems with [] or ().
hope this will help some one :)

Some reference:
http://aacable.wordpress.com/2013/11/02 ... ification/
_____________
Regard's

Syed Jahanzaib
Web: http://aacable.wordpress.com
Email: aacable [at] hotmail.com
 
Aufan388
newbie
Posts: 35
Joined: Mon Nov 09, 2015 9:20 am
Location: Poznan, Poland

Re: SMS send by Dude

Thu Nov 19, 2015 1:23 pm

Hello,

I'm having a small problem with getting some SMS, and it's only recently.

Sometime plink will send a "not working" notification and later when the device returns, we don't receive a "working" sms.

I've sent test SMSs and they've all worked with no problem. So far this issue has happened 3x in the last 2 days.

I haven't changed any configs on DUDE, would this be a plink issue or something with dude? I can't find anyhting in the forum or online about a similar issue...

any info is appreciated :)

Who is online

Users browsing this forum: borbolai and 6 guests