How to Query SIM for current cell network?

How do I query the SIM card using Legato API for current cell network?

Thanks!

Eddie

Hi Eddie,

You can follow this article in legato.io main page: https://docs.legato.io/latest/c_sim.html
Simple code to manipulate le_sim.api:

void SIM_Status()
{
// Select the embedded SIM
LE_ASSERT_OK(le_sim_SelectCard(LE_SIM_EMBEDDED));

// Get the selected card
le_sim_Id_t simId = le_sim_GetSelectedCard();
LE_ASSERT(LE_SIM_EMBEDDED == simId);

// Select the LE_SIM_EXTERNAL_SLOT_1 SIM
LE_ASSERT_OK(le_sim_SelectCard(LE_SIM_EXTERNAL_SLOT_1));

// Get the selected card
simId = le_sim_GetSelectedCard();
LE_ASSERT(LE_SIM_EXTERNAL_SLOT_1 == simId);

// Check if SIM present
if (!le_sim_IsPresent(LE_SIM_EMBEDDED))
{
    LE_INFO(""SIM not present"");
}

}

Hope this can help.
Thanks,