cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2890
Views
15
Helpful
7
Replies

Dual sim router

sprocket10
Level 2
Level 2

Our 819 4G routers have dual sim cards, but the units don't seem to always failover to the 2nd sim once the data allowance on the first is used.

I am after a script to failover to the alternative sim if a ping times out for 5 minutes.

So if the unit is currently running on sim0 it will fail to sim1 or vise versa, or if the unit is already on sim1 to fail to sim0

I cant work out the commands to run to find out the current sim and to start an if command

 

expected replies from command : show cellular 0  security

Active SIM = 0

or

Active SIM = 1

 

 

 

 

track 1 ip sla 10 reachability
 delay down 10 up 10
!
ip sla 10
 icmp-echo 8.8.8.8 source-interface Vlan1
 frequency 300
ip sla schedule 10 life forever start-time now
!
event manager applet SimFailover
 event track 1 state down
 action 0.1 ##### work out value of active sim
 action 0.2 ##### save value
 action 0.3 ##### if value equals 0
 action 0.4 cli command "cellular 0 lte sim activate slot 1"
 action 1.1 else
 action 1.2 cli command "cellular 0 lte sim activate slot 0"

 

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

This should work:

 

action 0.1 cli command "enable"

action 0.2 cli command "show cellular0 security"

action 0.3 regexp "Active SIM = ([0-9])" $_cli_result match sim

action 0.4 if $sim eq 0

...

action 1.3 end
 

View solution in original post

7 Replies 7

Joe Clarke
Cisco Employee
Cisco Employee

This should work:

 

action 0.1 cli command "enable"

action 0.2 cli command "show cellular0 security"

action 0.3 regexp "Active SIM = ([0-9])" $_cli_result match sim

action 0.4 if $sim eq 0

...

action 1.3 end
 

sim 1 and sim 2

different chat script ?!

how realise ?

I don't understand the question.  If you have different SIM numbers, just change the "if" statement to reflect the desired numbers.

hi!

sim 1, 2 - different:

 

apn,

username,

password...

 

Hi Kuat

 

Sorry I don't understand the question.

Both our sims are different providers (on this unit the sims are 0 and 1)

I have marked Joseph reply as correct

HI! ok....

eg.:

1) sim 1, slot 1, provider - "myGSMprovider1"

apn - "internet"

other parameter not need.

2) sim 2, slot 2, provider - "myGSMprovider2"

apn - "internet.provadername.countrycode"

username- "@internet.providername"

password- "providername.countrycode"

 

eg. if change active slot, provider1, not work with other setting (sett.for sim2)

how change active sim, and chat script?

how rollback?

 

Hello Kuat,

 

You should only have one chat script with no profile defined.

Example:

chat-script gsm "" "AT!SCACT=1" TIMEOUT 60 "OK"

instead this,

chat-script gsm "" "AT!SCACT=1,4" TIMEOUT 60 "OK"

chat-script gsm "" "AT!SCACT=1,5" TIMEOUT 60 "OK"

 

 

Then you should specify on controller cellular 0, what profile should be used for each sim:

controller Cellular 0
 gsm sim profile 4 slot 1
 gsm sim profile 5 slot 0

 

Now you sould be able to use both profiles depending on what SIM is active.

 

Hope that helps,

Bruno Petrónio