What's new

ASUS 4G-AC68U - Cellular 4G keep dropping consistently

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

waterblaze

New Around Here
Hello All,

I'm only using my router as a 4G router and have serious issue as it keeps dropping my 4G connection so often that it's really annoying.

In my settings, the cellular network is set as primary and the dual WAN mode is turned OFF.

Adding my logs HERE

Firmware: 3.0.0.4.384-45149
Modem software version: WWHC050_EU.D61.04.A04

Thanks for the help
 
Hello,
I was facing the same problem. The router is not able to renew its WAN IP when it changes occasionally (mine is about once a week).
I tackled the problem by using my Raspberry PI, wrote a monitoring script (bash) which I'm running with cron every minute.

If the internet connection goes down, it first tries to renew the WAN IP, and if that won't help, reboots the router. I had "no problems" since. The longest outage after is the time the router takes to reboot.
 
Hi Laakkus,
Is your script running directly in your router or are you using your raspberry PI to run it?
I'm using the PI for it. (for couple of reasons).
- It has Ubuntu on it (the PI version), that platform is more familiar to me than the rooters own firmware.
- The ASUS firmware doesnt have crontab on it. That means more work running scripts on regular bases.
-- "normal" home gets sweeped on every boot of the router so the script file is gone. that can be avoided by placing the script file to the /jffs partition, which survives the boot. BUT it most probably wont survive a firmware upgrade.
-- You can bypass the missing of crontab by placing a cron-syntax filecontents to the file /var/spool/cron/crontabs/<yourrooteradminusername>. BUT /var is on a volatile disk space and gets wiped every time router boots so you need to copy the cron-part of the process after every boot.

So, for the simplicity it CAN be done but needs more work (like some backup&restore action). Hence in my home network setup its much simpler to run the monitoring script in the PI. Hope this helps.

I can paste my script here if you want to try it.
 
UPDATE:
I made a router-only version of the script and am now running it on the router to test it out. Now only waiting for the Internet connection to fail :D.

UPDATE2:
Scripts and cronjob survive reboot, tested. Sorry to say, but no Internet connection breakage yet..:p

UPDATE3:
Internet connection was down for the first time since applying the script and the script "healed" the internet connection. At least this first time it didn't need to reboot the router.
Code:
4G-AC68U:/tmp/home/root# cat /jffs/asus_nw_problems
20190521_1917:  Internet connection was down, trying renewing the IP.
 
Last edited:
Here is the script, comments include a small guide.
Code:
#!/bin/sh
# author: antti.lagus@gmail.com
# script for monitoring internet connection
# uses following crontab (/var/spool/cron/crontabs/<routeradminname>):
# *       *       *       *       *       /jffs/check_net_routerv
# restoring crontab with /jffs/cp_netchecker (called after boot in result of the USB "hack", nvram rows below):
# contets of /jffs/cp_netchecker:
# cp /jffs/<rooteradminname> /var/spool/cron/crontabs/
#
# SO, copy this file as /jffs/check_net_routerv AND run the following commands:
# echo "*       *       *       *       *       /jffs/check_net_routerv" > /jffs/<rooteradminname>
# cp /jffs/<rooteradminname> /var/spool/cron/crontabs/
# service restart_crond
# echo "cp /jffs/<routeradminname> /var/spool/cron/crontabs/" > /jffs/cp_netchecker
# chmod 755 /jffs/check_net_routerv /jffs/cp_netchecker
# nvram set script_usbmount="/jffs/cp_netchecker"
# nvram commit

THRESHOLD="3" #how much we tolerate
PRB_FILE="/jffs/asus_nw_problems"

ping -c2 8.8.8.8 > /dev/null

# if internet connection down
if [[ "$?" -ne 0 ]];then
        echo "We're screwed!" >> /tmp/netwatch
        MINUTES="$(wc -l /tmp/netwatch | awk '{print $1}')"
        DATE=$(date +%Y%m%d_%H%M)

        #try to renew the IP from ISP first
        if [[ "$MINUTES" == "1" ]];then
                echo -e "$DATE:\tInternet connection was down, trying renewing the IP." >> "$PRB_FILE"
                /sbin/udhcpc -q -i usb0

        #restart modem after 2 minutes of outage
        elif [[ "$MINUTES" == "2" ]];then
                echo -e "$DATE:\tInternet connection was down for 2 minutes restarting modem." >> "$PRB_FILE"
                /usr/sbin/modem_enable.sh

        # if down for THRESHOLD minutes (cron runs this every minute), reboot
        elif [[ "$MINUTES" -ge "$THRESHOLD" ]];then
                echo -e "$DATE:\tNetwork was down for $MINUTES minutes, rebooting router." >> "$PRB_FILE"
                /sbin/reboot
