diff options
author | David Bauer <mail@david-bauer.net> | 2023-10-09 23:10:10 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2023-10-31 21:12:15 +0100 |
commit | 79912a953111dee20a6f8abdf31a4fc25a9b160e (patch) | |
tree | 7540f9463cee7c9accdc05330af2842e502d7c98 /package | |
parent | c4321462e45c2e78b2870bb5707784022bc47d20 (diff) |
uqmi: configure PDP type and APN to modem
Configure the PLMN and APN to the modem. This is required in cases,
where either the SGSN or GGSN does not permit the selection of IPv4v6
pdp type.
Previously, the modem always tried to establish a dual-stacked PDP
context regardless of the configured PDP type in uci. As this setting
can not be parameterized when creating a WDS context, configure it to
the modems internal list of profiles. This way, the PDP type is taken
into account when creating the WDS context.
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package')
-rwxr-xr-x | package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 8 |
1 files changed, 8 insertions, 0 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 7b93a03ee5..f8e655455a 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -38,6 +38,7 @@ proto_qmi_setup() { local ip4table ip6table local cid_4 pdh_4 cid_6 pdh_6 local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 + local profile_pdptype json_get_vars device apn v6apn auth username password pincode delay modes json_get_vars pdptype profile v6profile dhcp dhcpv6 autoconnect plmn ip4table @@ -296,6 +297,13 @@ proto_qmi_setup() { [ "$pdptype" = "ip" -o "$pdptype" = "ipv6" -o "$pdptype" = "ipv4v6" ] || pdptype="ip" + # Configure PDP type and APN for profile 1. + # In case GGSN rejects IPv4v6 PDP, modem might not be able to + # establish a non-LTE data session. + profile_pdptype="$pdptype" + [ "$profile_pdptype" = "ip" ] && profile_pdptype="ipv4" + uqmi -s -d "$device" --modify-profile "3gpp,1" --apn "$apn" --pdp-type "$profile_pdptype" > /dev/null 2>&1 + if [ "$pdptype" = "ip" ]; then [ -z "$autoconnect" ] && autoconnect=1 [ "$autoconnect" = 0 ] && autoconnect="" |