Dual SIm Switching in WP76XX

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 .




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

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

It is going to external sim switching mode but only slot_1 iam unable to switch it to external sim slot_2

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:

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



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

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

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

Are you seeing the same AT command log as mine?

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 …

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


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

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


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:


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

Thank you so much , it is working now …