Programming of SIM cards sysmoISIM SJA2 - SantiagoBH/5G-NSA-Network-with-Mosaic5g GitHub Wiki

Description

For the operation of the mobile network, it is necessary to have programmable USIM cards and a smart card reader/writer from the Sysmocom company, as well as the EMV Smart Card Reader-Writer HX-N99 for SIM cards. The sysmoISIM SJA2 is a programmable SIM card product offered by Sysmocom. It is an ISIM (IP Multimedia Services Identity Module) card that complies with 3GPP and ETSI standards. The card is designed to provide secure access to IP multimedia services, such as video calls, multimedia messaging, and mobile internet access. The card is also compatible with various mobile network technologies, such as 2G, 3G, 4G, and 5G networks. It can be used in various applications, such as smartphones, tablets, and other mobile devices.

Install Dependencies

sudo apt install pcsc-tools pcscd libccid swig python3-dev python3-serial libpcsclite-dev git
sudo apt install python3-pip      
sudo pip3 install pyscard pytlv   
sudo apt install python3-pyscard

Install Sysmo-Usim-Tool

For the configuration of SIM cards, it is necessary to have a tool that allows the programming of the cards. In this case, Sysmo-Usim-Tool was used.

git clone https://gitea.sysmocom.de/sysmocom/sysmo-usim-tool.git

Setting

To check the status of the connection of the card, it is necessary to use 'pcsc_scan', which verifies the connection status between the computer and the card reader. It tells us the type of card that is being used.

sudo pcsc_scan

When programming the cards, it is necessary to consider the following parameters: knowing the IMSI code, which is unique for each SIM card, the Ki and OPC, which are obtained when configuring the software. It is also necessary to have the ADM1_KEY, which is unique for each SIM card and is provided by the provider (in this case Sysmocom). On the other hand, the MCC (Mobile Country Code) and MNC (Mobile Network Code) codes are set by the user and indicate the country and mobile network operator.

cd sysmo-usim-tool/       
sudo python3 ./sysmo-isim-tool.sja2.py --help    

For configuration, it is necessary to take into account: -a ADM1_KEY, -J IMSI, -K Ki, -O OPC, and -N MNC.

sudo python3 ./sysmo-isim-tool.sja2.py -a 15281502 -J 901700123456789 -K 00112233445566778899aabbccddeeff -O 63BFA50EE6523365FF14C1F45F88737D -N 70

It should be noted that if an incorrect ADM1 key is entered, an authentication error will occur, and it will inform us that the number of attempts to program the card has been reduced by 1 before it is blocked. Therefore, each SIM card has a maximum of three attempts.