<div dir="ltr">Hi again,<div><br></div><div>The issue seems to have been resolved by including this in open flags: QMI_DEVICE_OPEN_FLAGS_SYNC. </div><div><br></div><div>So, even though the client release hasn't been smooth, a fresh start seems to work normal.</div><div>I am not sure if there are any other downsides of this, but this works for now.</div><div><br></div><div>Thanks and regards,</div><div>Sai.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 8, 2021 at 2:41 PM Sai Chaitanya <<a href="mailto:msaichaitanya@gmail.com">msaichaitanya@gmail.com</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"><div dir="ltr">Hej, sorry for the delayed reply. I am using libqmi 1.26. Here are some more details about the client allocation issue.<div><br></div><div>Setup: A usb-modem is plugged in and a data connection is started with qmi_client_wds_start_network(). It succeeds and can ping. Now, if the module is suddenly pulled out, the application calls qmi_device_release_client() and qmi_client_wds_stop_network() as a part of exit process and ends up here:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>error: couldn't release client: Cannot write message: Error writing to file descriptor: No such device<br></div></blockquote></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>error: operation failed: Cannot write message: Error writing to file descriptor: No such device</div></blockquote><div><br></div><div>And when we try to fresh start the data connection after plugging the module back again with qmi_client_wds_start_network()</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><br></div>error: couldn't create client for the the 'WDS' service: CID allocation failed in the CTL client: Transaction timed out<br><br></blockquote>So, it looks like some context is not cleaned up smoothly on the modem in this sudden power off situation? Or is there any other exit APIs required to be called in such situations?<div><br><div>Regards,</div><div>Sai.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 29, 2021 at 3:32 PM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es" target="_blank">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,<br>
<br>
><br>
> Yes it happened after qmi_client_wds_stop_network().<br>
> If I try to use QMI_DEVICE_OPEN_FLAGS_PROXY, it crashes. So I removed it for now. I may be missing some pre-condition when using this flag.<br>
><br>
> Setup is Linux based, cdc-wdm+qmi_wwan.<br>
><br>
<br>
Can you debug that crash?, e.g building with debug symbols and running under gdb<br>
<br>
Also, what libqmi version are you using?<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"> </div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"> </div>