nRF9160 - Reading Preferred Carrier Lists on SIMs (at+cpol)

How do we read/write the preferred carrier lists on the SIM card with the nRF9160?  Most modems provide the at+cpol command but this doesn't seem to be implemented on the nRF9160

  • Hi Scott,

    I have forwarded the issue internally to the experts in the field and will get back to you as soon as I get updates.

    Best Regards,

    Swathy

  • Hi Scott,

    AT+CRSM command can be used for updating any file in UICC: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Faccess_uicc%2Fcrsm_set.html 

    Before sending the command the user must be familiar with the structure of EF_PLMNwAcT (User controlled PLMN selector with Access Technology) which is specified in 3GPP TS 31.102

    Example command to read EF-PLMNwAcT. The parameters are:

    • command = 176 - READ BINARY
    • fileid = 28512 (6F60 hex) - EF-PLMNwAcT
    • P1/P2/P3 = All zero - read whole file (may be used also to set start offset and number of bytes to read)
    • pathid not needed, ADF_USIM used by default

    AT+CRSM=176,28512,0,0,0
    +CRSM: 144,0,"42148040004234804000423400400042840040004204104000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
    OK

    The response contains status bytes (sw1, sw2) and response data returned by SIM card. Response data is the file content presented as a string of hexadecimal characters (2 characters per 1 byte), 40 bytes in this case. This means there are 8 "PLMN entries" in the file, each consisting of 5 bytes, 3 bytes for PLMN ID and 2 bytes for access technology identifier. The last 3 entries are empty, i.e. filled by 'FF', and as an example the first entry contains the following:

    PLMN ID: "421480" - MCC 244, MNC 081
    Access technology: "4000" - E-UTRAN, note: nRF9160 uses only entries with E-UTRAN, or undefined AcT "0000".

    Example command to write the same content to SIM card. The parameters are:

    • command = 214 - UPDATE BINARY
    • fileid = 28512 (6F60 hex) - EF-PLMNwAcT
    • P1/P2 = 0 - Start offset, start from beginning of file
    • P3 = 40 - Number of bytes to write, length of the following data string divided by 2.
    • pathid not needed, ADF_USIM used by default

    AT+CRSM=214,28512,0,0,40,"42148040004234804000423400400042840040004204104000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
    +CRSM: 144,0,""
    OK

    Hope this helps.

    Best Regards,

    Swathy

Related