fi

# if network ok, remove monitoring file
else
        echo -e "\nInternet connection OK.\n"
        if [ -s /tmp/netwatch ];then
                rm /tmp/netwatch
        fi
fi
EDIT: Just rember to plug-in the USB-stick so the "hack" works and crontab gets copied after boot :).
EDIT2: New version of the script, added reloading modem as the next step if renewing of WAN IP doesn't work.
 
Last edited:
Here is the script, comments include a small guide.
Code:
#!/bin/sh
# author: antti.lagus@gmail.com
# script for monitoring internet connection
# uses following crontab (/var/spool/cron/crontabs/<routeradminname>):
# *       *       *       *       *       /jffs/check_net_routerv
# restoring crontab with /jffs/cp_netchecker (called after boot in result of the USB "hack", nvram rows below):
# contets of /jffs/cp_netchecker:
# cp /jffs/<rooteradminname> /var/spool/cron/crontabs/
#
# SO, copy this file as /jffs/check_net_routerv AND run the following commands:
# echo "*       *       *       *       *       /jffs/check_net_routerv" > /jffs/<rooteradminname>
# cp /jffs/<rooteradminname> /var/spool/cron/crontabs/
# service restart_crond
# echo "cp /jffs/<routeradminname> /var/spool/cron/crontabs/" > /jffs/cp_netchecker
# chmod 755 /jffs/check_net_routerv /jffs/cp_netchecker
# nvram set script_usbmount="/jffs/cp_netchecker"
# nvram commit

THRESHOLD="3" #how much we tolerate
PRB_FILE="/jffs/asus_nw_problems"

ping -c2 8.8.8.8 > /dev/null

# if internet connection down
if [[ "$?" -ne 0 ]];then
        echo "We're screwed!" >> /tmp/netwatch
        MINUTES="$(wc -l /tmp/netwatch | awk '{print $1}')"
        DATE=$(date +%Y%m%d_%H%M)

        #try to renew the IP from ISP first
        if [[ "$MINUTES" == "1" ]];then
                echo -e "$DATE:\tInternet connection was down, trying renewing the IP." >> "$PRB_FILE"
                /sbin/udhcpc -q -i usb0

        #restart modem after 2 minutes of outage
        elif [[ "$MINUTES" == "2" ]];then
                echo -e "$DATE:\tInternet connection was down for 2 minutes restarting modem." >> "$PRB_FILE"
                /usr/sbin/modem_enable.sh

        # if down for THRESHOLD minutes (cron runs this every minute), reboot
        elif [[ "$MINUTES" -ge "$THRESHOLD" ]];then
                echo -e "$DATE:\tNetwork was down for $MINUTES minutes, rebooting router." >> "$PRB_FILE"
                /sbin/reboot
fi

# if network ok, remove monitoring file
else
        echo -e "\nInternet connection OK.\n"
        if [ -s /tmp/netwatch ];then
                rm /tmp/netwatch
        fi
fi
EDIT: Just rember to plug-in the USB-stick so the "hack" works and crontab gets copied after boot :).
EDIT2: New version of the script, added reloading modem as the next step if renewing of WAN IP doesn't work.

Just registered new account on SNBforums just to say THANK YOU for your script!
I also have issues with 4G connection dropping (but unlike you, I have static IP).
Let's see how it works, waiting for connection to drop now :)

Cheers!

EDIT:
Just loaded several speedtest runs at the same time and (as expected) connection dropped.
It happens during upload test and it seems like your script restored the connection!
Code:
20191230_1242:    Internet connection was down, trying renewing the IP.

Attaching the log from the time connection was down
 

Attachments

  • error.txt
    27.5 KB · Views: 381
Last edited:
Good day , hello
please excuse me if my english is not that good,
could you please explain to me exactly how this works, I find in my Asus, not the "/ var / spool / cron / crontabs / <routeradminname>" not in the router and not in the memory? I tried everything with ssh and and, please help because I have at least 8 interruptions from the wan per day and the router does not reconnect to LTE, so I really want to install it, thank you very much.

