Restore unconditional BAM-DMUX wwan0 open for ModemManager and add primary-SIM QMI VOICE USSD fallback
MMPluginQcomSoc requires net/wwan0 to export /org/freedesktop/ModemManager1/Modem/0, so gating --dpm-open-port on type=gsm NetworkManager profiles left ModemManager with 'No modems were found' on Wi-Fi-only setups while bam-dmux already runtime-suspends in 1000 ms (pc_state=0) when idle. - Always open the BAM-DMUX QMI DPM port in msm8909-modem-wwan-port before ModemManager starts and keep wwan0 registered across NetworkManager down events. - Add -d qrtr://0 fallback and late-open mmcli rescan handling in bananarchy-dpm.sh and msm-modem-uim-selection provision_slot(). - Resolve mm_modem via mmcli -L in msm-modem-uim-selection ussd and fall back to direct AF_QIPCRTR QMI VOICE USSD (sub=0) on the primary SIM alongside sub=1 on the secondary SIM. - Rebuild and pin nokia-argon and nokia-beatles a1114 (carbonara) images and update guards and docs.
This commit is contained in:
1 parent
c95a84c69c
commit
b2cf028808
8 files changed
+246
-120
No files matched your search
@@ -1,14 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Open/close the QMI BAM-DMUX data port on demand (U9/K11).
|
||||
# With Wi-Fi as the default route and no cellular data profile there is no
|
||||
# reason to keep the modem data plane open at boot.
|
||||
QMICLI="qmicli --silent -pd qrtr://0"
|
||||
# Open/close the QMI BAM-DMUX data port. Keep it open during normal operation
|
||||
# so bam-dmux exposes net/wwan0 for ModemManager's qcom-soc plugin (bam-dmux
|
||||
# runtime-suspends after 1000 ms of inactivity with pc_state=0).
|
||||
DPM_ARGS="hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=1,hw-data-rx-id=1,hw-data-tx-id=1"
|
||||
case "${1:-}" in
|
||||
open)
|
||||
$QMICLI --dpm-open-port=hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=1,hw-data-rx-id=1,hw-data-tx-id=1 >/dev/null 2>&1 || true
|
||||
had_wwan0=0
|
||||
[ -d /sys/class/net/wwan0 ] && had_wwan0=1
|
||||
if ! timeout 4 qmicli --silent -pd qrtr://0 --dpm-open-port="$DPM_ARGS" >/dev/null 2>&1; then
|
||||
timeout 4 qmicli --silent -d qrtr://0 --dpm-open-port="$DPM_ARGS" >/dev/null 2>&1 || true
|
||||
fi
|
||||
if [ "$had_wwan0" -eq 0 ]; then
|
||||
w=0
|
||||
while [ "$w" -lt 25 ] && [ ! -d /sys/class/net/wwan0 ]; do
|
||||
sleep 0.1
|
||||
w=$((w + 1))
|
||||
done
|
||||
if [ -d /sys/class/net/wwan0 ] && command -v mmcli >/dev/null 2>&1; then
|
||||
if ! timeout 2 mmcli -L 2>/dev/null | grep -q '/Modem/'; then
|
||||
timeout 3 mmcli -S >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
close)
|
||||
$QMICLI --dpm-close-port=hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=1,hw-data-rx-id=1,hw-data-tx-id=1 >/dev/null 2>&1 || true
|
||||
if ! timeout 4 qmicli --silent -pd qrtr://0 --dpm-close-port="$DPM_ARGS" >/dev/null 2>&1; then
|
||||
timeout 4 qmicli --silent -d qrtr://0 --dpm-close-port="$DPM_ARGS" >/dev/null 2>&1 || true
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
printf 'Usage: %s [open|close]\n' "${0##*/}" >&2
|
||||
|
||||
Reference in new issue
Block a user