Community discussions

 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

SMS receiving now supported, can run scripts

Fri May 08, 2009 4:32 pm

Now it's possible for you to send an SMS to your router, tell it to run a script (parameters supported) and the router can even respond, as it also supports SMS sending! More here:

http://wiki.mikrotik.com/wiki/Sms
No answer to your question? How to write posts
 
dormador
Member Candidate
Member Candidate
Posts: 107
Joined: Sat Mar 28, 2009 12:57 pm

Re: SMS receiving now supported, can run scripts

Fri May 22, 2009 1:50 am

go a head mikrotik

you are the best if you continuous ....
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Sun May 24, 2009 2:26 am

Now it's possible for you to send an SMS to your router, tell it to run a script (parameters supported) and the router can even respond, as it also supports SMS sending! More here:

http://wiki.mikrotik.com/wiki/Sms
And it works like a charm!
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: SMS receiving now supported, can run scripts

Sun May 24, 2009 9:31 pm

does anyone know were i can buy a gsm modem in south africa?

as i cant seem to find anything

does anyone know if it works with usb gsm modem?
If i dont No Ask someone That Does!
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Sun May 24, 2009 9:37 pm

does anyone know were i can buy a gsm modem in south africa?

as i cant seem to find anything

does anyone know if it works with usb gsm modem?
It works great with USB modems... i use a Huawei E180...
http://www.pricecheck.co.za/search/?search=huawei
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: SMS receiving now supported, can run scripts

Sun May 24, 2009 9:39 pm

how can i tell if mikrotik installes my modem?

if it is picked up and how can i test it?
If i dont No Ask someone That Does!
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Sun May 24, 2009 10:28 pm

how can i tell if mikrotik installes my modem?

if it is picked up and how can i test it?
Just insert it in your USB port and wait a bit then look under /ports if there is something new.

Mine looks like this and usb3 is my modem.
And remember the settings for it (9600/8/n/1/n).
[admin@dev] /port> print
Flags: I - inactive 
 #   NAME                      CHANNELS   USED-BY                     BAUD-RATE
 0   serial0                   1                                      9600     
 1   serial1                   1                                      9600     
 2   usb3                      2                                      9600     
And under /system resource usb
[admin@dev] /system resource usb> print
 # DEVICE VENDOR                   NAME                  SPEED                 
 0 1:1                             OHCI Host Controller  12 Mbps               
 1 1:2    HUAWEI Technology        HUAWEI Mobile         12 Mbps               
After this run: /tool sms send usb3 1234567890 message="This is a test!!!"
Change usb3 this to your port and 1234567890 to your cell number.
 
melwong
newbie
Posts: 36
Joined: Tue Mar 10, 2009 11:43 am

Re: SMS receiving now supported, can run scripts

Mon May 25, 2009 4:37 am

Hi,

Once i enable read-running=yes.... to enable sms receiving, i cannot disable it to no anymore. How to disable it ?
Is this a bug ? i am using x86 pkg.
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Mon May 25, 2009 5:01 am

Just use:
/tool sms set reader-running=no
 
melwong
newbie
Posts: 36
Joined: Tue Mar 10, 2009 11:43 am

Re: SMS receiving now supported, can run scripts

Mon May 25, 2009 5:25 am

Just use:
/tool sms set reader-running=no

I have tried before posting this. It runs for a while and It gave me this error ...action timeout - try again. if error continues, please contact Mikrotik Support and a supout file (13)
 
melwong
newbie
Posts: 36
Joined: Tue Mar 10, 2009 11:43 am

Re: SMS receiving now supported, can run scripts

Mon May 25, 2009 5:27 am

Just use:
/tool sms set reader-running=no

I have tried before posting this. It runs for a while and It gave me this error ...action timeout - try again. if error continues, please contact Mikrotik Support and a supout file (13)

I suspect its a rights issue. I configure this as a admin user. But the ports configuration is all under *sys user. Which i presume is the root user.
Please verify if this is an oversight by mikrotik on the port rights.
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Mon May 25, 2009 6:01 am

i have no problem on x86.
 
melwong
newbie
Posts: 36
Joined: Tue Mar 10, 2009 11:43 am

Re: SMS receiving now supported, can run scripts

Mon May 25, 2009 8:25 am

Ok i have found the a workaround way.

Apparently, when i enable reader-running to yes the first time, the configuration has sort of change. And i cannot reset it back to no. So i do a /system reset-configuration.

Then i import my backup.rsc back and NOW everything is working fine. I can set and reset reader-running config. Thanks a lot.

Anyway info i can learn on the command syntax for the script ?

The wiki :cmd var etc is too simple.
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: SMS receiving now supported, can run scripts

