Skip to content
Contents
GuidesOpenWrt

Why can OpenWrt QMI write the APN to profile 1 when I select profile 2?

Suppose profile 1 provides regular access and profile 2 uses a private APN. A dial attempt can write modem settings before selecting a session profile. Seeing 2 in LuCI does not tell you whether profile 1 changed.

Suppose profile 1 provides regular access and profile 2 uses a private APN. A dial attempt can write modem settings before selecting a session profile. Seeing 2 in LuCI does not tell you whether profile 1 changed.

Check before reconnecting

These read-only commands apply to QMI with uqmi. Use wired local access and replace lte with the logical interface name. If profile 1 matters, hold off on reconnecting. Record each APN and PDP type with the modem’s own tools. A router backup may omit them. If the number is blank, check the interface name and whether a profile is explicitly set.

uci -q get network.lte.proto
uci -q get network.lte.profile
uci -q get network.lte.v6profile
grep -nE 'profile_id|modify-profile|--profile|v6profile' /lib/netifd/proto/qmi.sh

Compare the two scripts

In the 24.10.2, 25.12.4 and 25.12.6 sources checked here, the write targets profile 1 while session startup can take another number. The first image shows that write. The upstream change in the second uses the configured number, falling back to 1. Check your installed script and any separate IPv6 profile. A write attempt does not prove the modem accepted it.

qmi.sh · OpenWrt 25.12.6 · 3gpp,1
OpenWrt 25.12.6 · 3gpp,1

qmi.sh · OpenWrt 25.12.6 · 3gpp,1

qmi.sh · cb4e665d · 3gpp,$profile_id
cb4e665d · 3gpp,$profile_id

qmi.sh · cb4e665d · 3gpp,$profile_id

24.10.2 · 25.12.4

Verify both profiles

If profile 1 changed, pause automatic retries and restore its values using the modem documentation. With backup access, a verified script and a recovery plan, connect once. Read both profiles again. Confirm the first is unchanged, the second is correct and the intended service works. On failure restore the original settings and uplink. Avoid copying scripts across releases. This is a source comparison without a live modem test.

QMI reports PIN ERROR for a SIM without a PIN. Check the not_initialized state

Explore hardware

Comments