Hi,
Following How to change GL-X300B IMEI post, I managed to get the GL-X300B to connect to my service provider. Everything works fine until the provider renews the IP (every 2 hours). After the cellular provider IP renew the cellular connection stops working as the X300B does not detect the change.
I had to create a wan-watchdog script to reset the interface with ifup (see script below) and add it to the crontab (every minute) to ensure that the connection is available again after IP renew.
The router is at the latest version and not specific changes were made except for the IMEI and APN. Ethernet WAN, Wifi and repeater are disabled. Only cellular and LAN ethernet are used. Interface atatus Tracking is disabled for cellular as I don’t need failover (no other internet interface).
Current Firmware Version: 4.0
Firmware Type: 0522release1
Compile Time: 2025-04-10 06:25:53 (UTC+00:00)
Do you know if there is something wrong in my configuration ?
Thank you in advance.
Fri Aug 14 00:01:20 2026 daemon.notice netifd: Interface 'modem_1_1' is now up Fri Aug 14 00:01:20 2026 daemon.notice netifd: Network device 'wwan0' link is up Fri Aug 14 00:01:20 2026 daemon.notice netifd: Network alias 'wwan0' link is up Fri Aug 14 00:01:21 2026 user.notice kmwan: config json str={ "op": 3, "data": { "cells": [ "modem_1_1" ] } } Fri Aug 14 00:01:21 2026 daemon.notice netifd: Interface 'modem_1_1_4' is enabled Fri Aug 14 00:01:21 2026 daemon.notice netifd: Interface 'modem_1_1_4' has link connectivity Fri Aug 14 00:01:21 2026 daemon.notice netifd: Interface 'modem_1_1_4' is setting up now Fri Aug 14 00:01:21 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: started, v1.35.0 Fri Aug 14 00:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: broadcasting discover Fri Aug 14 00:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: broadcasting select for 10.46.77.192, server 10.46.77.193 Fri Aug 14 00:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 00:01:22 2026 daemon.notice netifd: Interface 'modem_1_1_4' is now up Fri Aug 14 00:01:23 2026 user.notice firewall: Reloading firewall due to ifup of modem_1_1 (wwan0) Fri Aug 14 00:01:30 2026 user.notice firewall: Reloading firewall due to ifup of modem_1_1_4 (wwan0) Fri Aug 14 01:01:21 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 01:01:21 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 02:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 02:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 03:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 03:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 04:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 04:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 05:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 05:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 06:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 06:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 07:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 07:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 08:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 08:01:22 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 09:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 09:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 10:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 10:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 11:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 11:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: lease of 10.46.77.192 obtained from 10.46.77.193, lease time 7200 Fri Aug 14 12:00:13 2026 user.notice wan-watchdog: WAN unreachable via wwan0 (1/3) Fri Aug 14 12:01:13 2026 user.notice wan-watchdog: WAN unreachable via wwan0 (2/3) Fri Aug 14 12:01:23 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending renew to server 10.46.77.193 Fri Aug 14 12:02:13 2026 user.notice wan-watchdog: WAN unreachable via wwan0 (3/3) Fri Aug 14 12:02:13 2026 user.notice wan-watchdog: re-dialling modem_1_1 (attempt 1): 3 consecutive ping failures Fri Aug 14 12:02:13 2026 daemon.notice netifd: modem_1_1 (14693): Stopping network modem_1_1 Fri Aug 14 12:02:13 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: received SIGTERM Fri Aug 14 12:02:13 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: unicasting a release of 10.46.77.192 to 10.46.77.193 Fri Aug 14 12:02:13 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: sending release Fri Aug 14 12:02:13 2026 daemon.notice netifd: modem_1_1_4 (11173): udhcpc: entering released state Fri Aug 14 12:02:13 2026 daemon.notice netifd: modem_1_1_4 (11173): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "modem_1_1_4" } (Permission denied) Fri Aug 14 12:02:13 2026 daemon.notice netifd: Interface 'modem_1_1_4' is now down Fri Aug 14 12:02:13 2026 daemon.notice netifd: Network alias '' link is down Fri Aug 14 12:02:13 2026 daemon.notice netifd: Interface 'modem_1_1_4' has link connectivity loss Fri Aug 14 12:02:13 2026 daemon.notice netifd: Interface 'modem_1_1_4' is disabled Fri Aug 14 12:02:14 2026 daemon.notice netifd: modem_1_1 (14693): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "modem_1_1" } (Permission denied) Fri Aug 14 12:02:14 2026 daemon.notice netifd: Interface 'modem_1_1' is now down Fri Aug 14 12:02:14 2026 daemon.notice netifd: Interface 'modem_1_1' is setting up now Fri Aug 14 12:02:14 2026 user.notice firewall: Reloading firewall due to ifdown of modem_1_1 () Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): ERROR Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): ERROR Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:16 2026 daemon.notice netifd: modem_1_1 (14737): OK Fri Aug 14 12:02:17 2026 daemon.notice netifd: modem_1_1 (14737): Failed to parse message data Fri Aug 14 12:02:17 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:17 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:17 2026 daemon.notice netifd: modem_1_1 (14737): ERROR Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): ERROR Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): OK Fri Aug 14 12:02:18 2026 daemon.notice netifd: modem_1_1 (14737): cat: can't open '/proc/gl-hw-info/sim': No such file or directory Fri Aug 14 12:02:19 2026 daemon.notice netifd: modem_1_1 (14737): Waiting for SIM initialization Fri Aug 14 12:02:20 2026 daemon.notice netifd: modem_1_1 (14737): Starting network modem_1_1 Fri Aug 14 12:02:20 2026 daemon.notice netifd: modem_1_1 (14737): Setting up wwan0 Fri Aug 14 12:02:20 2026 daemon.notice netifd: Interface 'modem_1_1' is now up
Watchdog script executed every minute:
#!/bin/sh
# WAN watchdog for GL-X300B. Runs once a minute from cron.
# Pings through the cellular device, re-dials on sustained failure, reboots if
# re-dialling doesn't help. Deliberately does NOT touch the QMI control plane.
IFACE="${IFACE:-modem_1_1}"
TARGETS="${TARGETS:-1.1.1.1 8.8.8.8 9.9.9.9}"
FAILS="${FAILS:-/tmp/wan-watchdog.fail}"
REDIALS="${REDIALS:-/tmp/wan-watchdog.redial}"
LOCK="${LOCK:-/tmp/wan-watchdog.lock}"
MAX_FAIL="${MAX_FAIL:-3}"
MAX_REDIAL="${MAX_REDIAL:-2}"
MIN_UPTIME="${MIN_UPTIME:-1800}"
DRY_RUN="${DRY_RUN:-0}"
mkdir "$LOCK" 2>/dev/null || {
logger -t wan-watchdog "previous run still active, skipping"
exit 0
}
trap 'rmdir "$LOCK" 2>/dev/null' EXIT INT TERM
num() { # echo $1 if it is a non-negative integer, else 0
case "$1" in ''|*[!0-9]*) echo 0 ;; *) echo "$1" ;; esac
}
run() { # execute, or only report when DRY_RUN=1
if [ "$DRY_RUN" = 1 ]; then
echo "DRY-RUN: would run: $*"
logger -t wan-watchdog "DRY-RUN: would run: $*"
return 0
fi
"$@"
}
recover() {
r=$(num "$(cat "$REDIALS" 2>/dev/null)")
r=$((r + 1))
echo "$r" > "$REDIALS"
rm -f "$FAILS"
if [ "$r" -gt "$MAX_REDIAL" ]; then
up=$(num "$(cut -d. -f1 /proc/uptime 2>/dev/null)")
if [ "$up" -gt "$MIN_UPTIME" ]; then
logger -t wan-watchdog "$r recoveries failed, rebooting (uptime ${up}s): $1"
sync
run reboot
exit 0
fi
logger -t wan-watchdog "would reboot but uptime ${up}s <= ${MIN_UPTIME}s, re-dialling instead"
fi
logger -t wan-watchdog "re-dialling $IFACE (attempt $r): $1"
run ifup "$IFACE"
exit 0
}
DEV=$(ubus call network.interface.${IFACE}_4 status 2>/dev/null \
| jsonfilter -e '@.l3_device' 2>/dev/null)
[ -z "$DEV" ] && DEV=wwan0
for t in $TARGETS; do
if ping -q -c 2 -W 3 -I "$DEV" "$t" >/dev/null 2>&1; then
rm -f "$FAILS" "$REDIALS"
exit 0
fi
done
n=$(num "$(cat "$FAILS" 2>/dev/null)")
n=$((n + 1))
echo "$n" > "$FAILS"
logger -t wan-watchdog "WAN unreachable via $DEV ($n/$MAX_FAIL)"
[ "$n" -ge "$MAX_FAIL" ] && recover "$MAX_FAIL consecutive ping failures"
exit 0