Many private LTE projects stall at the SIM stage. The core network expects specific subscriber data, but the SIM cards in the lab do not match it. A clear setup process saves time and avoids repeated troubleshooting.

HKCARD ELECTRONICS CO.,LIMITED (HKCARD) supplies white-brand SIM cards and coder kits for customers who build their own 4G LTE test networks. This guide covers the SIM card, coder kit, and software, then walks through personalization for an Open5GS private network and a lab test with a Ruijie CPE, an eNodeB, and an open EPC.

Quick Answer

Use a compatible white-brand 4G LTE SIM card with a coder kit and a software tool such as Osmocom pySim on macOS or Linux. Verify the ADM key, write the IMSI, Ki, and OPc values, and build the IMSI from a 2-digit MNC and Milenage parameters. Add the same values to your Open5GS HSS, then test attach and data service through your CPE and eNodeB.


1. SIM Card, Coder Kit, and Software: What You Need

A private LTE test setup has three parts that must work together.

PartRoleWhat to check
White-brand SIM cardStores the subscriber identity and authentication keysForm factor, USIM support, and whether the ADM key is provided
Coder kit (card reader)Connects the SIM to your computerReader model, driver support, and card compatibility
Personalization softwareWrites IMSI, Ki, OPc, and other fieldsSupport for your operating system and card type

Software Options

  • Osmocom pySim: An open-source toolkit for reading and writing SIM and USIM cards. It runs on macOS and Linux. Check the current pySim documentation for the supported reader and card models.
  • Vendor configuration software: Some coder kits include their own Windows or macOS utility. Confirm which tool your kit uses before you start.

Tip: Check the reader driver and card model first. Most setup problems come from an unsupported reader or an incorrect card type setting, not from the network.


2. Understanding the Network Parameters

Before you write anything to the card, set your network identity. A private test network usually uses a test PLMN, and the values must match on the SIM and the core network.

IMSI Structure for a 2-Digit MNC

The IMSI is 15 digits in this format:

FieldLengthExample
MCC (Mobile Country Code)3 digits001
MNC (Mobile Network Code)2 digits01
MSIN (Subscriber number)10 digits0000000001
IMSI total15 digits001010000000001

Important: When your MNC has 2 digits, the MSIN must be 10 digits. This keeps the IMSI at 15 digits. A test MCC/MNC such as 001/01 is common in labs. Confirm it fits your local rules before any over-the-air test.

Authentication: Milenage, Ki, OP, and OPc

Milenage is the authentication algorithm used in 3GPP networks (defined in TS 35.205 and TS 35.206). It uses these values:

  • Ki: The 128-bit subscriber key stored on the SIM and in the HSS.
  • OP: The 128-bit operator key.
  • OPc: A derived value calculated from Ki and OP. Many cores store OPc instead of OP.

The authentication field expects OP or OPc. In practice, this means:

  • If you already have OPc, enter it directly.
  • If you have OP, let the tool or core calculate OPc. Do not enter OP into a field that expects OPc unless the tool accepts it.
  • Use the same type (OP or OPc) consistently on the SIM side and the HSS side.
FieldFormatWhere it is used
Ki32 hexadecimal charactersSIM card and HSS
OP32 hexadecimal charactersSource value for OPc calculation
OPc32 hexadecimal charactersSIM card and HSS (in most Open5GS setups)
AMF4 hexadecimal charactersHSS configuration. Open5GS examples commonly use 8000 for LTE.

Keep Ki and OP/OPc values out of public files, email threads, and screenshots.


3. Personalizing a White-Brand SIM with pySim

This workflow applies to authorized SIMs for your own test network.

Step-by-Step Process

  1. Connect the reader. Attach the coder kit to a macOS or Linux computer and confirm the reader is detected.
  2. Insert the blank card. Place the white-brand SIM in the reader.
  3. Verify the ADM key. Enter the ADM (administrative) key supplied by HKCARD. The ADM verification unlocks write access to protected files.
  4. Write the identity fields. Set the IMSI with the correct MCC, 2-digit MNC, and MSIN.
  5. Write the authentication fields. Enter Ki and OPc (or OP, if your tool calculates OPc).
  6. Set the ICCID and other fields. Record the ICCID for inventory.
  7. Read the card back. Confirm that every field matches your plan. Keep a record of each card.

Note: Check the command options with your installed pySim version (--help). Options and card-type names can change between releases.

Verification Checklist

  •  IMSI is 15 digits and matches the MCC and 2-digit MNC
  •  ADM verification passed
  •  Ki and OPc match the values entered in Open5GS
  •  The card is recognized by your CPE
  •  The card record is saved with its ICCID

4. Provisioning Open5GS

Open5GS includes the EPC functions needed for a 4G LTE lab: MME, HSS, SGW, and PGW. Add the subscriber with the same values you wrote to the SIM.

