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

prior 07.xx.x one was able to use "gpio.sh get SIM" to get info, whether SIM1/2-card is inserted.
What is the command hence release 07.xx.x ?

Many thx for your answer,
Best regards,
Rainer

1 Answer

0 votes
by anonymous
Hi sr002017,

Guess what you are looking for is the command "gsmctl --simstate".

Let me know if it helps.

Best regards.
by anonymous

Thx, but that shows only simstat ("inserted") of the currently modem-controlled slot.

I need to know whether sim1 is inserted when sim2 is currently in use.

Thx for help :-)

by anonymous
Hi sr0002017,

Unfortunately this is not possible on devices that has only one modem, because is not possible to monitor both sim cards at the same time. What you could do for now is use the uci commands to switch the main simcard and them use the "gsmctl --simstate" to know if the other simcard is inserted, but of course, that would stop your mobile connection for a few seconds.

You could also use a RUTX12 that has two modems, so you could achieve this functionality, without having to stop the mobile connection for a few seconds.

Anything else, let me know.

Best regards.
by anonymous

Thx for answer.

But where "gpio.sh" is gone in release 07.xx.x ?
And when "gpio.sh get SIM" was able in release 06.xx.x to read whether a card-slot has a sim-card (at least this I read in this forum) why it should no more be possible in 07.xx.x ?

Thx for your help :-)

by anonymous

Hi,

What the "gpio.sh get SIM" used to do is show what was the active simcard, in this case, I think that the command that maybe help you is the "ubus call sim get ", this command returns 1 if the simcard1 is the active, and 2 if the simcard2 is the active. So basically the same as the command you've mentioned.


Best regards.

by anonymous

Many thx, but maybe my question is a bit misleading: I would like to know whether sim1 or/and sim2 is inserted in slot (independently of which sim is active or working).

And I understood from some questions here (but didn't found the appropriate question/answer anymore) that "gpio.sh get SIM" or so tells whether a sim is inserted ( If not inserted sim1 as an example I do not need to switch to sim1 in my case which stops network for many seconds ).

Thx for help,
Rainer

by anonymous
Hi,

So as i've mentioned on the second comment, unfortunately you cant directly know if there is an inserted simcard in each slot, you can only get to know if the active simcard is present in its slot. But what you can do is change the active simcard, and check again if there is a simcard present, as now the device would check the other slot.

Maybe you could a linux script to make that reads if a simcard is inserted and then change the active simcard and check it again, so this script would generate an report of each SIM Slot, solving your needs. There is commands available for that, should not be that hard.

Best regards.
by anonymous
Mmmh, ok, thx, yes, scripting is not a problem of course - it's just that:

a) inserting a sim-card is not recognized, and an scripted auto-switch cannot happen
b) but permanently testing whether a sim is inserted leads to permanent network-disconnects

Anyhow, thx for info
BR Rainer