FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,470 views 2 comments
by anonymous
Hi all, apologies if this is obvious but I'm at a loss.

All has gone really well and I'm really pleased with the RUT240, but, for the life of me I cannot work out how to get Event Reports working.  According to the wiki https://wiki.teltonika.lt/view/RUT240_Events_Log I should just have an Events Reporting section under the Status - Events Logs menu.  This doesn't show on my UI (Firmware RUT2XX_R_00.01.04.1), I've looked to see if needs enabling somewhere but nothing obvious.

What I want is to send an SMS when the connection fails over from wired to LTE - simple requirement, which events reporting seems to solve.

Anyone using this and can shed some light on why I can't see it?

Thanks in advance, Rob

1 Answer

+1 vote
by anonymous

Hi,

Event Reports tab is indeed missing from the WebUI under Status Events Logs menu in RUT2 series routers, while it is available in RUT9 series.

The facts that Event Reports tab is missing in RUT2 WebUI, no such feature showed in the PDF version of RUT2 manuals (manuals) and SIM switch option in RUT240 Event Log wiki article indicating that there's a mistake in wiki article and no such feature exist in RUT2 series (I might be wrong though) .


But what you want could be achieved using another routerfeature.

If you will navigate to Network   WAN in the router's WebUI, you will see an Edit button on each interface.
If in your setup main WAN is set to Wired WAN, backup is Mobile WAN and you want to get SMS when a router switches to backup WAN, press Edit button on Mobile interface.

In configuration window you will see option "Execute command", enable the option and in the field that appears, enter command to send SMS once router switches to this interface.
The command should look similar to:

gsmctl -S -s "0037060000000 MobileWAN"

Where:
0037060000000 - phone number to which SMS will be sent
MobileWAN - text of the SMS.

Such method worked for me (Device - RUT240; Firmware RUT2XX_R_00.01.04.1)

"Execute command" feature is available on all WAN interfaces.
 

by anonymous
Thanks for the very quick answer, shame about the events not being available as I can see a really good long term use of that.  But primarily I wanted to be notified when the Failover kicked in and the above solution works exactly as needed, thanks.

I've had the router a few weeks (it replaced an appalling Netgear LTE router) so getting to grips with what I can do with this excellent little box.  For my info is that command a CLI listed command??  So for example could I execute a script in there rather than a single command, that way I can create a "group sms" rather than only me getting all the notifications?

Once again thank you for taking the time to answer my original question.

Rob
by anonymous

Hi again,


Using "Execute command", you can start a script that will send SMS to multiple numbers when backup WAN will be enabled.

I tried creating a little script and it was working fine.

You can also try it, maybe it will be suitable for your solution.

To begin with, connect to router via SSH (you can use CLI feature (Services → CLI)).

Then execute following command:
vi /etc/init.d/example

It will create a new file in /etc/init.d directory and allow you to edit the file:

Paste following text to the file:

#!/bin/sh /etc/rc.common
# Example script

START=10
STOP=15

start() {
gsmctl -S -s "0037060000000 MobileWAN"
sleep 3
gsmctl -S -s "0037060000001 MobileWAN"
sleep 3
gsmctl -S -s "0037060000002 MobileWAN"
}

To save changes, press the "Escape" ("Esc"), type :x and press "Enter".

Then execute CLI command:

chmod +x /etc/init.d/example

After that you will have a script that could send messages to three selected numbers after the backup WAN.

To start script use command:

/etc/init.d/example start

You can change the script by adding more numbers and changing the message text.
More information regarding the scripts can be found here

Finally enter command:

/etc/init.d/example start

To "Execute command" field.