Open5GS fieldValue to enter
IMSIThe 15-digit IMSI from the SIM
K (Ki)The Ki value written to the SIM
OPcThe OPc value written to the SIM
AMF8000 (confirm against your configuration)
APN / DNNYour test data network name, such as internet
QoS / Slice settingsDefault profile for the test

Confirm that the PLMN in your eNodeB configuration matches the MCC and MNC on the SIM.


5. Lab Test: CPE + eNodeB + Open EPC

Before you test with the CPE+eNodeB+EPC, build a bench setup with RF cables and attenuators. This keeps the signal inside the test area.

Simplified test path:

Ruijie CPE (with SIM) → LTE radio link → eNodeB → S1 interface → Open5GS EPC

Test Steps

  1. Check the EPC. Confirm that Open5GS is running and that the subscriber record is saved.
  2. Check the eNodeB. Verify the PLMN, LTE band, and connection to the EPC.
  3. Check the CPE. Confirm the Ruijie model supports the eNodeB band and accepts the SIM form factor.
  4. Insert the SIM and power on. Watch the CPE status and the EPC logs.
  5. Look for an Attach Request. The MME log should show the IMSI and an authentication exchange.
  6. Confirm authentication. The AKA procedure should pass without errors.
  7. Test data. Check for an IP address on the CPE and run a ping test to the EPC gateway.

Common Issues and Fixes

SymptomLikely causeCheck
CPE does not read the SIMForm factor or contact problemCard orientation, SIM tray, CPE compatibility
Attach request appears, then failsKi or OPc mismatchCompare values on the SIM and in Open5GS
IMSI not found in HSSMNC length errorConfirm 2-digit MNC and 10-digit MSIN
Authentication passes, no dataAPN or routing issueAPN name, SGW/PGW settings, IP forwarding
Network not visibleeNodeB or band problemPLMN, band, antenna, RF attenuation

6. Deploy the First eNodeB

After the bench test is stable, plan a small field trial.

  1. Define the test area. Choose one site and a limited number of devices.
  2. Confirm spectrum rights. Use only spectrum you are authorized to operate.
  3. Check backhaul. Make sure the eNodeB can reach the EPC with stable latency.
  4. Install the equipment. Follow the documentation for power, grounding, cabling, and antenna placement.
  5. Test with a known-good CPE and SIM. Confirm registration and data at the planned locations.
  6. Record results. Log signal metrics (RSRP, RSRQ, SINR), attach times, and handover results.
  7. Expand gradually. Add devices and sites only after the first site runs reliably.

7. Using Your Own Network Only

White-brand SIMs should be used only for networks and subscribers you own or are authorized to operate. Do not use them to imitate another operator’s subscribers or to access networks without permission. Keep your test environment isolated and follow the radio rules in your country.


Why Choose HKCARD

HKCARD ELECTRONICS CO.,LIMITED (HKCARD) supports customers who need white-brand 4G LTE SIM cards for private network projects, lab testing, and IoT devices.

  • White-brand options: Neutral or custom-branded cards for your project
  • Coder kit support: Guidance on readers and personalization workflows
  • Sample supply: Small quantities for lab validation before production

Confirm card model, reader compatibility, and software support for your project before you order.


What to Include in Your Enquiry

  • SIM form factor (2FF, 3FF, 4FF)
  • Intended use (private LTE, CPE testing, IoT)
  • CPE model (for example, your Ruijie model)
  • Core network (for example, Open5GS)
  • Operating system for the coder kit (macOS or Linux)
  • Branding needs and quantity

Do not send Ki, OP, OPc, or ADM keys in an ordinary email. Share sensitive data only through an approved, secure process.


Frequently Asked Questions

Can I personalize a white-brand SIM on macOS?

Yes, if your coder kit and software support macOS. Osmocom pySim is designed for macOS and Linux. Check your reader’s driver and the current pySim documentation.

Why does the authentication field ask for OP or OPc?

Milenage uses both values. Many core networks, including Open5GS deployments, store OPc. If you hold OP, calculate OPc before you enter it, or use a tool that does this for you.

Why must the MNC be 2 digits in my IMSI?

The IMSI format depends on the MNC length. With a 2-digit MNC, the MSIN has 10 digits, which keeps the total at 15 digits. The SIM and the core network must use the same format.

What is an ADM key?

The ADM key is an administrative code that verifies write access to protected card files. Keep it secure and use it only for authorized personalization.


Contact HKCARD ELECTRONICS CO.,LIMITED

For product information, samples, or project support, contact:

HKCARD ELECTRONICS CO.,LIMITED

 

#PrivateLTE #Open5GS #Milenage #pySim #WhiteBrandSIM

Programmable SIM cards for 4G LTE & 5G NR testing – HKCARD Electronics. Blank, writable, and custom SIMs for IoT, MVNOs, and lab environments
Free SIM Personalize Tools Download