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
@@ -18,28 +18,41 @@ start() {
|
||||
|
||||
QMICLI_MODEM=""
|
||||
count=0
|
||||
while [ -z "$QMICLI_MODEM" ] && [ "$count" -lt 12 ]; do
|
||||
while [ -z "$QMICLI_MODEM" ] && [ "$count" -lt 15 ]; do
|
||||
if timeout 3 qmicli --silent -pd qrtr://0 --uim-noop >/dev/null 2>&1; then
|
||||
QMICLI_MODEM="timeout 4 qmicli --silent -pd qrtr://0"
|
||||
break
|
||||
elif timeout 3 qmicli --silent -d qrtr://0 --uim-noop >/dev/null 2>&1; then
|
||||
QMICLI_MODEM="timeout 4 qmicli --silent -d qrtr://0"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
# U9: only open the BAM-DMUX data port when a cellular data profile is
|
||||
# actually configured. Otherwise the NetworkManager dispatcher opens it
|
||||
# on demand (see 10-bananarchy-dpm.sh).
|
||||
_need_dpm=0
|
||||
# Always open the BAM-DMUX QMI DPM port at boot so bam-dmux registers
|
||||
# net/wwan0 before ModemManager starts: MMPluginQcomSoc requires a net/*
|
||||
# data port to export /org/freedesktop/ModemManager1/Modem/0 (needed for
|
||||
# USSD, GPS, and SMS/call D-Bus signals), while bam-dmux.c runtime-suspends
|
||||
# automatically after 1000 ms (pc_state=0, DMA released) whenever idle.
|
||||
if [ -n "$QMICLI_MODEM" ]; then
|
||||
attempt=0
|
||||
while [ "$attempt" -lt 3 ] && [ ! -d /sys/class/net/wwan0 ]; do
|
||||
$QMICLI_MODEM --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
|
||||
w=0
|
||||
while [ "$w" -lt 15 ] && [ ! -d /sys/class/net/wwan0 ]; do
|
||||
sleep 0.1
|
||||
w=$((w + 1))
|
||||
done
|
||||
attempt=$((attempt + 1))
|
||||
done
|
||||
fi
|
||||
|
||||
for f in /etc/NetworkManager/system-connections/*.nmconnection; do
|
||||
[ -f "$f" ] || continue
|
||||
if grep -q "^type=gsm" "$f" 2>/dev/null; then
|
||||
_need_dpm=1
|
||||
sed -i '/^\[ipv6\]/,/^\[/ s/^method=auto$/method=ignore/' "$f" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
if [ "$_need_dpm" = "1" ] && [ -n "$QMICLI_MODEM" ]; then
|
||||
$QMICLI_MODEM --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
|
||||
fi
|
||||
eend 0
|
||||
}
|
||||
Reference in new issue
Block a user