Connection Monitoring Mod to Reboot Modem

How To Tutorials related to Routers and Firmware
User avatar
JimHelms
Site Admin
Posts: 521
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Contact:

Connection Monitoring Mod to Reboot Modem

Post by JimHelms » Sun Nov 11, 2018 7:07 am

Some are experiencing issues with reconnecting to a cellular network after losing its connection. Usually, a hard reboot is required to reconnect.

UPDATE 03-08-2019:
Our latest WiFiX 2019 version of GoldenOrb contains an internal ping script that runs in the background that resets/reboots the modem. As always when upgrading a router's firmware, be certain to UNCHECK the box to Save Settings.

The instructions and tasks below are no longer required when using the WiFiX firmware. The discussions below are for reference only.

For those running any brand or version of GoldenOrb (i.e., ROOter, WiFiX) firmware, you may want to try this modification.

It will modify a script in the firmware so that the AT!RESET is issued to the modem after the ping test fails.

This modification will apply to the 'Enabled with Modem Reconnect' option in the Connection Monitoring.

Using WinSCP (free download) you will need to access the firmware files.

In the conmon.sh file located at:

Code: Select all

/usr/lib/rooter/connect/conmon.sh
You will need to use a program like Notepad++ (free download) to edit the file, and change line 48 from :

Code: Select all

ATCMDD="AT+CFUN=0;+CFUN=1,1"
to

Code: Select all

ATCMDD="AT!RESET"
In the alternative, you may want to just comment out the original ATTCMDD… by using the # sign, and add the new command right below it:

Code: Select all

#ATCMDD="AT+CFUN=0;+CFUN=1,1"
ATCMDD="AT!RESET"
Connection Monitoring to ATReset.png
Connection Monitoring to ATReset.png (31.43 KiB) Viewed 1063 times

Save the file.

Go to Connecting Monitoring and enable ‘Enabled with Modem Reconnect’ and set the tracking IP to 8.8.8.8 and Save & Apply.

Reboot the router for it to take effect.

UPDATE: 1-15-2019

John (one of our customers) created a ping script that runs as a cron job--and runs independent from the Connection Monitoring ping script. Johns_ping script acts as a backup when all else fails.

johns_ping.sh
(452 Bytes) Downloaded 47 times

The script should be placed in the directory at: /usr/lib/rooter/connect/

Next, go to SYSTEM > SCHEDULED TASKS and set up the cron job:

Code: Select all

0,10,20,30,40,50 * * * * /usr/lib/rooter/connect/johns_ping.sh

Johns Ping Script.png


Custom Commands.png

swwifty
Posts: 257
Joined: Thu Aug 30, 2018 8:21 pm
Location: NE GA Mountains

Re: Connection Monitoring Mod to Reboot Modem

Post by swwifty » Mon Nov 12, 2018 1:04 pm

great idea Jim! It's funny you just posted this, cause I was thinking it would be nice to have the option to issue the at!reset command instead of USB rebooting the modem, or restarting the whole router.

swwifty
Posts: 257
Joined: Thu Aug 30, 2018 8:21 pm
Location: NE GA Mountains

Re: Connection Monitoring Mod to Reboot Modem

Post by swwifty » Wed Nov 28, 2018 8:08 am

Just thought I'd follow up on this. I set this up on my GoldenOrb install, and it worked great. Last night I had a couple disconnects, and the modem was reset and it easily re-established connection very quickly.

drakax
Posts: 8
Joined: Mon Aug 06, 2018 10:51 am

Re: Connection Monitoring Mod to Reboot Modem

Post by drakax » Tue Dec 04, 2018 6:56 pm

Is there a way to just reset the wan1 interface instead of the modem? I have found if I manually reset just the wan1 interface, the connection comes back very quickly, with only a few packet drops.

swwifty
Posts: 257
Joined: Thu Aug 30, 2018 8:21 pm
Location: NE GA Mountains

Re: Connection Monitoring Mod to Reboot Modem

Post by swwifty » Tue Dec 04, 2018 7:29 pm

drakax wrote:
Tue Dec 04, 2018 6:56 pm
Is there a way to just reset the wan1 interface instead of the modem? I have found if I manually reset just the wan1 interface, the connection comes back very quickly, with only a few packet drops.
what do you mean by reset the wan1 interface? what commands are you running to do that?

drakax
Posts: 8
Joined: Mon Aug 06, 2018 10:51 am

Re: Connection Monitoring Mod to Reboot Modem

Post by drakax » Wed Dec 05, 2018 8:43 am

So to give a bit of background, I have been having a terrible time with Sprint dropping connectivity. I have found that the actual LTE connection remains, but somehow the IP traffic is not being passed. When this happens, a simple "ifdown wan1 && ifup wan1" brings the connection back very quickly, and does not cause the reset of the modem, and re-connection to the tower, without having to wait through the entire process of the modem restarting, finding the tower, connecting, getting an IP.

drakax
Posts: 8
Joined: Mon Aug 06, 2018 10:51 am

Re: Connection Monitoring Mod to Reboot Modem

Post by drakax » Wed Dec 05, 2018 9:06 am

I am currently trying to see if just forcing udhcpc service to release and renew the ip causes the connection to come back.

#!/bin/sh

# get pid of udhcpc
PID=`pidof udhcpc`
#release dhcp lease
/bin/kill -SIGUSR2 $PID
# renew dhcp lease
/bin/kill -SIGUSR1 $PID

zbigb
Posts: 1
Joined: Fri Aug 31, 2018 7:03 pm

Re: Connection Monitoring Mod to Reboot Modem

Post by zbigb » Sat Dec 08, 2018 3:15 pm

drakax

Any success with this? I am running into the same issue.

drakax
Posts: 8
Joined: Mon Aug 06, 2018 10:51 am

Re: Connection Monitoring Mod to Reboot Modem

Post by drakax » Fri Dec 14, 2018 9:00 am

I have been travelling for work, so i set it to band 25 before I left, since that never has issues. I am testing today, and will post back if I find out anything.

Johnsieve
Posts: 4
Joined: Fri Dec 21, 2018 6:50 am

Re: Connection Monitoring Mod to Reboot Modem

Post by Johnsieve » Fri Dec 21, 2018 6:53 am

I joined just to keep a eye on this, ever since a tower upgrade, with my mc7455, I can no longer surf the web but still ping. This happens very irregularly, sometimes 6hrs, sometime 48hrs, and connection monitoring does not work, because ping still works.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post