# Problems switching to EXTERNAL\_SLOT\_2 on WP8548/WP7502

**URL:** <https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828>\
**Category:** WP Series\
**Created:** [June 7, 2018, 8:22am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828 "2018-06-07T08:22:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry\_kinyov](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dmitry\_kinyov](https://forum.sierrawireless.com/u/dmitry_kinyov)\
**Post date:** [June 7, 2018, 8:22am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/1 "2018-06-07T08:22:36Z")

</div>

We have the same problem with WP8548 (on mangOH Green, primary CF3) and WP7502 (on our custom board). Using ‘cm sim select’ command we can’t switch to EXTERNAL\_SLOT\_2. E.g.

**login as: root**  
Linux swi-mdm9x15 3.14.29ltsi-5d7a6bf7c6\_ed88cc68b5 #2 PREEMPT Sat Feb 6 02:37:18 PST 2016 armv7l GNU/Linux  
**root@swi-mdm9x15:~# cm radio**  
Power: OFF  
Current Network Operator:  
Status: Not registered and not currently searching for new operator (LE\_MRC\_REG\_NONE)  
Signal: No signal strength (0)

**root@swi-mdm9x15:~# cm sim info**  
Type: EXTERNAL\_SLOT\_1  
ICCID: 89701202115300878591  
Home Network Operator: Tele2 RU  
IMSI: 250202106237359  
Phone Number:  
**root@swi-mdm9x15:~# cm sim select EXTERNAL\_SLOT\_2**  
**root@swi-mdm9x15:~# cm sim info**  
Type: EXTERNAL\_SLOT\_2  
ICCID:  
Home Network Operator: MegaFon RUS  
IMSI:  
Phone Number:  
**root@swi-mdm9x15:~# cm sim**  
SIM card is absent (LE\_SIM\_ABSENT).

**root@swi-mdm9x15:~#**

But when we reboot the board with the EXTERNAL\_SLOT\_2 selected, ‘cm sim info’ gives us meaningfull information (after reboot completed), ‘cm sim’ reports READY for the second slot and we can establish a connection using ‘cm data connect’ command. When we switch from SLOT\_2 to SLOT\_1 and back then SIM 2 is reported as ABSENT again (until next reboot). SLOT\_1 is always reported as READY.  
Could anyone help? Is there a tricky command sequence?  
PS:  
**root@swi-mdm9x15:~# cm info firmware**  
SWI9X15Y\_07.12.14.00 r34472 CARMD-EV-FRMWR1 2017/11/29 18:24:42

---

<div class="post-metadata">

**Author:** ![maschenkoaa](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@maschenkoaa](https://forum.sierrawireless.com/u/maschenkoaa)\
**Post date:** [October 2, 2020, 5:04am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/2 "2020-10-02T05:04:14Z")

</div>

We faced the same problem. Did you manage to solve it? (Мы столкнулись с такой же проблемой. Вам удалось её решить?)

---

<div class="post-metadata">

**Author:** ![dmitry\_kinyov](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dmitry\_kinyov](https://forum.sierrawireless.com/u/dmitry_kinyov)\
**Post date:** [October 2, 2020, 5:52am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/3 "2020-10-02T05:52:16Z")

</div>

Yes, we did. Unfortunately, I don’t remember any specific details related to this problem and I don’t have a WP_5_ hardware to check it. But most likely that this problem had gone with a regular firmware update of WP_5_. So first of all make sure you have the latest firmware on your WP. Let me know if it doesn’t work for you, I’ll try to help.

---

<div class="post-metadata">

**Author:** ![maschenkoaa](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@maschenkoaa](https://forum.sierrawireless.com/u/maschenkoaa)\
**Post date:** [October 2, 2020, 6:11am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/4 "2020-10-02T06:11:33Z")

</div>

We are using the latest version of Legato 20.4.  
Firmware Version: SWI9X15Y\_07.14.01.00 595652d jenkins 2018/10/26 08:34:29

---

<div class="post-metadata">

**Author:** ![dmitry\_kinyov](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dmitry\_kinyov](https://forum.sierrawireless.com/u/dmitry_kinyov)\
**Post date:** [October 2, 2020, 7:46am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/5 "2020-10-02T07:46:24Z")

</div>

Seems like one of the updates solved a lot of other problems but not this particular one. CLI still doesn’t work in terms of SIM slot switching.  
I’ve pulled the basic algorithm from my project’s code. Here it is.

1. le\_mrc\_AddNetRegStateEventHandler(netChangeStateHandler, NULL);
2. le\_sim\_SelectCard(desiredSimSlot); // change the sim slot
3. Wait for 25 seconds to let the sim slot switch (start a timeout timer)  
3.1 While waiting handle net events in netChangeStateHandler(le\_mrc\_NetRegState\_t state, void \*contextPtr)  
3.2 netChangeStateHandler(…) MUST include the following line:  
le\_sim\_Id\_t actSimId = le\_sim\_GetSelectedCard(); // Magic to make it switch to the second SIM slot  
3.3 Also in the handler:  
if (((state == LE\_MRC\_REG\_HOME) || (state == LE\_MRC\_REG\_ROAMING)) && (actSimId == desiredSimSlot))  
// the slot switching procedure completed successfully  
// stop the timeout timer
4. If the 25s-timer expires then you’re probably dealing with a bad sim card in the slot

In netChangeStateHandler() I also make calls to le\_sim\_GetHomeNetworkMccMnc(), le\_mdc\_GetProfile() etc. But I don’t think this significantly affects the SIM slot switching process.  
Hope this helps.

---

<div class="post-metadata">

**Author:** ![maschenkoaa](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@maschenkoaa](https://forum.sierrawireless.com/u/maschenkoaa)\
**Post date:** [October 2, 2020, 11:42am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/6 "2020-10-02T11:42:43Z")

</div>

Our program logic is very similar. Everything works great as long as both SIM cards are connected. If we leave only one card, then the switch works fine, but le\_mdc\_StartSession does not complete successfully.

---

<div class="post-metadata">

**Author:** ![dmitry\_kinyov](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dmitry\_kinyov](https://forum.sierrawireless.com/u/dmitry_kinyov)\
**Post date:** [October 2, 2020, 1:38pm UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/7 "2020-10-02T13:38:43Z")

</div>

I’m not sure whether your problem is related to my original forum post.  
Probably, you should pay more attention to profiles before starting the session.  
BTW, I used slightly different approach to iniate a connection le\_data\_Request/le\_data\_Release (instead of le\_mdc\_StartSession/le\_mdc\_StopSession) to have a bit more control over the connection.  
What do logs say why the session fails to start?

---

<div class="post-metadata">

**Author:** ![maschenkoaa](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@maschenkoaa](https://forum.sierrawireless.com/u/maschenkoaa)\
**Post date:** [October 5, 2020, 6:59am UTC](https://forum.sierrawireless.com/t/problems-switching-to-external-slot-2-on-wp8548-wp7502/12828/8 "2020-10-05T06:59:22Z")

</div>

Logs:  
modemDaemon[783]/swiQmi T=main | swiQmi.c swiQmi\_CheckResponse() 849 | Sending QMI\_WDS\_START\_NETWORK\_INTERFACE\_REQ\_V01 failed: rc=-3 (Timeout), resp.result=0.[0x00], resp.error=0.[0x00]  
modemDaemon[783]/le\_pa T=main | pa\_mdc\_qmi.c StartSession() 1957 | Send qmi timeout.  
modemDaemon[783]/le\_pa T=main | pa\_mdc\_qmi.c StartSession() 1994 | Data connection failure reason not available  
modemDaemon[783]/modemDaemon T=main | le\_mdc.c le\_mdc\_StartSession() 1304 | Get Async Connection failure 45, 0, 0, 0  
The session is not established and the call timed out.  
We do not use le \_data, because it just does not allow you to fine-tune the profile (set APN, login, password). Perhaps we have not fully understood the documentation.  
Please tell us how you get finer control through le\_data\_Request / le\_data\_Release?
