Community discussions

 
ahead
just joined
Topic Author
Posts: 17
Joined: Sat Sep 24, 2011 11:22 pm

How initialized a variable by SMS ??

Tue Jan 31, 2012 9:09 pm

I want to know How initialized a variable by sending SMS to mikrotik?

I do these steps:
1-Create a startup script in (\system\schedule) like this:
01.JPG
2-Create another script named SMSScript in (\system\scripts) like this:
02.JPG

3-Send a SMS To mikrotik,such as:
:cmd mypass script SMSScript myvar=value2

After that, the SMS received and the script runs.
But variable (myvar) did not receive the new value.
03.JPG
Where is the problem?????? :( :?
___I also use this Link for my purpose : http://wiki.mikrotik.com/wiki/Manual:Tools/Sms
You do not have the required permissions to view the files attached to this post.
 
ahead
just joined
Topic Author
Posts: 17
Joined: Sat Sep 24, 2011 11:22 pm

Re: How initialized a variable by SMS ??

Fri Feb 10, 2012 8:10 pm

wow, More than 50 visitors and no one had any advice. :?: :-|
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How initialized a variable by SMS ??

Sat Feb 11, 2012 1:04 pm

I don't think you're actually setting a value with the line
:global myvar
to begin with.

Try to explicitly set it to an empty string or whatever you want the new value to be, like:
:global myvar ""
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
User avatar
marria
newbie
Posts: 31
Joined: Sat Jun 04, 2011 8:41 pm

Re: How initialized a variable by SMS ??

Tue Aug 14, 2012 1:06 am

Well, you got some advice. How did it work out?
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Thu Aug 30, 2012 1:52 pm

Hello MikroTik forum,

it is not working also for me with suggested examples. I created Ticket#2012083066000462 for this, let's hope that we will get the solution.
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Wed Sep 05, 2012 5:52 pm

Hello MikroTik forum members,

there was a bug confirmed by MikroTik team, it should be fixed in next release.
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: How initialized a variable by SMS ??

Mon Oct 29, 2012 9:41 am

3.30-5.21 the bug very long!! :D
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Mon Oct 29, 2012 9:53 am

Last reply from MikroTik support is that the bug will be fixed in 6.x version, in next release from 6.0r2, I'm keeping the ticket opened for this :)
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Wed Jan 09, 2013 6:01 pm

There was no update from MikroTik support team for more than month, I have opened a new ticket for this bug - Ticket#2013010766000731
 
Largelos
just joined
Posts: 9
Joined: Thu Jan 31, 2013 1:24 pm

Re: How initialized a variable by SMS ??

Thu Jan 31, 2013 1:25 pm

DjM, any news?
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Thu Jan 31, 2013 2:22 pm

Unfornatelly nothing - no information in changelog of ROS 5.x or 6.x, also no asnwer on both support tickets.

@MikroTik support team: Please provide update on this issue which is open for more than 2 months.

Thank you
 
HaPe
Member Candidate
Member Candidate
Posts: 232
Joined: Fri Feb 10, 2012 10:24 pm
Location: Poland

Re: How initialized a variable by SMS ??

Tue Mar 05, 2013 7:09 pm

Any progress?
In anticipation on new The Dude release.
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Mon Jun 03, 2013 10:57 am

There is still no update from MikroTik support team's side on [Ticket#2013010766000731]. There was no reply on reminders send on 29/May and 21/May, also no information in releaselog of ROS that the issue has been fixed. I have send another reminder to support team on 03/June, let's hope that there will be an answer. :?

Update on 4/June 2013:
I have received information from MikroTik support team, that bug is reported to developers, but there is no ETA/schedule, when the bug will be fixed :?
 
lelmus
just joined
Posts: 20
Joined: Wed Oct 17, 2012 5:50 am

Re: How initialized a variable by SMS ??

Thu Aug 08, 2013 4:20 am

:global FanTempCount;

:if ($FanTempCount >= 0) do={
} else={
:set FanTempCount 0;
}
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: How initialized a variable by SMS ??

Sun Aug 18, 2013 12:58 pm

hold on!
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Mon Sep 09, 2013 11:57 am

Hello MikroTik support team,

what is the current status of solving this bug, please?

Thank you
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: How initialized a variable by SMS ??

Tue Sep 24, 2013 8:14 am

hold on!
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: How initialized a variable by SMS ??

Mon Oct 28, 2013 4:43 pm

Ticket#2013010766000731
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Tue Oct 29, 2013 12:05 am

Hi vipe,

can you, please, share more details about your ticket?

Thank you
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1122
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: How initialized a variable by SMS ??

Wed Nov 06, 2013 4:57 pm

So, um, has this seriously NOT been working for the last 2 years?
I just tried to implement argument passing from a SMS, but I found it doesnt work.

So right now I dont know if Im doing something wrong, or if this is still broken.
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Wed Nov 06, 2013 9:28 pm

Hi tomaskir,

unfortunatelly the bug is still here, there is no update from MikroTik support team about ETA or fixing of reported issue :( Bug is confirmed, all technical details were provided in ticket mentioned at the beginning of this topic.
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1122
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: How initialized a variable by SMS ??

Thu Nov 07, 2013 2:56 am

So just to confirm, there is currently no way to pass an argument to a script from a SMS?

And this has been broken for 2 years?
Unimus - configuration management, automation and backup solution
Mass Config Push, network-wide RouterOS upgrades, and more!
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Thu Nov 07, 2013 7:48 pm

The bug was officially reported by my ticket on 08/2012, from this time I don't have any information about bug fix. I also don't know about any other way how to pass argument via SMS to script.
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: How initialized a variable by SMS ??

Sun Nov 10, 2013 8:39 pm

up,thx.
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Thu Jan 30, 2014 1:33 pm

MikroTik support team,

any news on this topic, please?
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Mon Feb 16, 2015 5:16 pm

After years it seems that we get this working:

1) Make sure that there is no ":local" or ":global" definition of used variables in the script code (variable name used in SMS text cannot be declared/initialized in script source code)

2) Make sure that the variables are not defined in the "/system script variable"

