KSIMSEL and KSIMDET

Hi,

With our HL7692’s and HL7800’s, I’ve been trying the following two commands:

+KSIMSEL Command: SIM Selection
+KSIMDET Command: SIM Detection

I see some odd behaviour. At least, compared with what the following two Sierra AT command guide documents indicate. Below, I describe that odd behaviour, in context. Can anyone shed any light ?

AirPrime_HL76xx_AT_Commands_Interface_Guide_Rev13_0.pdf
AirPrime - HL78xx - AT Commands Interface Guide - Rev10.pdf

With our HL7692’s, I’ve tried the firmware version they came with, 2.23, and also the 2.27 latest. Similarly, with our HL7800’s, I’ve tried the firmware version they came with, 1.7.14, and also the 4.3.9.0 latest.

Best regards,

David


1 HL7692

The following is with 2.27 latest firmware. The same with 2.23 firmware, except in one case where noted.


1.1 SIM selection

Querying the supported modes as follows returns as shown:

AT+KSIMSEL=?
+KSIMSEL: (0-4),(1-8,10-11,13-15)

Good, this accords with what the guide says:

HL7692

Issuing then a read command as follows returns as shown. So accords with the guide indication of mode 0 as default.

AT+KSIMSEL?
+KSIMSEL: 0

The guide says ‘mode and GPIO settings are saved in non-volatile memory over module reboot.’

Issuing though a write command of mode 4 (read SIM cards presence status) as follows returns ERROR as shown.

AT+KSIMSEL=4
ERROR

However, if I first select one of the other modes (1 2 or 3) as below, then mode 4, it returns as shown:

AT+KSIMSEL=1      AT+KSIMSEL=2      AT+KSIMSEL=3
OK                OK                OK
AT+KSIMSEL=4      AT+KSIMSEL=4      AT+KSIMSEL=4
+KSIMSEL: 4,0,1   +KSIMSEL: 4,0,1   +KSIMSEL: 4,0,1

The 4 presumably echoes the command. Per the guide, the 0 means external SIM 1 absent, the 1 means external SIM 2 present. In our circuit, the HL7692 default GPIO6 pin for SIM selection is not connected. Presumably the idea is that the HL7692 drives the chosen GPIO pin low or high, with respective SIM 1 or 2 to be externally mux-connected to the HL7692 U1M1 SIM pins. Or vice-versa.

So the first oddity, is why the HL7692 is considering the SIM to be number 2 ? In particular, given that the guide says ‘When SIM select feature is disabled, only the 1st external SIM interface is available and the dedicated GPIO is free for customer use via +KGPIO.’

With 2.23 firmware, +KSIMSEL: 4,1,1 is received instead, which means the HL7692 thinks both SIMs present (!)

I’ve checked, and there’s nothing in the release note for 2.26 or 2.27 about a fix to KSIMSEL.


1.2 SIM detection

In our circuit, the HL7692 U1M1_DET SIM inserted detection pin is connected just to a test point. But for what it’s worth, I issued commands as follows, with responses as shown. Per the guide, the commands mirror the KSIMSEL syntax. 0 means disable SIM detection, 1 means enable SIM detection, being the guide default. I have no idea why the ERROR response happens. The guide says OK should be obtained.

AT+KSIMDET=?     AT+KSIMDET?   AT+KSIMDET=0   AT+KSIMDET=1
KSIMDET: (0-1)   +KSIMDET: 1   ERROR          OK

2 HL7800

The following is with 4.3.9.0 latest firmware. With 1.7.14 firmware, all commands shown return error. Possibly the +KSIMSEL and +KSIMDET commands were unimplemented in 1.7.14 firmware.


2.1 SIM selection

Querying the supported modes as follows returns as shown:

AT+KSIMSEL=?
+KSIMSEL: (0,4,9,20)

Good, this accords with what the guide says:

HL7800

Issuing then a read command as follows returns as shown. So accords with the guide indication of mode 0 as default.

AT+KSIMSEL?
+KSIMSEL: 0,,1

Per the guide, 0 means presently in mode 0. The guide indeed says the default policy is to select External SIM slot on bootup. Also, that mode settings are kept after module reboot. The empty string between the two commas means ‘GPIO SIM selection not supported currently’. And the 1 means external SIM in use, as opposed to 0 for internal SIM.

Issuing though a write command of mode 4 (read SIM cards presence status) as follows returns ERROR as shown.

AT+KSIMSEL=4
ERROR

That’s odd, it should return something like the below. The 4 presumably echoing the command, the first 1 meaning external SIM present, and the second 1 meaning internal SIM present. The empty string between the two commas likewise means GPIO SIM selection not supported currently.

+KSIMSEL: 4,1,,1

Trying a write command of mode 9 (select internal SIM if present) as follows returns as shown. Whether this means our HL7800’s infact lack an internal SIM, or whether the command is just broken, I don’t know.

AT+KSIMSEL=9
ERROR

Anyone know how I can find out in another way, if our HL7800’s have an internal SIM ?

This forum post seems to suggest that some HL7800 SKU’s omit the internal SIM. I don’t know the SKU for our present HL7800’s, as yet at least. But we have 100 incoming with SKU 1104526. Anyone know from that SKU, if the 100 have an internal SIM ?

