Is there a way to force the 4G modem to start on boot if its been disconnected in the GUI on the GL-X750 v2, I am finding that if the modem Disconnect Button gets pressed in the GUI it doesn’t restart on a power cycle.
I need to have this router in a remote setup and need to ensure the 4G modem comes up when doing a remote power cycle, once the disconnect button has been pressed the only way I can get the modem back online is by pressing Auto Setup in the GUI which won’t be possible to do when its remote mounted as I won’t be able to connect to it without the modem online.
I found in the modem-init script that as the x750 wasn’t listed in the case statement it only gets sent command gl_modem thermal
which returns thermal setting failed
it was never being sent the gl_modem connect-auto
command to force it to connect it.
I modified the modem-init script as below to include the x750 and commented out the thermal command and it now seems to bring the 4G connection up on startup as I would expect it to.
START=70
modem_auto_connect()
{
local bus="$1"
[ -z "$bus" ] && return 1
local iface=modem_"$(echo "$bus"|sed 's/-/_/g')"
[ -z "$(uci -q get network.$iface)" ] && {
gl_modem -B "$bus" connect-auto &
}
}
start()
{
. /lib/functions/gl_util.sh
model=$(get_model)
case "$model" in
"xe300"|\
"x750")
modem_auto_connect "1-1.2"
;;
*)
esac
#gl_modem thermal
}```
1 Like
I don’t think it should be this complicated.
Maybe just check /etc/config/network to find out if the modem interface as “option disabled 1” and remove it.