I am still struggling to keep the x3000 router connected to the 4g/5g network. I have been sniffing around in the firmware a bit and this is what I found up to now. Maybe there is a solution!
The router seems to loose internet connection exactly at 6 hour intervals. I have the impression that the 4g/5g provider is changing the module-ipadress every 6 hours which then results in a mismatch with the router interface-ipadress and hence a break in the internet connection:
module-ip via gl_modem -B 0001:01:00.0 AT AT+CGPADDR
I have seen that there is a /lib/functions/modem.sh file that seems to have a function called “check_ip” that is exactly checking that these two ip-adressess are the same. If they are not the same the interface is restarted:
modem-ip via module_ip = $(gl_modem -B $bus AT AT+CGPADDR | grep "+CGPADDR: $apn_route" | grep -v '0.0.0.0')
router-ip via interface_ip = $(ubus call network.interface.${modem_iface}_4 status | jsonfilter -e '@["ipv4-address"][0].address')
check if they are both “not empty” if [ -n "$module_ip" -a -n "$interface_ip" ]; then
The problem is that the AT+CGPADDR command returns an ipv4 and an ipv6 adress. If this ipv6 adress somewhere contains 0.0.0.0 the $module_ip variable will be empty and hence the test will not continue and also the mismatch between the two ip-adresses will not be noticed and repaired. E.g. the output of gl_modem -B 0001:01:00.0 AT AT+CGPADDR in my case clearly contains 0.0.0.0 in the ipv6 adress:
@SpitzAX3000 I think your modem has an ipv6 adress (see yellow highlight below). You are lucky that there is no 0.0.0.0 in that adress. So the check_ip script runs normally for your case. This might be the reason for your long up-time.
I installed internet-detector. Each time internet is detected to be down, the interface is restarted and a small script is run that triggers a heartbeat (via a dedicated wget URL) here at home. See below. So in a sense I am able to get around the disconnection issue, but I want the solution to come integrated in the FW of the X3000. Not something that I had to fabricate myself!
Hey. That is a good suggestion. But I will only try something so “drastic” as this when i am close to the router. Now I am a few 100s of km away so I can not risk of getting myself permanently locked out. That it why I would love to see a function implemented in the firwmware that allows me to restart/reset the router upon receiving a certain sms command (like the Teltonika routers). Like this I can always regain control …
I have implemented the suggested change and disabled the “internet-detector” plug-in. I restarted the router. Now I have to wait at least 6h to see if it is solved … “fingers-crossed” …
I think we have a succes! Exactly 6h after the reboot the ip adress change was detected and the appropriate action was taken! Nice … thanks … this should go in the official firmware .