Keep wwan connection alive

Raspberry Pi 4 Model B Rev 1.2
ARMv8 Processor rev 3
bcm27xx/bcm2711
OpenWrt 22.03.0-rc1 r19302-df622768da / LuCI openwrt-22.03 branch git-22.119.37115-66994a5

I have a 4g wifi device and managed to make this a second wan connection 'wwan' (with the help of mwan3)
This works great, if my default wan 'wan' fails, it takes the wifi 4g router as wan connection. So far so good. (I use a wifi radio from the rpi4 for this connection)

But it is a simple wifi 4g router, so if there is no wifi connection /activity between my rpi and the wifi 4g router for more than half an hour. The connection drops and I need to manual push a button.

So I need some kind of script / cron rule to keep the wifi connection tot the 4g router alive. How can I make this work for this wwan?

(not tested yet, but mayby the wifi connection stays alive by default?)

Scheduled task...ping x.x.x.x every...29 minutes?

I thought that mwan3 itself can be set to periodically ping through all the wans. It's the basis of how it keeps track of which are usable.

That is no problem, but how to I send that ping over the wwan that is not active (by mwan3) at that time. It is online, but there is no routing, because that only happens when my main wan is down.

So it should work by default, I'll just sit and wait for 31 minutes and do nothing... :wink: well some coffee maybe

You could run tcpdump on the wwan interface to see if any pinging actually occurs.

It appears to stay up, it's a few hours now en still a connection. So case closed I think.

Thanks for the quick help!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.