Commit246506690f("modemmanager: always reset the init_eps if not configured") changed the behaviour for an unset 'init_epsbearer' from leaving the modem untouched to clearing the initial EPS bearer on every setup. This is a regression for users upgrading from 24.10: - Modems without support for setting the LTE attach configuration (e.g. Sierra Wireless EM7430) fail the setup with MM_INIT_EPS_BEARER_SET_FAILED and never come up. - Attach settings preloaded by the carrier firmware are wiped. The same commit also removed the explicit 'none' case, so 'none' now silently skips the initial EPS bearer setup, while it cleared it in 24.10. Neither matches the documentation. Make all modes explicit, each naming where the initial EPS bearer settings come from: - modem: leave the settings stored on the modem unchanged (default) - network: set an empty initial EPS bearer, the network assigns the APN; replaces the implicit clear, e.g. after a SIM swap - connection: use the connection options (apn, iptype, ...) - custom: use the init_* options 'none' and 'default' are kept as deprecated aliases for 'modem' and 'connection'. 'none' maps to 'modem' as documented in the README and as it behaves since246506690f, although an explicit 'none' cleared the initial EPS bearer in 24.10; use 'network' for that. Unknown values fall back to 'modem'. The README now documents the modes and how to clear stale settings manually. Fixes: https://github.com/openwrt/packages/issues/30299 Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
OpenWrt ModemManager
Description
Cellular modem control and connectivity
Optional libraries libmbim and libqmi are available. Your modem may require additional kernel modules and/or the usb-modeswitch package.
Usage
Once installed, you can configure the 2G/3G/4G modem connections directly in /etc/config/network as in the following example:
config interface 'broadband'
option device '/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2.1'
option proto 'modemmanager'
option apn 'ac.vodafone.es'
option allowedauth 'pap chap'
option username 'vodafone'
option password 'vodafone'
option pincode '7423'
option iptype 'ipv4'
option plmn '214001'
option lowpower '1'
option signalrate '30'
option allow_roaming '1'
option force_connection '1'
option init_epsbearer '<modem|network|connection|custom>'
option timeout '120'
Only 'device' and 'proto' are mandatory options, the remaining ones are all optional.
The 'allowedauth' option allows limiting the list of authentication protocols. It is given as a space-separated list of values, including any of the following: 'pap', 'chap', 'mschap', 'mschapv2' or 'eap'. It will default to allowing all protocols.
The 'iptype' option supports any of these values: 'ipv4', 'ipv6' or 'ipv4v6'. It will default to 'ipv4' if not given.
The 'plmn' option allows to set the network operator MCCMNC.
The 'signalrate' option set's the signal refresh rate (in seconds) for the device. You can call signal info with command: mmcli -m 0 --signal-get
The 'timeout' option set's the command timeout (in seconds) for the long running 'mmcli' calls ('enable', 'simple-connect', 3gpp-register-in-operator' and '3gpp-set-initial-eps-bearer-settings') in the modemmanager protohandler. The default value is 120 seconds, if no value is configured.
The 'force_connection' option is designed to ensure that the modem automatically attempts to reconnect regardless of any errors encountered during the connection process.
On 4G and 5G networks, the modem attaches to the network with an initial EPS bearer, before the data connection is established. The 'init_epsbearer' option selects where the settings for this initial EPS bearer come from:
- modem: Leave the initial EPS bearer settings stored on the modem unchanged (default). These are usually provided by the carrier firmware or set by a previous configuration.
- network: Set an empty initial EPS bearer, so the network assigns the APN. Use this to override settings left on the modem, e.g. after swapping the SIM card.
- connection: Use the options 'apn', 'iptype', 'allowedauth', 'username' and 'password', the same options as for the data connection.
- custom: Use separate options, prefixed with 'init_': 'init_apn', 'init_iptype', 'init_allowedauth', 'init_username' and 'init_password'.
The values 'none' and 'default' are deprecated aliases for 'modem' and 'connection'.
The initial EPS bearer settings stored on the modem can also be cleared once manually:
mmcli -m <modem> --3gpp-set-initial-eps-bearer-settings=""