SMS receiving now supported, can run scripts

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?

can we set warning sms for those whose account is going to expire within 2 days & remind him to pay I’m using usermanager

Thanks to MT team for this great feature.
btw it would be great idea if it works with http sms gateways.

examples?..

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 :smiley:

very nice new feature :sunglasses:

it’s cool, you can do more with MK. :wink:

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

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.

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?

if they can use internet, why bother with the 3G modems? just send your SMS messages from some website

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.

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.

Joshiii, this is not possible. The Mikrotik router is an IP based device and NOT a GSM device.

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.

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 :slight_smile:

Thanks, will do it this way, consider my request closed.

where do i put the gps sim pin in?


i put it in secret: “xxxx”

but still asks for a pin

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_Globetrotter_HSDPA_USB_Modem

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?