Example code:
:log info ("var1 = $var1, var2 = $var2");
 
cicserver
Member
Member
Posts: 300
Joined: Sun Jul 24, 2011 12:04 pm

Re: How initialized a variable by SMS ??

Wed Feb 18, 2015 6:24 am

:o
Dear DjM,
I was looking for it since long. Can you please provide more information? What ROS version you are using? Can you please provide any sample script in which we can pass variable?
 
DjM
Member Candidate
Member Candidate
Posts: 111
Joined: Sun Dec 27, 2009 2:44 pm

Re: How initialized a variable by SMS ??

Wed Feb 18, 2015 9:32 am

:o
Dear DjM,
I was looking for it since long. Can you please provide more information? What ROS version you are using? Can you please provide any sample script in which we can pass variable?
Hello cicserver,

I'm using ROS 6.27, try to use the code which I have provided in my previous post - just the ":log info" statement with two variables, nothing less, nothing more. Then send SMS in correct format (as described on Wiki) and you should see the values in the log entry.
 
cicserver
Member
Member
Posts: 300
Joined: Sun Jul 24, 2011 12:04 pm

Re: How initialized a variable by SMS ??

Wed Feb 18, 2015 11:51 am

Ok thank you very much for the update, I will test this in lab at weekends, and will post updates. :lol:
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: How initialized a variable by SMS ??

Mon Oct 05, 2015 9:27 am

thank you good man ,
the script is run on 6.31?
 
wcypierre
just joined
Posts: 3
Joined: Sun Dec 27, 2015 11:14 am

Re: How initialized a variable by SMS ??

Sun Dec 27, 2015 3:17 pm

I've tested it on 6.33 and it works fine.

Who is online

Users browsing this forum: No registered users and 12 guests