Skip to main content
sim cards header

SIM Cards#

The SIM cards used in our infrastructure are mostly programmable cards developed by Open-Cells. SIM cards interface is a standard one: raw dialog over a serial interface. These readers are seen as a standard bidirectional serial link over USB in Linux and windows. Any other raw serial interface UICC to USB would be compatible.

The cards are encoded and programmed to use PLMN (MNC: 208 and MCC: 92) using UICC/SIM programing tool from Open Cells open-cells

Programming SIM Cards#

Reading Existing value in the SIM card

astro@Precision-3640-Tower:/uicc-v2.4# ./program_uicc
Existing values in USIM
ICCID: 89860061100000000006
WARNING: iccid luhn encoding of last digit not done
USIM IMSI: 208920100001106
USIM MSISDN: 00000006
USIM Service Provider Name: OpenCells06

Example of writing into the SIM card the follwing Information:

SIM card parameterValue
adm12345678
IMSI208920100001101
ISDN00000001
ACC0001
KEY6874736969202073796d4b2079650a73
OPC504f20634f6320504f50206363500a4f
SPNSnTLux

Run the following command:

astro@Precision-3640-Tower:/uicc-v2.4# ./program_uicc --adm 12345678 --imsi 208920100001101 --isdn 00000001 --acc 0001 --key 6874736969202073796d4b2079650a73 --opc 504f20634f6320504f50206363500a4f -spn "SnTLux" --authenticate --noreadafter

This gives the following results:

Existing values in USIM
ICCID: 89860061100000000006
WARNING: iccid luhn encoding of last digit not done
USIM IMSI: 208920100001101
USIM MSISDN: 00000001
USIM Service Provider Name: OpenCells01
Setting new values
Succeeded to authentify with SQN: 9984
set HSS SQN value as: 10016
info

The parameters referenced here are referring to France's MCC. However, this should be designed carfully according to the PLMN code (MCC and MNC) of the Base-Station and to avoid IMSI collision. see the mobile country code section on Wikipidia.

List of SIM cards within the Infrastructure#

Table below provides a partial information about the SNT SIM Cards.

SIM#PLMNIDKiOPSQNSPNvendor
02707201000011016874736969202073796d4b2079650a73504f20634f6320504f50206363500a4f000000000021SNTOpenCells
12089200000000016874736969202073796d4b2079650a74504f20634f6320504f50206363500a4f000000000021SNTOpenCells
22089200000000026874736969202073796d4b2079650a73504f20634f6320504f50206363500a44000000000020SNTOpenCells
327001xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPOSTPOST
427001xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPOSTPOST
527077xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxProximusProximus
627077xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxProximusProximus
info

The PLMN and IMSIs will be updated to match Luxembourg's MCC.

Notes#

  • PLMN: MCC|MNC, where | means concatenation.
  • IMSI: PLMN|ID, where | means concatenation.
  • The apn: snt.ipv4
  • The algorithm: Milenage
  • SQN: use a pair value
  • OPc:8E27B6AF0E692E750F32667A3B14605D (9f36a7be1f783f641e23776b2a05714c xor 11111111111111111111111111111111). To calculate the encrypted OP, use the following tools as follows: Enter Ki value in the first field (AES Key) , Enter OP value in the second field (Input Data), Click Encrypt. Then XOR the resulted value with the OP.