<div dir="ltr"><font color="#000000">Thank you for your response.<br>I have used four different clients DMS, WDS, NAS and UIM.<br>When I allocate clients, I notice that same client ID is allocated for WDS and NAS<br><br>DMS client allocated successfully with ID: 1<br>WDS client allocated successfully with ID: <b>3</b><br>NAS client allocated successfully with ID: <b>3</b><br>UIM client allocated successfully with ID: 2<br><br>I am not sure if this is an issue. It is hard to say, since it works fine most of the time, though the same ID is assigned to two different services.</font><div><font color="#000000">But sometimes, the program either timesout or gets stuck for a long time in qmi-endpoint-qmux.c->input_ready_cb()-><span style="font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">g_unix_input_stream_read()->g_poll()</span>, as show by my gdb trace.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">That is why I have shared a sample code, to understand if I am missing something fundamental regarding usage of the QMI APIs.<br>The libqmi documentation didn't seem to have much information about any prohibited ways for the usage of these APIs. Given so many APIs, I believe it is hard to add more information either.</font></div><div><font color="#000000">So we have to resort to this forum to understand better.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">I have used the timeout of 10 seconds for all of the QMI APIs. But I got timeout errors even after increasing this value to 30 seconds.<br><br>Regards,</font></div><div><font color="#000000">Sai.</font></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 14, 2023 at 1:44 PM Aleksander Morgado <<a href="mailto:aleksandermj@chromium.org">aleksandermj@chromium.org</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,<br>
<br>
><br>
> We are using some libqmi APIs like the below:<br>
> qmi_client_uim_register_events_finish()<br>
> qmi_client_uim_get_slot_status_finish()<br>
> qmi_client_uim_get_card_status_finish()<br>
> qmi_client_dms_swi_get_current_firmware_finish()<br>
> qmi_client_dms_set_event_report_finish()<br>
> qmi_client_uim_get_slot_status_finish()<br>
><br>
> When testing for a long time, some of these APIs respond with an error message: "Transaction timed out".<br>
><br>
> We checked the logs from the modem side and the chipset provider (Qualcomm) also confirmed with us that the modem replies to the QMI success.<br>
> Example:<br>
> In case qmi_client_uim_get_slot_status_finish()<br>
> The module replied:<br>
> ...<br>
> MsgType = QMI_UIM_GET_CARD_STATUS<br>
> ...<br>
> resp {<br>
> result = QMI_RESULT_SUCCESS<br>
> error = QMI_ERR_NONE<br>
> }<br>
> ...<br>
><br>
> ...<br>
> MsgType = QMI_UIM_GET_SLOTS_STATUS<br>
> ...<br>
> resp {<br>
> result = QMI_RESULT_SUCCESS<br>
> error = QMI_ERR_NONE<br>
> }<br>
> ...<br>
> physical_slot_status[0] {<br>
> physical_card_status = UIM_PHYSICAL_CARD_STATE_PRESENT<br>
> physical_slot_state = UIM_PHYSICAL_SLOT_STATE_ACTIVE<br>
> ...<br>
><br>
> But the error message is: "Transaction timed out".<br>
><br>
> Anything can be the cause of these problems? How can we avoid it?<br>
><br>
<br>
Can you provide a debug log including the full QMI message contents<br>
and timing details of when they're sent and received?<br>
<br>
A transaction timed out error has two main reasons:<br>
* The response was not received on time. There's a timeout defined<br>
for each QMI message, and if the response doesn't arrive in that time,<br>
the user call finishes with the timed out error, and the response is<br>
discarded if it arrives later on.<br>
* There's also the unlikely chance of a wrongly formed response, e.g.<br>
with the wrong client id or the wrong transaction id. If you're using<br>
the qmi-proxy, you could also validate whether the proxy does receive<br>
the response on time or not. If the proxy discards the response, the<br>
user call in the main program would also finish with the same timed<br>
out error.<br>
<br>
-- <br>
Aleksander<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"> </div>