UIM Card Status indication

Aleksander Morgado aleksandermj at chromium.org
Mon Apr 24 10:58:53 UTC 2023


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


More information about the libqmi-devel mailing list