UICC/SIM programing

Version: 2019-07-19

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

DON’T try –adm option with random codes: THE code IS on YOUR invoice

If you try successively a wrong –adm, the card will be blocked on it’s last settings (no more possible to change the IMSI/Ki/OPc)

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