UICC/SIM programing

Version: 2020-06-05

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


  • 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


  • 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


  • 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.



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.

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 (serial below OC004000 or no serial printed on the card), you must use the ADM code that is written on the invoice.

Latest version for version 1,2,3 UICCs: Before UICC v4 source code

We offer free support:


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).