aboutsummaryrefslogtreecommitdiff
path: root/examples/modem-watcher-javascript/main.js
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2022-03-23 17:54:08 +0100
committerStephan Gerhold <stephan@gerhold.net>2022-03-23 20:39:14 +0100
commit8d95c82f9c2d558148aec74cfcaf17e3941d806c (patch)
tree4b0ed347139e8e34b3da876600ed0d6a09760898 /examples/modem-watcher-javascript/main.js
parent8ab31cf0e60b7fef7acc8790c034687b4c229459 (diff)
shared-qmi: ignore slot status indications until initial status is known
Recent ModemManager versions no longer work on the Samsung A5 (Qualcomm MSM8916) smartphone: MM ends up in an infinite loop trying to probe the modem over and over again. Looking at the debug log it seems to be related to a "Slot Status" indication that comes in during probe time and causes MM to restart the probing process: [/dev/wwan0qmi0] Sent generic request (translated)... << QMUX: service = "uim" << QMI: message = "Register Events" (0x002E) << TLV: translated = physical-slot-status [/dev/wwan0qmi0] Received generic indication (translated)... << QMUX: service = "uim" << QMI: message = "Slot Status" (0x0048) << TLV: translated = { [0] = '[ physical_card_status = 'present', ... [/dev/wwan0qmi0] Received generic response (translated)... << QMUX: service = "uim" << QMI: message = "Register Events" (0x002E) << TLV: translated = SUCCESS [modem42] registered for slot status indications [/dev/wwan0qmi0] Sent generic request (translated)... << QMUX: service = "uim" << QMI: message = "Get Slot Status" (0x0047) [modem42] received slot status indication [modem42] An active slot had a status change, will reprobe the modem <infinite loop> The "Slot Status" indication (uim_slot_status_indication_cb) arrives immediately after starting to listen for the event, which is before ModemManager has actually loaded the initial slot status in uim_get_slot_status_ready. In this situation !slot_array_status_equal() will always cause the modem to reprobe, even though it is not necessary during the probe phase. To fix this add a simple check to uim_slot_status_indication_cb() that ignores the indication if the initial slot status was not loaded yet.
Diffstat (limited to 'examples/modem-watcher-javascript/main.js')
0 files changed, 0 insertions, 0 deletions