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
180 views 2 comments
by anonymous
Hi there.

I'm using RUT 950 as mobile modem with 2 SIM cards. I'd like to have a rule for switching from default sim (and back) if data speed is zero  (perhaps if there's no data input detected in, like, 10 sec). I can't achieve it with the standard rules, but is it possible at all with custom script or any other method? Thanks.

1 Answer

0 votes
by anonymous

Hello,

Thank you for reaching out!

To achieve this, the SIM Switch feature can be utilized, which is located in Network → Mobile → SIM Switch. However, please keep in mind, that at least at the moment there is no option for measuring speed, only options seen in the article can be used.

In your case, I'd recommend using the rule "On data connection fail", setting the method to LCP echo, and setting the "Check interval" to something less, for example, 3 seconds. This way SIM switch will occur faster.

If this method does not suit you, then a shell script could also be utilized, however that will require some scripting knowledge. Speedtest package can be downloaded from the package manager (Services → Package Manager). Then using a shell, command speedtest, speed test can be performed via shell. Options for this command are:

--help      shows usage of file
-s             set silent mode
-u [url]      set server
-t [time]    set test time

SIM Switch can be done using UCI commands:

uci set simcard.@sim[0].primary='0'

uci set simcard.@sim[1].primary='1'

uci commit simcard

/etc/init.d/simcard restart

Let me know if there is anything else I can help with!

Best regards,
DaumantasG

Best answer
by anonymous
Thanks for answer on a such short notice. I will try these next time I will have mobile connection difficulties.
by anonymous
Glad to help!

Let me know if something does not function as it should.

Best regards,
DaumantasG