<div dir="ltr">Ok, it worked now. Thanks :) I could use the card_status and get the signal as expected.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 24, 2023 at 8:13 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">Thanks for the inputs. I will check it out, but then what is the purpose of this API?<h3 style="color:rgb(0,0,0);font-family:cantarell,sans-serif">qmi_indication_uim_card_status_output_get_card_status()<br><br><span style="font-weight:normal">In what cases can this be used? I couldn't find any examples of usage of this particular API.</span></h3><div>Regards,<br>Sai.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 24, 2023 at 12:59 PM Aleksander Morgado <<a href="mailto:aleksandermj@chromium.org" target="_blank">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>
> I have a Sierra modem and I am using libqmi to configure/communicate with the modem over /dev/cdc-wdm0. I want to enable SIM signalling to get indications when SIM status changes, but I have not been able to get any notifications from the modem. Not sure if it is a modem issue or something wrong in my code. Attached is the snapshot of my code. If anyone has any inputs, kindly share.<br>
><br>
> Also, if I use qmi_message_uim_get_card_status_output_get_card_status() explicitly, instead of signalling , I get the correct SIM status. I am using libqmi version 1.30.8<br>
><br>
> Here is how I test.<br>
><br>
> 1. Insert a SIM that has PIN protection enabled<br>
> 2. Power ON modem, with a<br>
> 3. Wait for bootup to complete<br>
> 4. Check SIM status with AT commands<br>
> 5. Issue SIM PIN to at+cpin<br>
> 6. Wait to get a notification from the attached code, but I never get anything even after 1 minute.<br>
><br>
<br>
Your program needs to register for the indications explicitly, e.g.:<br>
<br>
g_autoptr(QmiMessageUimRegisterEventsInput) register_events_input = NULL;<br>
<br>
register_events_input = qmi_message_uim_register_events_input_new ();<br>
qmi_message_uim_register_events_input_set_event_registration_mask (<br>
register_events_input,<br>
QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS,<br>
NULL);<br>
qmi_client_uim_register_events (<br>
QMI_CLIENT_UIM (client),<br>
register_events_input,<br>
10,<br>
NULL,<br>
(GAsyncReadyCallback) uim_register_events_ready,<br>
your_user_data);<br>
<br>
<br>
-- <br>
Aleksander<br>
</blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr"> </div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"> </div>