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
403 views 1 comments
by anonymous

Dear Teltonika Team,

Simply reproducable issue: 
The 1st switch to "default-sim" sim1 (after router-start) is interrupting the 1st switch by auto-switch-rule AND leads to permanent disconnected state whenever using sim2 subsequently.

1) no sim in slot1 - a well-working sim in slot2

2) after router-start sim1 (set as default-sim) is tried to be setup (see loglines below)

3) after some minutes the On-Data-Connection-Fail rule of sim1 is firing after 10 connection-trials and is starting to switch to sim2 (see green coloured line below)

4) but after router-start the router wants to set the DEFAULT sim (sim1) either way, DESPITE the sim1 was already set from the beginning - so the switching to sim2 is BREAKING! (see orange coloured libe below)

5) now again sim1 is tested by on-data-connection-fail-rule for 10 trials, then again the rule fires and switches to sim2 which is then working fine for all subsequent switches

Due to the switch to the default-sim, any auto-switching which is in process is interrupted, afterwards every switch to sim2 result in disconnected. With below workaround (no default-sim), everthing is working fine.

Workaround:
The "default-sim" switch is unfortunately toggeling between sim1 and sim2, I cannot disable default-sim for both sims (except with "uci set simcard...")

By when this started to happen: Unfortunately I do not know

>>> logread | egrep "sim|SIM|now up" | egrep -vi "wireless|multiap"
Sat Jan 14 10:41:24 2023 user.notice simcard: sim UBUS object was found! Loading simcard configuration.
Sat Jan 14 10:41:29 2023 user.notice simcard: sim UBUS object was found! Loading simcard configuration.
Sat Jan 14 10:41:29 2023 daemon.info mobifd: [gsm.modem0] Failed to get SIM PIN state
Sat Jan 14 10:41:35 2023 daemon.notice netifd: Interface 'lan' is now up
Sat Jan 14 10:41:35 2023 daemon.notice netifd: Interface 'loopback' is now up
Sat Jan 14 10:42:22 2023 daemon.info sim_switch[6596]: Starting sim_switch...
Sat Jan 14 10:42:22 2023 daemon.info sim_switch[6596]: Initializing uloop...
Sat Jan 14 10:42:22 2023 daemon.info sim_switch[6596]: Connecting to ubus...
Sat Jan 14 10:42:22 2023 daemon.info sim_switch[6596]: Reading configuration...
Sat Jan 14 10:42:22 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:42:22 2023 daemon.info sim_switch[6596]: Running...
Sat Jan 14 10:42:52 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:43:22 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:43:52 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:44:53 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:45:24 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:45:54 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:46:24 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:46:54 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:47:24 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:47:54 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:47:54 2023 daemon.info sim_switch[6596]: [1-1.4] SIM switch in progress. Triggered by data_fail rule
Sat Jan 14 10:47:55 2023 daemon.info mobifd: [gsm.modem0] Default SIM change initiated
Sat Jan 14 10:48:14 2023 kern.info kernel: Changing to SIM2: unable to establish data connection
Sat Jan 14 10:48:37 2023 user.notice simcard: sim UBUS object was found! Loading simcard configuration.
Sat Jan 14 10:48:45 2023 daemon.info mobifd: [gsm.modem0] Default SIM change initiated
Sat Jan 14 10:49:04 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:49:34 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:50:04 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:50:34 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:51:04 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:51:34 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:52:05 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:52:35 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:53:05 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:53:35 2023 daemon.info sim_switch[6596]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Sat Jan 14 10:53:35 2023 daemon.info sim_switch[6596]: [1-1.4] SIM switch in progress. Triggered by data_fail rule
Sat Jan 14 10:53:36 2023 daemon.info mobifd: [gsm.modem0] Default SIM change initiated
Sat Jan 14 10:53:56 2023 kern.info kernel: Changing to SIM2: unable to establish data connection
Sat Jan 14 10:54:01 2023 daemon.notice netifd: mob1s2a1 (17418): Quering active sim position
Sat Jan 14 10:54:04 2023 daemon.notice netifd: Interface 'mob1s2a1' is now up
Sat Jan 14 10:54:07 2023 daemon.notice netifd: Interface 'mob1s2a1_4' is now up

1 Answer

0 votes
by anonymous

Hello,

I have tried the setup you have described, SIM 1 not inserted, the SIM1 is the default SIM, working SIM2 in slot 2, but in my case the router was able to pick up on SIM2 and successfully establish data connection. Did I miss something?

An excerpt from my logs:

Mon Jan 16 09:21:33 2023 kern.notice Password auth succeeded for root from 192.168.1.113:55663
Mon Jan 16 09:21:33 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:21:43 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:21:53 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:03 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:13 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:23 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:33 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:43 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:53 2023 daemon.info sim_switch[5645]: [config_get_data_fail_iface:555] error: Failed to identify interface!
Mon Jan 16 09:22:53 2023 daemon.info sim_switch[5645]: [1-1.4] SIM switch in progress. Triggered by data_fail rule
Mon Jan 16 09:22:54 2023 daemon.info mobifd: [gsm.modem0] Default SIM change initiated
Mon Jan 16 09:23:03 2023 daemon.info mobifd: [gsm.modem0] SMS storage: sm
Mon Jan 16 09:23:03 2023 daemon.info mobifd: [gsm.modem0] Attempting to establish connection to operator with 5 seconds of timeout
Mon Jan 16 09:23:03 2023 daemon.info mobifd: [gsm.modem0] Connected to operator 'Tele2 LT Tele2'
Mon Jan 16 09:23:03 2023 daemon.info mobifd: [gsm.modem0] -CFUN- Functionality: "Full"
Mon Jan 16 09:23:03 2023 daemon.info mobifd: [gsm.modem0] -COPS- Mode: "Auto", operator: "Tele2 LT Tele2"

The "Default SIM change initiated" message occurs both ways, switching from SIM1 to SIM2 and vice versa, though in the WebUI, the default SIM set still remains SIM1, configuration file in /etc/config/simcard confirms this as well, as SIM1 remains primary after the switch to SIM2 ,thus, even if the entry is misleading, it may not be the reason, why the SIM switch fails.

Otherwise, I would like you to attach a troubleshoot file to your question to review your configuration. Please, replicate the issue, then access router's WebUI, go to System -> Administration -> Troubleshoot section and download troubleshoot file from there. The logs in the file might provide more insight into the issue.

Best regards,

by anonymous

Thx for your fast answer.

Your test-config above is fine, except that you need at least one auto-switch-rule-setting for sim1 (see screenshot capture3.png attached).

Then the auto-switching happens after ~4-5min from sim1 to sim2 (which you see in the log-file above), but 50sec later the "default-sim" switch happens (orange-line). And this default-sim switch does not happen (I tested and checked log) several times, when default-sim is not defined - e.g. by disabling default-flag for both sims:

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

So, this default-sim switch (only once after router-start) interrupts the auto-rule-switching task so that sim2 is in an broken state, it will never become connected, except when I do router-start (evtl. also if just modem is started).

When disabling default-sim flag for both sims or when just setting default-flag to sim2 everything is fine and sim2 immediatly goes to connected- when switching to it.