cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
742
Views
15
Helpful
5
Replies

Simple script to execute a command ~4 minutes after router boots up...

radiomean
Level 1
Level 1

Hi there, the title says it all really...

 

I am sure it is not difficult but I would appreciate a bit of advice.

I am programming a 887VAG-4G and would like the command 'cell 0 lte plmn select auto' to be executed about 4 minutes after the router re-boots or reloads . Can someone point me at the scripting to do this please?

 

Cheers, Bill

 

PS Perhaps I should add, the reason I want to execute this command is that the cellular modem never connects to a network of its own accord. The modem comes up but if I do 'sh cell 0 network' I can see the roaming status defaults to 'roaming' and the network selection mode defaults to 'manual'. If I then execute the command 'cell 0 lte plmn select auto' network selection is auto and it quickly connects to the network appropriate to the sim card. Maybe I need to write something else to the modem??

 

5 Replies 5

Hello,

 

event manager applet RUN-ON-BOOT
event syslog pattern "SYS-5-RESTART"
event timer countdown time 240
action 1.0 cli command "enable"
action 2.0 cli command "cell 0 lte plmn select auto"

Hi and many thanks...  

Aren't sys-5-restart and countdown time mutually exclusive? When I add one, the other disappears!

Anyway, I'm just giving this a try.

 

If I wanted a second run on boot event, how would I code it?

 

Cheers!

Hello,

 

my bad. Use the script below. The maxrun must be longer than the wait time, since the default lifetime of an EEM applet is 20 seconds.

 

event manager applet RUN-ON-BOOT
event syslog pattern "SYS-5-RESTART" maxrun 300
action 1.0 wait 240
action 2.0 cli command "enable"
action 3.0 cli command "cell 0 lte plmn select auto"

Hello

Have you tired manually hardcoding the network?
example:
show cell 0 network < choose a network and then hardcode it manually or force it
cell 0 lte plmn select manual xxx xx lte
cell 0 lte plmn select force xxx xx lte
wr


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hi Paul,

I was thinking of trying that next, but the script to set the network selection to auto - run two or three minutes after the router boots up - seems to work fine, and with (eg) a 3-UK sim, it connects to 3-UK fine with no intervention.

 

It's just annoying that it is necessary to do this - my EHWIC-4G-LTE card does not need this, and neither does my EHWIC-3G-HSPA+7

And actually neither does a 881G+7 HSPA+ router.

 

Oh well, it is a workaround!

 

Thanks and cheers, Bill

Review Cisco Networking products for a $25 gift card