diff options
| -rwxr-xr-x | src/conf_mode/interfaces_wwan.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces_wwan.py b/src/conf_mode/interfaces_wwan.py index 59303196d..87ced1c6f 100755 --- a/src/conf_mode/interfaces_wwan.py +++ b/src/conf_mode/interfaces_wwan.py @@ -195,6 +195,23 @@ def apply(wwan): if 'authentication' in wwan: options += ',user={username},password={password}'.format(**wwan['authentication']) + # Some networks only ever admit a single combined IPv4+IPv6 PDN context + # per APN and reject a standalone IPv6 "Start Network" request outright + # (QMI CallEndReason ip-version-mismatch) once an IPv4 session already + # exists for that APN. ModemManager's --simple-connect with + # ip-type=ipv4v6 opens two separate WDS sessions (one per family) rather + # than negotiating both together, which is what a normal handset attach + # does and why this is invisible on most other devices. + # + # Pre-negotiating the attach-time PDN type upfront avoids the rejection; + # the resulting bearer only sets up what the *next* --simple-connect is + # allowed to request and can't be connected directly, so a failure here + # isn't fatal - unsupported modems simply proceed to --simple-connect + # exactly as before. + if ip_type in ('ipv4v6', 'ipv6'): + call(f'{base_cmd} --3gpp-set-initial-eps-bearer-settings="{options}"', + stdout=DEVNULL) + command = f'{base_cmd} --simple-connect="{options}"' call(command, stdout=DEVNULL) |