Tue May 26, 2009 11:53 pm

can you maybe post a script as anexample and what message you sent to the server to run it as i cant get that right


modemworks100%
If i dont No Ask someone That Does!
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Wed May 27, 2009 12:07 am

Here is something simple...

Make a script called "smsbackup"
/export file=sms-backup
/tool sms send usb3 004512345678 message="SMS Backup is done..."
Change usb3 and 004512345678 to your cell-phone number.

Then send a SMS with this
:cmd 1234 script smsbackup
Change 1234 to the pin set on RouterOS to receive.

You will get a sms back when the backup command is done (and not if it is successful!).
 
conjurer
Member Candidate
Member Candidate
Posts: 110
Joined: Mon Jul 21, 2008 9:46 pm

Re: SMS receiving now supported, can run scripts

Tue Jun 02, 2009 6:48 pm

Can anyone recomend some usb gsm device?
I don't need anys 3g or even gprs connectivity. I want to use it only for dude sms alerts, and i want it cheap, because i don't want to waste money on 3g. but i down know shich one can go with ROS.
It can be vie usb or serial cable.
I have tried to connect my old siemens via db9 serial cable, which works with my windows pc, but doesn't worked with dude.
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Tue Jun 02, 2009 7:29 pm

Can anyone recomend some usb gsm device?
I don't need anys 3g or even gprs connectivity. I want to use it only for dude sms alerts, and i want it cheap, because i don't want to waste money on 3g. but i down know shich one can go with ROS.
It can be vie usb or serial cable.
I have tried to connect my old siemens via db9 serial cable, which works with my windows pc, but doesn't worked with dude.
I've tried some Siemens modems all work fine on PC but on ROS some don't!
But the USB 3G modems are some time cheap and a great SMS modem.
A Huawei E180 costs about €100,00 and some of the new Siemens modems costs from €125,00.
 
conjurer
Member Candidate
Member Candidate
Posts: 110
Joined: Mon Jul 21, 2008 9:46 pm

Re: SMS receiving now supported, can run scripts

Wed Jun 03, 2009 8:49 am

Anything for < 50 €? <30€?
Maybe anyone used old cellphone and it worked fine?
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Wed Jun 03, 2009 9:22 am

