<div dir="ltr">Hey Aleksander,<div><br></div><div>I never checked had it actually crashed, I thought the message had meant it was trying to start it. If/when this happens again I have a good range of tests I can run now, thanks!</div><div>If I can figure out a way to make this issue happen at will (or if relaunching the proxy does not fix the issue) I can test the verbose proxy debug also.</div><div><br></div><div>I am resetting the modem with the below commands and they generally work perfectly. I am setting up a test to do it hundreds of times.</div><div><br></div><div><p style="margin:10px 0px 0px;padding:0px;color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px;background-color:rgb(244,245,247)">qmicli -p -d /dev/cdc-wdmX --dms-set-operating-mode=offline<br>qmicli -p -d /dev/cdc-wdmX --dms-set-operating-mode=reset</p></div><div><br></div><div><br></div><div>For that issue (where a modem gets issued a reset and doesn't actually do it) I will run it with the verbose flag next time I see it.</div><div><br></div><div>Cheers,</div><div><br></div><div>--</div><div>Paul</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 25 Feb 2020 at 13:11, Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Paul,<br>
<br>
> Have seen this issue a few times now, the qmi-proxy appears to be crashing. Every qmi command for every modem on the system then gets this error:<br>
><br>
> qmicli --device-open-qmi -p -d /dev/cdc-wdm9 --nas-get-signal-strength<br>
> error: couldn't open the QmiDevice: Couldn't spawn the qmi-proxy<br>
><br>
><br>
> Have you seen this before, or can think of a good way to debug it? Can that daemon be restarted?<br>
> So far only rebooting the whole system will bring the modems/qmicli back to operation.<br>
><br>
<br>
If the qmi-proxy crashes, clients get notified via a HUP in the<br>
communication socket, and so e.g. MM would reprobe the modem from<br>
scratch. When using qmicli, if the qmi-proxy has crashed, it should be<br>
able to relaunch it.<br>
<br>
The "Couldn't spawn the qmi-proxy" error is really weird; to me it<br>
doesn't look like a proxy crash. Did you check whether the proxy<br>
process still exists or not after this situation? The fact that the<br>
proxy doesn't reply and that further qmicli commands don't reply could<br>
actually mean the proxy is "stuck".<br>
<br>
> Here are the logs of it happening in one instance, below. Modem0 reboots, CID allocation fails, I query the modem a few times with  ['--wda-get-data-format'] and it times out (which is normal after it has rebooted - takes a while for it to be able to respond to this)<br>
> and suddenly all qmi commands start to fail. I notice around this time, just beforehand, modem commands start to time out in general. Previously to this I noticed that, for another modem, I had told it to reset via libqmi and it returns "successful", but the modem actually never resets. No matter how many times I run the command to do so.<br>
<br>
How are you running the reset command via QMI? Are you putting it<br>
first in "offline" before "reset"? Won't work otherwise.<br>
<br>
> Not the first time that has happened also.<br>
><br>
> modem0: qmi_cmd: resp="error: couldn't create client for the 'wda' service: CID allocation failed in the CTL client: Transaction timed out\n"<br>
> modem0: qmi_cmd: ['--wda-get-data-format']<br>
> modem0: qmi_cmd: resp="error: couldn't open the QmiDevice: Transaction timed out\n"<br>
> modem0: qmi_cmd: ['--wda-get-data-format']<br>
> modem0: qmi_cmd: resp="error: couldn't open the QmiDevice: Transaction timed out\n"<br>
> modem0: qmi_cmd: ['--wda-get-data-format']<br>
> modem3: nas_get_serving_system: get_packet_service_status failed "error: couldn't open the QmiDevice: Transaction timed out\n"<br>
> modem2: nas_get_serving_system: get_packet_service_status failed "error: couldn't open the QmiDevice: Transaction timed out\n"<br>
> modem0: qmi_cmd: resp="error: couldn't open the QmiDevice: Transaction timed out\n"<br>
> modem0: qmi_cmd: ['--wda-get-data-format']<br>
> modem0: qmi_cmd: resp="error: couldn't open the QmiDevice: Couldn't spawn the qmi-proxy\n"<br>
><br>
<br>
If you can somehow reproduce this issue easily, it may be a good idea<br>
to launch the qmi-proxy manually before any qmicli call happens, e..g:<br>
$ sudo /usr/libexec/qmi-proxy --verbose<br>
<br>
Or even under gdb, if that's something you can do.<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div>