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
156 views 3 comments
by anonymous
Hello,

I have a RUTX12 with firmware RUTX_R_00.07.03.1.

I am testing sms rules and noticed that "mobileoff" rule only disables mob1a1s1 (sim 1), mob2s1a1 (sim 2) stays on.

As "wifioff" indeed disables both 2.4G and 5G, I am guessing it is not the expected behavior.

In the log base in /log/log.db, table NETWORK, I can see the message : "WAN (mob1s1a1) is down, switching to backup WAN (mob2s1a1)". My guess is that the failover feature is reactivating or preventing "mobileoff" to switch off sim2.

Can you confirm my guess ? If so, is there a way to deactivate the failover before sending "mobileoff" ?

If this is not the issue, do you know about an other configuration that could prevent mob2s1a1 to be switched off ?

Many thanks for your help.

1 Answer

+1 vote
by anonymous

Hello,

  

This rule is created to initiate a switch to a different WAN source, rather than disable the modem.

To disable the mobile data on the modems a custom SMS rule can be created:

  • Navigate to Services → Mobile Utilities → SMS Utilities and at the bottom, there will be an "Add rule" section;
  • Enter the SMS text that will be sent to trigger this rule and the action will be "Execute custom script";
  • Let's say this rule will be meant to disable the mobile data on both modems, so the script inside the rule will look like this:

#!/bin/sh
ifdown mob1s1a1
ifdown mob2s1a1

  • Then an identical rule can be created to enable the mobile data on the modems:

#!/bin/sh
ifup mob1s1a1
ifup mob2s1a1

Please keep in mind, that these settings will not be stored after a reboot or configuration change!

  

Best regards,
DaumantasG

by anonymous

Hello DaumantasG,

Thank you for your help.

So it is the expected behavior. What is quite surprising is that even if I send "mobileoff" to the sim2 card number, it is still mob1s1a1 that gets turned off. Maybe an update to documentationn https://wiki.teltonika-networks.com/view/RUTX12_Mobile_Utilities#SMS_Utilities saying that it only affects sim1 would clarify the action of the rule.

Anyway, thanks for the script example, it is very useful.

Out of curiosity, I also found example using uci :

uci set network.mobNs1a1.disabled='1'; uci commit network; reload_config

uci set network.mobNs1a1.disabled='0'; uci commit network; reload_config

Aside from the fact that this second method affects the configuration file and thus turns off the switch in the webUI /network/interfaces/general page, are there other differences between the 2 methods ?

by anonymous
Hello,

Documentation could, in fact, be improved, I added that to the suggestions list. Thank you for bringing this up!

As for the commands, they definitely can be used and you're correct that they will be stored in the configuration. That would probably be an even better solution. However, if you do not have physical access to the router, the method I've described may be a little safer option in case something goes wrong, as it will re-enable the mobile data.

Best regards,
DaumantasG
by anonymous
Hello,

Interesting point, I will need to think about which is the best for me :-)

Thank you for your help.