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
327 views 6 comments
by anonymous
Hi,

My operator does have an option to provide:

operator      (high bandwith - but limited data usage)
operator+    (low bandwith - but unlimited data usage)

How can I force the device to connect to operator+ ? and if it fails to connect, reboot device and try to connect again?

Reason for asking is that when I reboot the device.. it connects to operator+.. which it should... then after some time, it connect to operator.. and thereby, if my operator data usage is empty (all data is used), I cannot connect to any devices inside the network.. because of limits to 128k... only for reading email etc..)

Thank you for helping.

2 Answers

0 votes
by anonymous

Solution:
 

1.) SSH into the RUT950. (enable SSH  if you cannot login into it!)

2.) type:  vim /etc/crontabs/checkoperator.sh

type "i" and enter this code:

#!/bin/sh
operator=`/usr/sbin/gsmctl -o`
operator_OK="YOUR_PREFERRED_OPERATOR_NAME"
# do not edit after this line.

if [ $operator == $operator_OK ]
then
#echo "Operator=$operator"
#echo "continue operating.."
#echo "(reboot canceled)"
exit
else
#echo "Operator=$operator"
#echo "Restarting GSM modem.."
/etc/init.d/modem restart
fi

3.) Click "ESC"  x2.. and then ":" and "wq"  ..and the return. The file should be saved, and you get back to prompt.

4.) Now type: chmod 700 /etc/crontabs/checkoperator.sh

5.) type: crontab -e

and you need to add a line;

type: "i"

And add this line:

*/10 * * * * /etc/crontabs/checkoperator.sh

Click "ESC" 2xtimes... and the type ":" and "wq"  and click enter.... not the new crontab is operational and the system should now check the operator your connected to, and reboot, if the operator is wrong..

Best answer
0 votes
by anonymous
Hello,

You can connect to your desired operator manually (only if the SIM card supports it) by navigating WebUI > Network > Mobile > Network operators. In this window, you can manually scan for all available operators and select connection mode.

Regards.
by anonymous

Thank you for reply.
I see the operator only has one operator code. And therefore I cannot select another operator+ code.

I've tried setting specific 
Mobile - General - Network frequency band: LTE B20  - but this did not help.

Guessing I have to check the logs - to see at what time/or for "how long time does it take", before the system connects from
Operator+ connection -> operator connection... the logs did not give me any clear indications. Any tips how to check this would be creatly appreciated. If I know that f.ex. every 4 hours the device goes from operator+  to operator  connection, I can reboot the device (or re-register modem?) so it will connect again to operator+. 

by anonymous

In case you cannot connect to the internet or ping another device, you could set up the Auto Reboot feature. You can read more about it right here: https://wiki.teltonika-networks.com/view/RUT955_Auto_Reboot#Ping_Reboot_Settings

by anonymous
This is super! Yes, I will use the auto reboot feature! :)
But is there a way to check the logs - when the system goes from operator+mode  to  operator-mode ?
by anonymous

It is possible, via CLI interface SSH client. Navigate Services > CLI and to access this interface.

Username: root

Password: your WebUI password.

Run command logread. It should print all the router logs.

Regards.

by anonymous

Thanks! I will check this out.

Do you know if its possible make a scripts that runs every 10min,

If operator mode=operator, then reboot
If operator mode=operator+, exit

Looking at
https://community.teltonika-networks.com/?qa=blob&qa_blobid=9424018346939776053
Tells me that I can create a bash script, and schedule it through cron.

Now I only need to know that the "variable" for operator is... is there a way to list all variables used ?

by anonymous

Hello,

gsmctl will give the operator's name:

opername = $(gsmctl -o)

Regards,