UICC/SIM programing

    • version 3.3
      • fix wrong encoding of PLMN in case of MNC on 3 digits
        • concerns all PLMN lists of forbidden, authorized, … for this case of 3 digits MNC
      • add a command line parameter to choose the authorized access technology 
    • Version 3.2:

        • bug fixing
        • Fix issues in PC/SC dialog, avoid SEGV with alien cards
          •  

Version 3.0:

        • Add support of PC/SC protocol readers
        • Add a README file with example commands

Version 2.6:

    • Fix 5G SA non-terrestrial (NTN) bit place
    • Remove redundant SMS center configuration in source code
      the SMSC is set to a default value

Version 2.5:

    • Add explicit support of 5G SA and 5G SA non-terrestrial (NTN)
      • Our cards are still 3GPP rel8
      • We added in all PLMN with access technology files (operator controlled, user controlled) 5G SA and 5G NTN
      • this HELPs brands like Oppo/oneplus to see 5G networks
        • Quectel, Huawei were working fine without this change

Version 2.4:

    • Add core network debugging option
      • generate the AUTN message the 4G/5G core network must generate according to milenage algorithm

Version 2.3:

    • Fix compiling issue in RedHat
    • add option -ust to define USIM service table

Version 2.2:

    • Fix program assert related to MSISDN sending to the UICC card

Version 2.1:

    • Mandatory update for cards serial > OC004110
    • early V4 cards (serial between OC004000 and OC004110) have a bug in AUTS: please contact support

Version 2.0:

    • Add support of V4 UICC cards

Version 1.7:

    • Added type approval operations + specific facilities in USIM file Administrative Data(EFad) for VoLTE

Version 1.6:

  • Added the USIM values display if the program is called without “–adm”
  • Added the –authenticate (milenage verification and SQN) without “–adm”

Version 1.5:

  • Updated the “USIM service table” for some terminals compatibility
    (to be able to disable “roaming” in UE configuration)

Version 1.4:

  • Fixed bug for MNC on 3 figures: initial UE location and SIM card overwrite from 2 figures MNC

Version1.3:

  • Extended ADM code to hexadecimal values

Version 1.2:

  • Added feature to set “service provider name” (SPN)
    This name is displayed on the UE as operator name.
    So, setting SPN different on each card is a convenient usage in labs
  • Increased authentication delay to let more computation time to the UICC

Version 1.1:

  • bug fix:upper case hexa decimal values (A to F) was not processed correctly

Version 1.0, new features:

  • New feature to compute OPc from OP
  • New feature: test authentication (test milenage implementation) and determine the current SQN inside the USIM
  • More controls and warning
  • Less information printed by default

A tutorial on how to dialog with a “SIM card” and the 3GPP implementation

UICC tutorial

Open Cells program

uicc.h:

  • class UICC implements common dialog
  • class SIM implements GSM specific dialog
  • class USIM implements 3G/4G dialogs

aes.h, milenage.h:

  • AES and milenage simple implementation to test the UICC authentication procedure

program_uicc.c:

  • uses these classes to read/write data in Open cells cards.

Other suppliers cards will also work, for the part that is compliant to standards.

Compilation:

make

should compile with no warnings

Insert the card in the reader and the reader in a USB socket as:

sudo ./program_uicc

reads basic data in the card

sudo DEBUG=y ./program_uicc

perform the same, with trace: all data exchange with the UICC are printed

sudo ./program_uicc --help

shows the parameters help to set values in the UICC.

A typical command line (with IMSI, OPC and Ki used in our example configuration files)

sudo ./program_uicc --adm 12345678 --imsi 208920100001101 --isdn 00000001 --acc 0001 --key 6874736969202073796d4b2079650a73 --opc 504f20634f6320504f50206363500a4f -spn "OpenCells01" --authenticate --noreadafter

A README.txt file in the source directory provides examples.

This README explains also how to use a PC/SC reader.

source code

ADM code management changed in UICC version 4: you have to specify a ADM code to upload the UICC/SIM, nevertheless you can use any 8 figures value.

For cards before version 4 (before year 2021, serial below OC004000 or no serial printed on the card), you must use the ADM code that is written on the invoice.

We offer free support: FAQ

If the answer is not in the FAQ, please write comments on the blog page: uicc-interface (so the answer can be used by other people).