There are situation for mobile routers, that the modemmanager can not
stay connected to the mobile network. There can have various reasons.
In order for the system to reconnect automatically, the netifd must be
informed that it must re-establish the connection.
The modem manager already does have a script callback handling which is
already used by the modemmanager in openwrt. Currently the modem is marked
as not unavailable when a disconnected event is detected.
The behavior was changed with this commit, so that a reconnect of the
interface is now triggerd via the netifd if the modem disconnects.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
PKG_NAME:=modemmanager
PKG_SOURCE_VERSION:=1.22.0
-PKG_RELEASE:=11
+PKG_RELEASE:=12
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
IFUP=$(ifstatus "${CFG}" | jsonfilter -e "@.up")
[ "${IFUP}" = "true" ] && {
- logger -t "modemmanager" "interface ${CFG} (network device ${INTERFACE}) ${STATE}"
- proto_init_update $INTERFACE 0
- proto_send_update $CFG
+ mm_log "info" "Reconnecting '${CFG}' on '${STATE}' event"
+ ubus call network.interface down "{ 'interface': '${CFG}'}"
+ ubus call network.interface up "{ 'interface': '${CFG}'}"
}
exit 0