Anything for < 50 €? <30€?
Maybe anyone used old cellphone and it worked fine?
Did just try with my SonyEricsson T310 via serial cable, did not work :(
 
conjurer
Member Candidate
Member Candidate
Posts: 110
Joined: Mon Jul 21, 2008 9:46 pm

Re: SMS receiving now supported, can run scripts

Wed Jun 03, 2009 9:39 am

Also siemens mc60 doesn't work.
 
fly
Trainer
Trainer
Posts: 25
Joined: Thu Mar 17, 2005 3:56 pm
Location: Italy

Re: SMS receiving now supported, can run scripts

Mon Jun 08, 2009 3:37 pm

I'm trying to pass variables but with no success.

sms text:
:cmd password 1234567890 smsScript var="test"

script:
:log info $var

What is wrong?
 
User avatar
asus
Member
Member
Posts: 403
Joined: Fri Mar 27, 2009 9:42 am
Location: Mumbai, India

Re: SMS receiving now supported, can run scripts

Thu Jun 11, 2009 4:54 pm

can we set warning sms for those whose account is going to expire within 2 days & remind him to pay I'm using usermanager
 
User avatar
Antixx
Member Candidate
Member Candidate
Posts: 100
Joined: Mon Jun 26, 2006 9:46 am

Re: SMS receiving now supported, can run scripts

Thu Jul 02, 2009 8:28 pm

Thanks to MT team for this great feature.
btw it would be great idea if it works with http sms gateways.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8319
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: SMS receiving now supported, can run scripts

Tue Jul 07, 2009 2:38 pm

it would be great idea if it works with http sms gateways.
examples?..
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
Muqatil
Trainer
Trainer
Posts: 574
Joined: Mon Mar 03, 2008 1:03 pm
Location: London - UK
Contact:

Re: SMS receiving now supported, can run scripts

Tue Jul 07, 2009 3:26 pm

I gave it a try:
My goal was to reiceve a sms with a user, dig into userman, retrieve a password and send back a sms with the username and the pass..
I failed, mostly because i don't have a clue about ROS scripting and it gave me more problems than expected.
Then i placed my huawei usb modem into an Ubuntu machine (recognized automatically [as ROS did]), installed gnokii, and i made a php script that parse the received sms, dig into usermanager via php api, get the password and insert the phone number into the phone field of the user requested, and finally send back an sms using a sms gateway provider that accepts phonenumber@smsgateway as mail destination.
It works like a charm. It's a shame i wasn't unable to make it all inside ROS. (I admit it, it's mostly my fault)
Tell me if i should make a wiki of it and ofc get a L6 license :D
Renato Bernardi

skype: medtech5
 
dencow
just joined
Posts: 1
Joined: Wed Jul 08, 2009 3:46 am

Re: SMS receiving now supported, can run scripts

Wed Jul 08, 2009 4:17 am

very nice new feature 8)
 
User avatar
Antixx
Member Candidate
Member Candidate
Posts: 100
Joined: Mon Jun 26, 2006 9:46 am

Re: SMS receiving now supported, can run scripts

Wed Jul 08, 2009 1:02 pm

it's cool, you can do more with MK. ;)
 
Joshiii
newbie
Posts: 29
Joined: Wed May 20, 2009 10:13 am

SMS receiving now supported,

Thu Jul 09, 2009 11:38 pm

Hi Normis
I am looking for someway of connecting a cell our cell router to mikrotik to enable friends on the farm to send and receive sms. There is no telephone and cell reception is 10 kilometers away, and cell repeaters are way to costly. Any help will be appreciated and can be extended to a few farms here in Namibia
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 10:45 am

routeros can't receive and send SMS messages if there is no cell tower nearby, it is not a cell "AP" (or what do you call them?) just another station, like your phone. if it's not connected to the GSM provider, it can't receive sms messages, so you can't use RouterOS to extend cell coverage.
No answer to your question? How to write posts
 
User avatar
hilton
Long time Member
Long time Member
Posts: 635
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 11:50 am

Joshiii, you need to attach a 3G modem to the router which in turn needs a cell tower nearby.

You could host a server somewhere and set-up a jabber server and let the farmers use that for comms?
Regards
Hilton
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 11:54 am

if they can use internet, why bother with the 3G modems? just send your SMS messages from some website
No answer to your question? How to write posts
 
User avatar
hilton
Long time Member
Long time Member
Posts: 635
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 12:04 pm

Normis, sms in this country (South Africa/Nambia) is not free.

They would need to use something like this;

http://www.winsms.co.za/

And then route the replies back to their email which is available via the Mikrotik router.
Regards
Hilton
 
Joshiii
newbie
Posts: 29
Joined: Wed May 20, 2009 10:13 am

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 12:35 pm

Hi Hilton

My aim is to have a mikrotik with solar power on the mountain, connect a cell to the mikrotik and beam the mikrotik to the farm house. Our cell towers in the country side does not cater for 3G, just normal phoning and sms'ing. I need to have the people send a sms via the mikrotik to the nearest cell tower, the signal about 10km from the house on a mountain top is very good. Currently the farmer needs to drive very far to get to the point where he receives a signal. And on farm roads that consist of nothing more than 2 tracks can take up to 45 min to drive.
 
User avatar
hilton
Long time Member
Long time Member
Posts: 635
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 12:41 pm

Joshiii, this is not possible. The Mikrotik router is an IP based device and NOT a GSM device.
Regards
Hilton
 
Joshiii
newbie
Posts: 29
Joined: Wed May 20, 2009 10:13 am

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 12:50 pm

Hilton

I fully understand the workings of the mikrotik, I want the user using a laptop to send via the wireless network through the cell a sms.
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 12:53 pm

if the laptop user has internet from the MikroTik AP, he could FTP a text file with the SMS contents to the router, the router could use the contents in a script which then could send an SMS .. you could even write a small program that FTPs files to the MT router :)
No answer to your question? How to write posts
 
Joshiii
newbie
Posts: 29
Joined: Wed May 20, 2009 10:13 am

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 1:01 pm

Thanks, will do it this way, consider my request closed.
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 2:47 pm

where do i put the gps sim pin in?


i put it in secret: "xxxx"

but still asks for a pin
If i dont No Ask someone That Does!
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: SMS receiving now supported, can run scripts

Fri Jul 10, 2009 2:48 pm

Turn off PIN request for your SIM card, it makes the life much easier. Do it in a phone if you do not know the correct AT command.
from http://wiki.mikrotik.com/wiki/Option_Gl ... _USB_Modem
No answer to your question? How to write posts
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: SMS receiving now supported, can run scripts

Fri Jul 24, 2009 11:48 am

i got it right to send a sma byt when i reply to the sms i gey nothing


iv set my password
xxxx
and number with area code

+27xxxxxxxx

and i have a script called

sms

so if i reply to the sms sent from the server

:cmd xxxx script sms
it should run the script but nothing comes in the indox

can anyone help me with this?
If i dont No Ask someone That Does!
 
