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.
36 lines
1.3 KiB
Bash
Executable File
36 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# 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)
|
|
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)
|
|
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
|
|
exit 1
|
|
;;
|
|
esac
|