# WP8548 EXTERNAL\_SLOT\_2 not detect sim card

**URL:** <https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571>\
**Category:** Uncategorized\
**Created:** [January 13, 2021, 1:26pm UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571 "2021-01-13T13:26:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nejimaki](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nejimaki](https://forum.legato.io/u/Nejimaki)\
**Post date:** [January 13, 2021, 1:26pm UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/1 "2021-01-13T13:26:05Z")

</div>

Hello.

//--------------------------------------------------------------------------------------------------  
/\*\*

```
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?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 13, 2021, 1:28pm UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/2 "2021-01-13T13:28:06Z")

</div>

I don’t think it is the actual source code.  
pa\_sim\_SelectCard source code should be internal only.

You can only have the binary file under:  
\platformAdaptor\qmi\bin\wp85\components\le\_pa

BTW, do you try the AT!UIMS command?

---

<div class="post-metadata">

**Author:** ![Nejimaki](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nejimaki](https://forum.legato.io/u/Nejimaki)\
**Post date:** [January 14, 2021, 4:51am UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/3 "2021-01-14T04:51:17Z")

</div>

Yes, everything works as it should directly through AT commands.  
See the source code here:  
 ![Снимок экрана_2021-01-14_08-50-21](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/e/ea1daee3c369d4e8d7c11c3f2f5ce6c0fa4f87ff.png)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 14, 2021, 5:05am UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/4 "2021-01-14T05:05:20Z")

</div>

does "cm sim select EXTERNAL\_SLOT\_2 " work for you?  
If yes, that means the source code you seeing is not actually compiled.

Anyway, you can directly use AT!UIMS.

---

<div class="post-metadata">

**Author:** ![Nejimaki](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nejimaki](https://forum.legato.io/u/Nejimaki)\
**Post date:** [January 14, 2021, 5:17am UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/5 "2021-01-14T05:17:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 14, 2021, 5:25am UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/6 "2021-01-14T05:25:01Z")

</div>

That means the source code you seeing is not actually compiled!

You can first try  
AT+UIMS=1 to select SIM slot 2

and then you can use +WUSLMSK to setup the AT!UIMSTATUS notification.

This can make sure at least the AT command is working fine.

---

<div class="post-metadata">

**Author:** ![Nejimaki](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nejimaki](https://forum.legato.io/u/Nejimaki)\
**Post date:** [January 14, 2021, 9:21am UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/7 "2021-01-14T09:21:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 14, 2021, 9:27am UTC](https://forum.legato.io/t/wp8548-external-slot-2-not-detect-sim-card/5571/8 "2021-01-14T09:27:47Z")

</div>

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.
