Search code examples
gsmat-commandmodem

How to retrieve the ICCID from the Enfora GSM0308-11


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.


Solution

  • 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 :)