Skip to content

modemmanager: rework initial EPS bearer modes - #30670

Open
micpf wants to merge 1 commit into
openwrt:masterfrom
micpf:modemmanager-init-eps-modem
Open

micpf wants to merge 1 commit into
openwrt:masterfrom
micpf:modemmanager-init-eps-modem

Conversation

@micpf

@micpf micpf commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

📦 Package Details

Maintainer: @feckert

Description:
Commit 2465066 ("modemmanager: always reset the init_eps if not configured", #27391) changed an unset init_epsbearer from leave the modem untouched to clear the initial EPS bearer on every ifup. This is a regression when upgrading from 24.10 to 25.12:

  • Modems that do not support setting the LTE attach configuration (e.g. Sierra Wireless EM7430: LTE attach configuration is unsupported) now fail with MM_INIT_EPS_BEARER_SET_FAILED, and the interface never comes up.
  • Attach settings preloaded by the carrier firmware are wiped.
  • The same commit removed the explicit none branch, so none now silently skips the setup, while in 24.10 it cleared it. The README and LuCI (which stores '' for "none") describe neither behaviour correctly (modemmanager: init_epsbearer=none behavior differs from documentation and breaks EM7430 #30299).

I understand the motivation of 2465066 (stale attach settings, e.g. after a SIM swap), so this keeps the clear as an explicit mode instead of the implicit default. Each value now names where the initial EPS bearer settings come from:

Value Behaviour
modem (default, also when unset) leave the settings stored on the modem unchanged
network set an empty initial EPS bearer, the network assigns the APN (reapplied on every ifup)
connection use the connection options (apn, iptype, …)
custom use the init_* options

none and default are kept as deprecated aliases for modem and connection, so existing configs keep working. Unknown values fall back to modem. The README documents the modes and the one-shot mmcli -m <modem> --3gpp-set-initial-eps-bearer-settings="" to clear stale settings manually.

Fixes #30299
LuCI counterpart: openwrt/luci#9098


🧪 Run Testing Details

  • OpenWrt Version: 25.12 (downstream)
  • OpenWrt Target/Subtarget: downstream powerpc64 target
  • OpenWrt Device: custom device with cellular modem

Tested the init_epsbearer case block in isolation (with mmcli stubbed) for all values (unset, modem, none, network, connection, default, custom, unknown) and that a failing mmcli call still aborts the setup.


✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

Commit 2465066 ("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'. Unknown values fall back to 'modem'. The README now
documents the modes and how to clear stale settings manually.

Fixes: openwrt#30299
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
[ "$?" -ne "0" ] && return 1
fi
case "${init_epsbearer:-modem}" in
"modem"|"none")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 24.10 an explicit none cleared the initial EPS bearer ("none") branch at modemmanager.sh:634),`` which is what network does now. Aliasing `none` to `modem` keeps the post-246506690 skip, so a 24.10 config with `init_epsbearer 'none'` still behaves differently after the upgrade. Is aliasing `none` to `modem` rather than `network` intentional?


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modemmanager: init_epsbearer=none behavior differs from documentation and breaks EM7430

2 participants