# Dual SIm Switching in WP76XX

**URL:** <https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252>\
**Category:** Uncategorized\
**Created:** [July 22, 2022, 10:53am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252 "2022-07-22T10:53:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishna.j](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@krishna.j](https://forum.legato.io/u/krishna.j)\
**Post date:** [July 22, 2022, 10:53am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/1 "2022-07-22T10:53:35Z")

</div>

hi everyone,  
Iam trying dual sim switching in my WP76XX module , by using GPIO6 pin to switch to external SIM\_2  
by using AT Commands , but iam unable to configure my gpio pin to switch to external SIM\_2  
the gpio configuration which i want is +WIOCFG=6,3,1,1,3 to switch to SIM\_2 in my Modem using wp76xx , iam attaching the snap shots of the commands which ive used and the response which ive got iam unable to configure my GIO6 pin to switch to external sim\_2 as there are two external sims External sim\_1 and external sim\_2 currently iam in external SIM\_1 mode i want to switch to external SIM\_2 MODE , by using at commands or linux commnds please if someone could help me with this .

 ![Screenshot from 2022-07-22 16-24-32](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/0/09e33804a79ddbaec38d0cc8d34cbcf8ae4d562c.png)  
 ![Screenshot from 2022-07-22 16-24-37](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/6/6c3768f8d05efa451736f6c8d11380901dace914.png)  
 ![Screenshot from 2022-07-22 16-24-41](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/4/41790aa05dbe279410fa1cea09216f78444e906c.png)  
 ![Screenshot from 2022-07-22 16-24-44](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/4/4a8ef16b779970bec9fd56885aed9ed9d6472fce.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:** [July 22, 2022, 11:56am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/2 "2022-07-22T11:56:59Z")

</div>

Can you control the state of goio6 with +ksimsel now?

---

<div class="post-metadata">

**Author:** ![krishna.j](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@krishna.j](https://forum.legato.io/u/krishna.j)\
**Post date:** [July 22, 2022, 12:00pm UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/3 "2022-07-22T12:00:40Z")

</div>

no iam unable to control the state of gpio6 with ksimsel because

if i keep +KSIMSEL=2 it must switch to SIM\_SLOT\_2 which is not happening , and also iam unablle to configure GPIO6 to switch to external SIM\_SLOT\_2

---

<div class="post-metadata">

**Author:** ![krishna.j](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@krishna.j](https://forum.legato.io/u/krishna.j)\
**Post date:** [July 22, 2022, 12:01pm UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/4 "2022-07-22T12:01:53Z")

</div>

It is going to external sim switching mode but only slot\_1 iam unable to switch it to external sim slot\_2

---

<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:** [July 22, 2022, 1:03pm UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/5 "2022-07-22T13:03:59Z")

</div>

Is this the same in fw r13 or r16?

BTW, why do you want to set “AT+WCIOFG=6,3”?  
According to AT command guide, this should be for GPIO4:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/8/83af99b599c3c5508302ac9ff33ff625e34c76c7.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:** [July 23, 2022, 2:29am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/6 "2022-07-23T02:29:00Z")

</div>

I tried on WP7608 FW R13, I can use AT+KSIMSEL to switch SIM:

```auto

at!custom?
!CUSTOM:
             GPSENABLE 0x01
             GPSLPM 0x01
             IPV6ENABLE 0x01
             SIMHOTSWAPDIS 0x02
             UIM2ENABLE 0x01
             SIMLPM 0x01
             USBSERIALENABLE 0x01
             SINGLEAPNSWITCH 0x01
             TXONINDICATION 0x01
             HSICENABLE 0x01
             SCRUBEN 0x01
             EXTUIMSWITCHEN 0x01
             EXTGPSLNAEN 0x01

OK
at+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,3,0,0,1,0,0
+WIOCFG: 6,8,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

OK
at+cpin?
+CPIN: READY

OK
at+cimi
454065215193898

OK
at+ksimsel?
+KSIMSEL: 1

OK
at
OK
at+ksimsel=2
OK
at+cpin?
+CME ERROR: SIM not inserted
at+cimi
ERROR
at+ksimsel=1
OK
at+ksimsel?
+KSIMSEL: 1

OK
at+cpin?
+CPIN: READY

OK
at+cimi
454065215193898

OK
ati3
Manufacturer: Sierra Wireless, Incorporated
Model: WP7608
Revision: SWI9X07Y_02.28.03.03 000000 jenkins 2019/05/21 03:33:04
IMEI: 352913090501261
IMEI SV: 6
FSN: XG207430060310
+GCAP: +CGSM,+DS

OK

```

---

<div class="post-metadata">

**Author:** ![vyoma](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@vyoma](https://forum.legato.io/u/vyoma)\
**Post date:** [July 23, 2022, 5:39am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/7 "2022-07-23T05:39:58Z")

</div>

Thank you for your kind reply. We also using WP7608 FW R13 only. we hope this works

 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/3/36ae65bb96429408c7e2746812d549658f4ce5ba.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:** [July 23, 2022, 5:49am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/8 "2022-07-23T05:49:50Z")

</div>

On my side , i can use +ksimsel=1 to switch to SIM1.

Are you seeing the same AT command log as mine?

---

<div class="post-metadata">

**Author:** ![krishna.j](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@krishna.j](https://forum.legato.io/u/krishna.j)\
**Post date:** [July 23, 2022, 6:33am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/9 "2022-07-23T06:33:53Z")

</div>

yes, iam seing the same AT command log as yours and iam able to switch to SIM1 too but i want to switch to my external sim\_2 as shown in the above image of 2 external sim cards , i want to use the second sim interface which iam unable to the +KSIMSEL=2 is not working …

---

<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:** [July 23, 2022, 8:37am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/10 "2022-07-23T08:37:06Z")

</div>

then have you tried the following to set GPIO6 as GPIO usable in linux?

```auto

at!entercnd="A710"
OK
at!custom?
!CUSTOM:
             GPSENABLE 0x01
             GPSLPM 0x01
             IPV6ENABLE 0x01
             SIMHOTSWAPDIS 0x02
             UIM2ENABLE 0x01
             SIMLPM 0x01
             USBSERIALENABLE 0x01
             SINGLEAPNSWITCH 0x01
             TXONINDICATION 0x01
             HSICENABLE 0x01
             SCRUBEN 0x01
             EXTUIMSWITCHEN 0x01
             EXTGPSLNAEN 0x01

OK
at!custom="EXTUIMSWITCHEN",0
OK
at!reset
OK

at+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,0,0,0,1,0,0
+WIOCFG: 6,0,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

OK
at+wiocfg=6,16
OK
at!reset
OK

root@swi-mdm9x28-wp:~# echo 6 > /sys/class/gpio/export
root@swi-mdm9x28-wp:~# ls /sys/class/gpio/
export gpiochip1 gpiochip820 gpiochip916 unexport
gpio6 gpiochip1012 gpiochip852 gpiochip948
gpiochip0 gpiochip1018 gpiochip884 gpiochip980

```

---

<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:** [July 25, 2022, 1:34am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/11 "2022-07-25T01:34:31Z")

</div>

I used the following, I can control the state of GPIO6:

```auto

root@swi-mdm9x28-wp:~# echo 6 > /sys/class/gpio/export
root@swi-mdm9x28-wp:~# echo out > /sys/class/gpio/gpio6/direction
root@swi-mdm9x28-wp:~# echo 0 > /sys/class/gpio/gpio6/value
root@swi-mdm9x28-wp:~# echo 1 > /sys/class/gpio/gpio6/value
root@swi-mdm9x28-wp:~# echo 0 > /sys/class/gpio/gpio6/value

```

BTW, if I used the following, I can also control the state of GPIO6:

```auto

at!entercnd="A710"
OK
at!custom="EXTUIMSWITCHEN",1
OK
at!reset
OK

//GPIO6 low state
at+ksimsel?
+KSIMSEL: 1

OK
//GPIO6 high state
at+ksimsel=2
OK
at+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 4,3,0,0,1,0,0
+WIOCFG: 6,8,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,16,0,0,1,0,0
+WIOCFG: 29,16,0,0,1,0,0
+WIOCFG: 30,16,0,0,1,0,0
+WIOCFG: 31,16,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 35,16,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0

OK

```

---

<div class="post-metadata">

**Author:** ![krishna.j](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@krishna.j](https://forum.legato.io/u/krishna.j)\
**Post date:** [July 25, 2022, 6:40am UTC](https://forum.legato.io/t/dual-sim-switching-in-wp76xx/6252/12 "2022-07-25T06:40:34Z")

</div>

Thank you so much , it is working now …