4G-AC68U
Firmware-Version:3.0.0.4.384_81974
 
When my DSL-AC68U fails over to a USB 4G card the router LAN IP adress changes. It also seems to change the DHCP scope. I did a factory reset and was able to replicate after it was setup again. Anyone seen this?

My router LAN IP went from 192.168.1.250 to 192.168.2.1. The DHCP was something like 192.168.2.x to 192.168.2.y

Didn't seem to want to fail back.

Is this normal?
 
I am having the same issues with a 4G SIM in the UK, the SIM provider keeps refreshing the DHCP and IPV4 assigned to my router every hour.

When this happens I lose WAN connection and the router takes about 2-3 minutes to sort itself out and go back to normal.

I don't understand what you mean by USB, is the router not got an internal 4G modem, is it using USB connection internally?

Will using Merlin firmware help?
 
OK I worked out why the IP address changes. Its just an IP conflict. The USB device want 192.168.1.1 and that happens to be the default router IP too. The router decides to change its IP and this all the other DHCP would not work if it stayed the same so it all kinda gets blown away. Key is to change your default router IP at the start.

The USB 3 port on the router can be configured to be a fail over modem. You just need to add a USB 3g/4g modem. They are commonly given out by Telstra in Australia as a separate item. They work fine with the Telstra supplied router but I would like to know if anyone has a configuration that works with the Asus router.
 
Here is the script, comments include a small guide.
Code:
#!/bin/sh
# author: antti.lagus@gmail.com
# script for monitoring internet connection
# uses following crontab (/var/spool/cron/crontabs/<routeradminname>):
# *       *       *       *       *       /jffs/check_net_routerv
# restoring crontab with /jffs/cp_netchecker (called after boot in result of the USB "hack", nvram rows below):
# contets of /jffs/cp_netchecker:
# cp /jffs/<rooteradminname> /var/spool/cron/crontabs/
#
# SO, copy this file as /jffs/check_net_routerv AND run the following commands:
# echo "*       *       *       *       *       /jffs/check_net_routerv" > /jffs/<rooteradminname>
# cp /jffs/<rooteradminname> /var/spool/cron/crontabs/
# service restart_crond
# echo "cp /jffs/<routeradminname> /var/spool/cron/crontabs/" > /jffs/cp_netchecker
# chmod 755 /jffs/check_net_routerv /jffs/cp_netchecker
# nvram set script_usbmount="/jffs/cp_netchecker"
# nvram commit

THRESHOLD="3" #how much we tolerate
PRB_FILE="/jffs/asus_nw_problems"

ping -c2 8.8.8.8 > /dev/null

# if internet connection down
if [[ "$?" -ne 0 ]];then
        echo "We're screwed!" >> /tmp/netwatch
        MINUTES="$(wc -l /tmp/netwatch | awk '{print $1}')"
        DATE=$(date +%Y%m%d_%H%M)

        #try to renew the IP from ISP first
        if [[ "$MINUTES" == "1" ]];then
                echo -e "$DATE:\tInternet connection was down, trying renewing the IP." >> "$PRB_FILE"
                /sbin/udhcpc -q -i usb0

        #restart modem after 2 minutes of outage
        elif [[ "$MINUTES" == "2" ]];then
                echo -e "$DATE:\tInternet connection was down for 2 minutes restarting modem." >> "$PRB_FILE"
                /usr/sbin/modem_enable.sh

        # if down for THRESHOLD minutes (cron runs this every minute), reboot
        elif [[ "$MINUTES" -ge "$THRESHOLD" ]];then
                echo -e "$DATE:\tNetwork was down for $MINUTES minutes, rebooting router." >> "$PRB_FILE"
                /sbin/reboot
fi

# if network ok, remove monitoring file
else
        echo -e "\nInternet connection OK.\n"
        if [ -s /tmp/netwatch ];then
                rm /tmp/netwatch
        fi
fi
EDIT: Just rember to plug-in the USB-stick so the "hack" works and crontab gets copied after boot :).
EDIT2: New version of the script, added reloading modem as the next step if renewing of WAN IP doesn't work.
Hi, by any chance do you have an idea how to use a similar solution on a Asus 4G-AX56, it doesn't have USB port or Merlin firmware support but has Telnet/SSH access.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top