UIM Card Status indication

Sai Chaitanya msaichaitanya at gmail.com
Tue Apr 25 05:24:31 UTC 2023


Ok, it worked now. Thanks :) I could use the card_status and get the signal
as expected.

On Mon, Apr 24, 2023 at 8:13 PM Sai Chaitanya <msaichaitanya at gmail.com>
wrote:

> Thanks for the inputs. I will check it out, but then what is the purpose
> of this API?qmi_indication_uim_card_status_output_get_card_status()
>
> In what cases can this be used? I couldn't find any examples of usage of
> this particular API.
> Regards,
> Sai.
>
> On Mon, Apr 24, 2023 at 12:59 PM Aleksander Morgado <
> aleksandermj at chromium.org> wrote:
>
>> Hey!
>>
>> >
>> > 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.
>> >
>> > 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
>> >
>> > Here is how I test.
>> >
>> > 1. Insert a SIM that has PIN protection enabled
>> > 2. Power ON modem, with a
>> > 3. Wait for bootup to complete
>> > 4. Check SIM status with AT commands
>> > 5. Issue SIM PIN to at+cpin
>> > 6. Wait to get a notification from the attached code, but I never get
>> anything even after 1 minute.
>> >
>>
>> Your program needs to register for the indications explicitly, e.g.:
>>
>>     g_autoptr(QmiMessageUimRegisterEventsInput) register_events_input =
>> NULL;
>>
>>     register_events_input = qmi_message_uim_register_events_input_new ();
>>     qmi_message_uim_register_events_input_set_event_registration_mask (
>>         register_events_input,
>>         QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS,
>>         NULL);
>>     qmi_client_uim_register_events (
>>         QMI_CLIENT_UIM (client),
>>         register_events_input,
>>         10,
>>         NULL,
>>         (GAsyncReadyCallback) uim_register_events_ready,
>>         your_user_data);
>>
>>
>> --
>> Aleksander
>>
>
>
> --
>
>


--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20230425/4ce8c030/attachment.htm>


More information about the libqmi-devel mailing list