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

Hello,

I have a lot of RUT950 connected to Internet using only mobile WAN connectivity, with two SIM in failover (SIM switching) configuration. I generally use the PIN active and the code saved on the router.

I was mainly using the old firmware RUT9XX_R_00.06.02.2, that was working as expected for the SIM switching.

To solve some issue with VPN and with LTE connectivity, I decided to upgrade some devices to the firmware RUT9XX_R_00.06.05.3 .

However with RUT9XX_R_00.06.05.3 firmware I noticed a big problem with the SIM switching functionality: if the SIM1 connectivity goes down (for provider reason or whatever), then the router select the SIM2, but enters an invalid state where there is no connection and telling the PIN is required. After detecting there is no connection with SIM2, the router goes back on SIM1, where it agains enter this invalid state, without connectivity, and telling the PIN is required.

The router keeps switching from one SIM to the other one, losing forever the connection. It works only the primary SIM card at the first time after the boot.

I have upgraded two RUT950 devices with the latest RUT9XX_R_00.06.06.6 and had the same exact behaviour. I have tested combination of SIM from three different providers.

If I remove the PIN code (using another device as I am unable to remove the PIN lock on both the SIM using the AT+CLCK command from CLI), the SIM swithing is working correctly.

I attach some images of the settings and behaviour of one test router with firmware RUT9XX_R_00.06.06.6.

Settings for SIM1:

Settings for SIM2:

Settings for SIM Management, with panel SIM1->SIM2:

Settings for SIM Management, with panel SIM2->SIM1:

To test the behaviour of a connectivity loss on SIM1, I set the ICMP test server with an IP that doesn't reply to ICMP (8.8.8.1). I upload the Overview page to check the behaviour.

STEP 1, the connection is working with SIM1 as expected, until it will fail the ICMP monitor.

STEP 2, ICMP has failed, the router choosed SIM2, but is telling the PIN is required and there are 3 attemps left.

STEP 3, the router returns on SIM1, but also here is telling the PIN is required and there are 3 attemps left.

STEP X, after some hour, we have the router going from SIM1 to SIM2 and back, losing connectivity forever.

It works only the primary SIM card at the first time after the boot. If I select SIM2 as primary, the behaviour is the same, working the first time with the SIM2 and then failing.

Anybody noticed this?

At least, is it possible to remove the PIN request using CLI and gsmctl on the SIM card that is not used for connection, so to have a workaround disabling the PIN?

Thanks

2 Answers

0 votes
by anonymous

Hello again,

As I was needing an urgent solution for ~10 routers, I have created a simple script to autonomously remove the PIN on both SIM, that works even when the connection is gone lost.

I worked on the UCI command line as I was unable to manage the Quectel command AT+QDSIM to get the SIM2 working.

I report the script I am using, as it could help anybody else. The following text had to be written on command line.


:> removepin.sh
chmod +x removepin.sh
cat > removepin.sh <<EOF
#!/bin/sh
# normally connected with SIM1, script to remove the PIN on SIM2
PINSIM1=\$(uci get simcard.sim1.pincode)
PINSIM2=\$(uci get simcard.sim2.pincode)
echo "--------- Check SIM1"
gsmctl -A AT+CPIN?
gsmctl -A AT+COPS?
echo "--------- Remove PIN on SIM1"
gsmctl -A AT+CLCK=\"SC\",0,\"\$PINSIM1\"
echo "--------- Set SIM2 active"
uci set simcard.simcard.default='sim2'
uci commit
luci-reload > /dev/null
echo "--------- Unlock SIM2"
gsmctl -A AT+CPIN=\"\$PINSIM2\"
echo "--------- Check SIM2"
gsmctl -A AT+CPIN?
gsmctl -A AT+COPS?
echo "--------- Remove PIN on SIM2"
gsmctl -A AT+CLCK=\"SC\",0,\"\$PINSIM2\"
echo "--------- Set SIM1 active again"
uci set simcard.simcard.default='sim1'
uci commit
luci-reload > /dev/null
echo "--------- Check SIM1"
gsmctl -A AT+CPIN?
gsmctl -A AT+COPS?
EOF

./removepin.sh > removepin.log &

Regards

Best answer
0 votes
by anonymous
Hello.
We know about this issue. It will be fixed in the near future.
You can remove the SIM card PIN using AT commands.
To use AT commands, you need to know which modem is installed on your device.
For this go to the tab: Status->Device, pay attention to the modem model, e.g. EC25.
I enclose links to manuals on using AT commands for various modems.
Regards.
by anonymous
Hello Igor,

Thank you for your reply. Could you define better the time I should expect for near future? Is it a next release fix?

It is quite a problem to me to remotely remove the PIN of the SIM that is not currently in use, at least with the Quectel modem I have.

Let me know,

Best Regards
by anonymous

Hello again,

As I was needing an urgent solution for ~10 routers, I have created a simple script to autonomously remove the PIN on both SIM, that works even when the connection is gone lost.

I worked on the UCI command line as I was unable to manage the Quectel command AT+QDSIM to get the SIM2 working.

I report the script I am using, as it could help anybody else. The following text had to be written on command line.


:> removepin.sh
chmod +x removepin.sh
cat > removepin.sh <<EOF
#!/bin/sh
# normally connected with SIM1, script to remove the PIN on SIM2
PINSIM1=\$(uci get simcard.sim1.pincode)
PINSIM2=\$(uci get simcard.sim2.pincode)
echo "--------- Check SIM1"
gsmctl -A AT+CPIN?
gsmctl -A AT+COPS?
echo "--------- Remove PIN on SIM1"
gsmctl -A AT+CLCK=\"SC\",0,\"\$PINSIM1\"
echo "--------- Set SIM2 active"
uci set simcard.simcard.default='sim2'
uci commit
luci-reload > /dev/null
echo "--------- Unlock SIM2"
gsmctl -A AT+CPIN=\"\$PINSIM2\"
echo "--------- Check SIM2"
gsmctl -A AT+CPIN?
gsmctl -A AT+COPS?
echo "--------- Remove PIN on SIM2"
gsmctl -A AT+CLCK=\"SC\",0,\"\$PINSIM2\"
echo "--------- Set SIM1 active again"
uci set simcard.simcard.default='sim1'
uci commit
luci-reload > /dev/null
echo "--------- Check SIM1"
gsmctl -A AT+CPIN?
gsmctl -A AT+COPS?
EOF

./removepin.sh > removepin.log &

Regards

by anonymous
I have exactly same situation, SIM switching sometimes works but mostly not if SIM2 have PIN code.

Our modems have EC25, anybody have script to disable PIN remotely only for SIM2? SIM1 is default and I will lost remote connection if set SIM2 to default.

@Igor when this is fixed? Tested with version RUT9_R_00.07.00.2, still does not work as expected.