diff options
author | David Bauer <mail@david-bauer.net> | 2023-10-09 23:08:01 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2023-10-31 21:12:15 +0100 |
commit | c4321462e45c2e78b2870bb5707784022bc47d20 (patch) | |
tree | 89657be8d6a1579d7da663b327cda1f0ee3998fc /package/network/utils/uqmi/files/lib/netifd | |
parent | c1fcce111290875ca463d785550d53e2ff6014fd (diff) | |
download | openwrt-c4321462e45c2e78b2870bb5707784022bc47d20.tar.gz openwrt-c4321462e45c2e78b2870bb5707784022bc47d20.tar.bz2 openwrt-c4321462e45c2e78b2870bb5707784022bc47d20.zip |
uqmi: fix non-working PLMN selection
The PLMN selection was reset when calling network-register, thus
rendering the sepcific selection of a carrier unapplied.
Set the PLMN selection after executing network-register. This seems to
cause the modem to re-select the carrier eventually.
That being said, qmi does allow the parameterization of the
network-register to include dpecific PLMN settings, however this is
currently not implemented in uqmi.
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package/network/utils/uqmi/files/lib/netifd')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 96555f537c..7b93a03ee5 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -216,15 +216,6 @@ proto_qmi_setup() { fi fi - if [ -n "$mcc" -a -n "$mnc" ]; then - uqmi -s -d "$device" --set-plmn --mcc "$mcc" --mnc "$mnc" > /dev/null 2>&1 || { - echo "Unable to set PLMN" - proto_notify_error "$interface" PLMN_FAILED - proto_block_restart "$interface" - return 1 - } - fi - # Cleanup current state if any uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect > /dev/null 2>&1 uqmi -s -d "$device" --set-ip-family ipv6 --stop-network 0xffffffff --autoconnect > /dev/null 2>&1 @@ -252,6 +243,16 @@ proto_qmi_setup() { uqmi -s -d "$device" --network-register > /dev/null 2>&1 + # PLMN selection must happen after the call to network-register + if [ -n "$mcc" -a -n "$mnc" ]; then + uqmi -s -d "$device" --set-plmn --mcc "$mcc" --mnc "$mnc" > /dev/null 2>&1 || { + echo "Unable to set PLMN" + proto_notify_error "$interface" PLMN_FAILED + proto_block_restart "$interface" + return 1 + } + fi + [ -n "$modes" ] && { uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1 sleep 3 |