Detect IP change on wwan0

Its probably a simple problem with a simple solution, yet I haven't found an answer on google, nor on the forum.

Simply: I've got a wrt box with an EM7455 module managed by modem manager. The provider uses a private network under a CGNAT and periodically (every 4 hours) changes the IP.

So Every 4 hours the connection stops working and by typing "ifconfig" I can see wwan0 has retained the same IP before the change.

So is there a way to detect the IP change and / or restart wwan0 automatically ?

The problem doesn't happen on ubuntu with modem manager

Sure, set a scheduled task to run the restart command.

Ehm... what' the restart command for wwan0 ?

( on the forum I found lots of complex solutions involving idown then cdc_wdm0 start then ifup, then...)

ifup wwan
2 Likes

awesome ! thank you

1 Like