سؤال

I am working with the Enfora GSM0308-11 and need to retrieve the ICCID from the SIM. Getting the IMSI and IMEI appears easy enough, but I seem to be stuck with regard the ICCID, which I need in order to determine which APN to use.

Anyone have any ideas? I've been reading PDFs and googling, but I'm either being blind or the means to get it is simply eluding me.

EDIT:

I should add, I have tried all of the following to no avail. They all return an "ERROR" response from the modem.

RadioComm( "AT+CRSM\n\r" );
RadioComm( "AT+CSIM\n\r" );
RadioComm( "AT^ICCID\n\r" );
RadioComm( "AT+ICCID\n\r" );
RadioComm( "AT+CCID\n\r" );
RadioComm( "AT+CICCID\n\r" );
RadioComm( "AT$ICCID\n\r" );

This also produces an ERROR response...

RadioComm( "AT+CLAC\n\r" );

The AT+CIMI command, however, does return me the IMSI as I would expect.

هل كانت مفيدة؟

المحلول

AT$ICCID? Should do the trick I think. You were close :)

UPDATE #1:

Ok, on further looking around it seems this modem doesn't even have anything implemented to get the ICCID. Based upon http://www.farnell.com/datasheets/876256.pdf which is in theory the AT Command Set reference for the device.

UPDATE #2:

Based on the suggested answer from hlovdal here is the command you could use:

AT+CRSM=176,12258,0,0,10

Tried this just now on a Sierra Wireless modem with success! <176> is the command type which is READ_BINARY, <12258> is the file location of the ICCID on the SIM card and the rest is parameters and response code I think.

You will get a response back something like:

+CRSM: 144,0,"2143658709"

The "2143658709" is in binary coded decimal format with switched digits. So in this example it would turn out to be "1234567890".

Learning some new cool stuff here :)

نصائح أخرى

You might be able to read ICCID from an SIM EF using AT+CRSM, searching for ICCID "AT+CRSM" in search engines seems to give some results indicating that is possible.

This command is one of the more non-intuitive and typically poorly documented AT command. To use it you have to invest effort in understanding the "file system" and addressing of files on the SIM. It is several years since I was involved in using this command so I cannot give a more detailed answer now.

Try using AT$ICCID?

at$iccid?
$ICCID: 89014103243534707921
OK

The CRSM command above also works, but you get the digits nibble swapped:

AT+CRSM=176,12258,0,0,10
+CRSM: 144,0,98101430425343079712
OK

Depending on the carrier, the MSISDN can be read with:

at+cnum
+CNUM: ,"18885551212",129
OK

But not all carriers store the MSISDN in the SIM.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top