This function selects the Card on which all further SIM operations have to be operated.
@return LE_FAULT The function failed.
@return LE_TIMEOUT No response was received.
@return LE_OK The function succeeded.
*/
//--------------------------------------------------------------------------------------------------
le_result_t pa_sim_SelectCard
(
le_sim_Id_t cardId ///< The SIM to be selected
)
{
if (cardId != LE_SIM_EXTERNAL_SLOT_1)
{
return LE_FAULT;
}
UimSelect = cardId;
return LE_OK;
}
In the source code, when requesting the status of a SIM card, only the 1st slot is used. Why is the 2nd slot worn out, how to work with the second SIM card?
Yes, this command works “cm sim select EXTERNAL_SLOT_2”. But the command to determine the status of the SIM card does not work. And the SIM card events do not work when EXTERNAL_SLOT_2 is selected. I would like to deal with this.
Yes, your method works but it is quite correct. With 2 SIM cards inserted, it correctly shows which SIM card is disconnected, but when the SIM card is returned to its place, the status reports the number of the always active SIM slot.
Most likely the fact is that we do not understand how the work of two SIM cards is implemented. So far we have only made sure that everything works properly through the API legato, when after changing the SIM card, make AT! RESET or reboot. Is there any official information on what needs to be rebooted?
I remember if you change SIM card during power on, you need to AT!UIMS to change to another SIM slot and then AT!UIMS again to change back to original slot.