Trying a write command of mode 20 (select external SIM if present) as follows likewise returns ERROR as shown.

AT+KSIMSEL=20
ERROR

Intriguingly though, trying a write command of mode 0 (force to select external SIM) as follows returns as shown. Ie the command works, albeit keeping the mode as 0.

AT+KSIMSEL=0
OK

2.2 SIM detection

Likewise for what it’s worth, I issued commands as follows, responses as shown. Per the guide, the commands mirror the KSIMSEL syntax. 0 means disable SIM detection, 1 means enable SIM detection, being the guide default. So why the +KSIMDET: 0 response, I wonder ?

AT+KSIMDET=?     AT+KSIMDET?   AT+KSIMDET=0   AT+KSIMDET=1
KSIMDET: (0-1)   +KSIMDET: 0   OK             OK

Hi @david.king

1 HL7692
1.1 SIM selection
To use the DSSS feature on HL7692, you need to modify your development kit. If I use the DSSS development kit modification, these issues cannot be reproduced with the +KSIMSEL command.
Did you modify your development kit to use the DSSS feature (command + KSIMSEL) on HL7692?
I have attached DSSS development kit diagram for your reference.
HL76xx_Devkit_change_for_dsss.docx (2.9 MB) HL7692.txt (1.3 KB)

1.2 SIM detection

This issue can not be reproduced with FW 2.27 HL7692 at my side.HL7692.txt (1.3 KB)
You can reboot module an try again.
Could you please provide some information about your module using below commands?
AT+CPIN?
AT+KSIMSEL?
AT+KGPIOCFG?
AT+KGPIO?
AT+KSIMDET=0
AT+KSIMDET=1

2 HL7800
2.1 SIM selection

Which mode SIM detection (+KSIMDET?) on your module?
According to AirPrime - HL78xx - AT Commands Interface Guide - Rev10: <mode>=4 and <mode>=20 are not available when SIM detection is disabled.

If your module HL7800 with SKU has support internal sim, OK will be returned with AT+KSIMSEL=9

AT+CMEE=1
AT+KSIMSEL=9
Log file is attached for your reference. HL7800_KSIMSEL.txt (1.6 KB)

2.2 SIM detection

Did you type AT+KSIMDET=0 before? This issue can not be reproduced with FW HL7800.4.3.9.0 at my side.

Settings of +KSIMDET command is kept after module reboot.

Log file is attached for your reference.HL7800.txt (1.6 KB)

Please help to mark “Solution” if your question is answered. So the community could easily find the solution for their problems.

Hi Donald,

Many thanks for your various responses there to my long post about KSIMSEL and KSIMDET.

You mentioned development kit. My post though was about our own circuit design.

We are not looking to use Dual SIM Single Standby (DSS) functionality. Our own circuit design has a single SIM slot.

About the section 1.2 results, I rebooted, same results. Infact I tried three times, same results.

Regarding the six HL7692 command tests that you requested, below are the commands and responses with V2.27 firmware. V2.23 firmware same except response +KSIMSEL: 4,1,1. With no SIM fitted, response same except AT+CPIN? responds ERROR. Responses 1) 5) and 6) per thread starter.

1) AT+CPIN?
+CPIN: READY

2) AT+KSIMSEL?
+KSIMSEL: 4,0,1

3) AT+KGPIOCFG?
+KGPIOCFG: 1,0,2
+KGPIOCFG: 2,0,2
+KGPIOCFG: 5,0,2
+KGPIOCFG: 7,0,2
+KGPIOCFG: 8,0,2
+KGPIOCFG: 10,0,2
+KGPIOCFG: 11,0,2
+KGPIOCFG: 13,0,2
+KGPIOCFG: 14,0,2
+KGPIOCFG: 15,0,2

4) AT+KGPIO?
OK

5) AT+KIMSET=0
ERROR

6) AT+KSIMDET=1
OK

With the HL7800, you enquired ‘which mode SIM detection (+KSIMDET?) on your module?’. The answer is mode 0 ‘disable SIM detection’. That appears to be the HL7800 default, whereas the guide says mode 1 ‘enable SIM detection’ is the default. We make no change to the mode. As mentioned our circuit omits SIM detection: The HL7692/HL7800 U1M1_DET SIM inserted detection pin is connected just to a PCB test point.

About the HL7800 guide '<mode>=4 and <mode>=20 are not available when SIM detection is disabled.', ah, apologies, I missed that subtlety. I presumed the HL7800 mode 4 ‘Read SIM presence status’ would work regardless of whether SIM detection enabled or disabled. That’s true for the HL7692 mode 4 ‘Read SIM cards presence status’, hence the presumption.

About whether our HL7800’s have an internal SIM, OK I’ll conclude they don’t, given that AT+KSIMSEL=9 returns ERROR rather than OK.

You enquired if I had typed +KSIMDET=0 before AT+KSIMDET?
I can confirm that I didn’t

Best regards,

David

Hi david.king

Mode 9 (+KSIMSEL): Select internal SIM if present. Internal SIM is an embedded SIM that has been integrated in the HL7800 module. You need to contact your reseller or distributor directly to buy HL7800 internal embedded SIM device.

These issues have been reproduced on some modules at your side.
In your case, the best way is to get support through your commercial channel (i/.e. who you bought the unit from.)

1 Like