CyberT
Member Candidate
Member Candidate
Posts: 172
Joined: Tue Feb 01, 2011 1:39 pm
Location: Johannesburg, South Africa
Contact:

Re: SMS receiving now supported, can run scripts

Mon Feb 28, 2011 2:10 pm

is your receive-enabled: yes
secret is only for if you want to run scripts with the sms to device "cmd: <<pass>> script $nameofscript <aka reboot>


[admin@cybert] > tool sms pr
receive-enabled: yes
port: usb2
channel: 3
secret: ""
allowed-number: ""
keep-max-sms: 20


be sure to check that your receiving is on aka used by also always states (sms tool && PPP) ::=>
[admin@cybert] > /port pr
Flags: I - inactive
# NAME CHANNELS USED-BY BAUD-RATE
0 serial0 1 Serial Console auto
1 usb2 7 sms tool, PPP <ppp-out1> 9600


then u can find your sms's in /tool sms inb pr

after that im not to sure what to do with the sms :-/

[admin@cybert] > /tool sms inbox pr
# SRC TIMESTAMP TEXT
0 27820099892 Feb/15/2011 09:31:25 GMT -0 MYGIG 2.3 bundle purchased. 2355.00MB is available in the NEXT S
20110331. Your account has been debited with R389.00. Loyalty Po
If this helped you then please slam that Karma button :-)
 
tombee79
Member Candidate
Member Candidate
Posts: 247
Joined: Sun May 09, 2010 2:28 am

Re: SMS receiving now supported, can run scripts

Thu Dec 13, 2012 7:56 am

Hi

I don't want to sound funny but why do you need the GSM modem to send and receive SMSs?

You MT router is connected to Internet ISP ex. Bell Canada, do you still need to GSM modem to send and receive SMS/

Thanks for in-lighting me.
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 24268
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: SMS receiving now supported, can run scripts

Thu Dec 13, 2012 8:06 am

Internet and the mobile phone network are two different things. Yes, you need a GSM modem to send GSM SMS messages. If you have internet, you can send emails.
No answer to your question? How to write posts
 
QpoX
Member
Member
Posts: 387
Joined: Mon Mar 24, 2008 7:42 pm
Location: Lemvig, Denmark

Re: SMS receiving now supported, can run scripts

Thu Dec 13, 2012 5:51 pm

Some CellPhone providers allow Email->SMS
ex. 1234567890@sms.myprovider.tld
Then when sending a mail to an email address, the user will get an sms.
 
el berto
Member Candidate
Member Candidate
Posts: 197
Joined: Wed Sep 26, 2007 10:53 am

Re: SMS receiving now supported, can run scripts

Fri Dec 21, 2012 12:12 pm

[admin@dev] /port> print
Flags: I - inactive 
 #   NAME                      CHANNELS   USED-BY                     BAUD-RATE
 0   serial0                   1                                      9600     
 1   serial1                   1                                      9600     
 2   usb3                      2                                      9600     
And under /system resource usb
[admin@dev] /system resource usb> print
 # DEVICE VENDOR                   NAME                  SPEED                 
 0 1:1                             OHCI Host Controller  12 Mbps               
 1 1:2    HUAWEI Technology        HUAWEI Mobile         12 Mbps               
In "resource" menu I can see USB modem (device 1:2, vendor, name, and so on....).
But, how can I detect which port (usb1, usb2, usb3, ....) is associated to USB modem?


Then, if I'm using USB modem for internet connection (let's suppose I use modem set as Data Channel=0, Info Channel=1), which channel should I use to receive SMS?
Or SMS receiving is disabled while ppp-client (USB modem internet connection) is running?
Thanks.
 
User avatar
vipe
Member Candidate
Member Candidate
Posts: 166
Joined: Thu Sep 14, 2006 10:05 pm

Re: SMS receiving now supported, can run scripts

Thu Oct 29, 2015 4:18 pm

use in ros 6.32.2



[m@s] /tool sms> /system serial-terminal serial0 channel=0

[Ctrl-A is the prefix key]

at+cpin?
+CPIN: READY

at+cfun=0
OK
at+cfun=1
OK
at+cpin=1234
OK
at+cpin?
+CPIN: READY

at+gmi
WAVECOM MODEM

OK
at+gmm
MULTIBAND 900E 1800

OK
ati
WAVECOM MODEM

MULTIBAND 900E 1800

OK
at+gmr
532a09gg.2C2 1828120 040802 18:22

at+cmgs="2222222***"
> test
>
+CMGS: 1

OK




[m@s] /tool sms> send serial0 channel=0 phone-number=2222**** message=go
failure: timeout



I'm just like you, I don't know what you are.
What is the solution.

Who is online

Users browsing this forum: No registered users and 89 guests