LIBQMI APIs Response "Transaction timed out"
Sai Chaitanya
msaichaitanya at gmail.com
Mon Aug 14 13:05:09 UTC 2023
Thank you for your response.
I have used four different clients DMS, WDS, NAS and UIM.
When I allocate clients, I notice that same client ID is allocated for WDS
and NAS
DMS client allocated successfully with ID: 1
WDS client allocated successfully with ID: *3*
NAS client allocated successfully with ID: *3*
UIM client allocated successfully with ID: 2
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.
But sometimes, the program either timesout or gets stuck for a long time in
qmi-endpoint-qmux.c->input_ready_cb()->g_unix_input_stream_read()->g_poll(),
as show by my gdb trace.
That is why I have shared a sample code, to understand if I am missing
something fundamental regarding usage of the QMI APIs.
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.
So we have to resort to this forum to understand better.
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.
Regards,
Sai.
On Mon, Aug 14, 2023 at 1:44 PM Aleksander Morgado <
aleksandermj at chromium.org> wrote:
> Hey,
>
> >
> > We are using some libqmi APIs like the below:
> > qmi_client_uim_register_events_finish()
> > qmi_client_uim_get_slot_status_finish()
> > qmi_client_uim_get_card_status_finish()
> > qmi_client_dms_swi_get_current_firmware_finish()
> > qmi_client_dms_set_event_report_finish()
> > qmi_client_uim_get_slot_status_finish()
> >
> > When testing for a long time, some of these APIs respond with an error
> message: "Transaction timed out".
> >
> > 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.
> > Example:
> > In case qmi_client_uim_get_slot_status_finish()
> > The module replied:
> > ...
> > MsgType = QMI_UIM_GET_CARD_STATUS
> > ...
> > resp {
> > result = QMI_RESULT_SUCCESS
> > error = QMI_ERR_NONE
> > }
> > ...
> >
> > ...
> > MsgType = QMI_UIM_GET_SLOTS_STATUS
> > ...
> > resp {
> > result = QMI_RESULT_SUCCESS
> > error = QMI_ERR_NONE
> > }
> > ...
> > physical_slot_status[0] {
> > physical_card_status = UIM_PHYSICAL_CARD_STATE_PRESENT
> > physical_slot_state = UIM_PHYSICAL_SLOT_STATE_ACTIVE
> > ...
> >
> > But the error message is: "Transaction timed out".
> >
> > Anything can be the cause of these problems? How can we avoid it?
> >
>
> Can you provide a debug log including the full QMI message contents
> and timing details of when they're sent and received?
>
> A transaction timed out error has two main reasons:
> * The response was not received on time. There's a timeout defined
> for each QMI message, and if the response doesn't arrive in that time,
> the user call finishes with the timed out error, and the response is
> discarded if it arrives later on.
> * There's also the unlikely chance of a wrongly formed response, e.g.
> with the wrong client id or the wrong transaction id. If you're using
> the qmi-proxy, you could also validate whether the proxy does receive
> the response on time or not. If the proxy discards the response, the
> user call in the main program would also finish with the same timed
> out error.
>
> --
> Aleksander
>
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20230814/deb1eadc/attachment.htm>
More information about the libqmi-devel
mailing list