This page is for users who build their own images and run a 5G stack by hand: OCUDU, Duranta/OAI,
Open5GS, OAI CN5G or Aether SD-Core. It lists the COSMOS test SIMs and how to load them into your
core with the cosmos-sim-db package, the UE devices and the nodes they sit on, and the two UE
packages, cosmos-ue-tools (modem bring-up) and cosmos-ue-traffic (repeatable offered load).
A UE needs three things before it can carry data on your cell:
cosmos-sim-db package. Its generator writes the subscribercosmos-ue-prep (in cosmos-ue-tools) brings aExample: a researcher runs their own OCUDU image with Open5GS on a fronthaul server and the
Benetel RAN650 O-RU. They install cosmos-sim-db on that server and provision Open5GS from it, then
install cosmos-ue-tools on the UE node and attach its Quectel modem with
cosmos-ue-prep quectel up COSMOS-O.
Rules that apply to every UE on COSMOS
- The SIM data is public: COSMOS is a public testbed, and every user needs it to provision a
core. It ships, keys included, in thecosmos-sim-dbpackage; install it on the server that runs
your core.- No USB 2.0 modems for any test.
cosmos-ue-prep verifywarns when the link is below 5000 Mbit/s.- A UE node can carry two QMI modems. Pick a modem by its
/dev/serial/by-id/name or by USB
vendor, never by attyUSB,cdc-wdmorwwannumber.- Never re-attach a modem with
AT+CFUN=0thenAT+CFUN=1. Usecosmos-ue-prep … downand
cosmos-ue-prep … up.- All O-RUs and all UEs are within 10-15 ft of each other. "The UE is out of range" is never the
cause. If a UE does not see your cell, the O-RU is not radiating, or it radiates another channel or PCI.
cosmos-sim-dbcosmos-sim-db (version 1.4.0-1 on apt.cosmos-lab.org, suite noble) installs:
| Path | What it is |
|---|---|
/usr/share/cosmos-sim-db/sims.yml |
the inventory: every COSMOS SIM card, the soft UEs, and the 64-UE Amarisoft lteue pool |
/usr/bin/cosmos-sim-gen |
the generator: subscriber configuration for one core, printed to stdout |
/usr/bin/cosmos-sim-initsql |
rebuilds the OAI CN5G init SQL so a fresh MySQL container seeds only COSMOS SIMs |
All COSMOS SIMs and cells use the test PLMN 001/01 (MCC 001, MNC 01, two-digit MNC). The
generator emits only 001/01 SIMs unless you pass --all.
The SIMs that the generator emits by default:
| IMSI | Device | Node |
|---|---|---|
001010000000011 |
Quectel RM510Q-GL modem | node1.rrail |
001010000000013 |
SIMCom SIM8200EA-M2 modem (Qualcomm SDX55) | node1.rrail |
001010000000022 |
SIMCom modem | sdr1-in3.sb1 |
001010000000032 |
Quectel RM520N-GL modem | sdr1-in3.sb1 |
001010000000033 |
Quectel RM520N-GL modem | node1.osc |
001010000000034 |
Samsung Galaxy S24 (SM-S921U1) | node1.rrail |
001010000000035 |
Samsung Galaxy S22 (SM-S901U1) | see Phones |
001010123456780 |
srsRAN_4G srsue (OCUDU soft UE, ZMQ) |
any |
001010123456781 |
OAI nr-uesoftmodem (Duranta RFsim soft UE) |
any |
001010123456789 |
Amarisoft lteue UE emulator |
any |
001010123456700 to 001010123456763 |
Amarisoft lteue emulated-UE pool (64 UEs) |
any |
That is 74 subscribers. --no-pool leaves out the 64-UE pool.
The inventory also holds nine cards on the retired PLMN 310/014 (IMSIs beginning 310014,
several of them in older phones such as a OnePlus 8T). A SIM registers only on a network that
broadcasts its home PLMN, so these do not attach to a 001/01 cell. --all includes them, flagged
RETIRED. One 001/01 card, 001010000000025, has no key material recorded and is never emitted.
The generator's output contains the subscriber keys (Ki, OPc), ready for your core. The full SIM
list with its keys is/usr/share/cosmos-sim-db/sims.ymlin the package. Generate the subscribers
on the server that runs your core rather than typing keys by hand.
On the server that runs your core (not on a console, not on a UE node):
apt-get update && apt-get install cosmos-sim-db
The generator takes the core name as its only argument:
cosmos-sim-gen oai-cn5g > seed_cosmos_sims.sql # Duranta / OAI CN5G (MySQL)
cosmos-sim-gen open5gs > provision.sh # OCUDU / Open5GS (mongo)
cosmos-sim-gen amarisoft > ue_db.cfg # Amarisoft ltemme ue_db
cosmos-sim-gen sd-core > subscribers.yaml # Aether SD-Core (simapp, helm values)
Options: --plmn 00101 (the default) selects SIMs on that PLMN; --all adds the retired SIMs;
--sims PATH (or $COSMOS_SIMS) reads another inventory file; --no-pool leaves out the lteue
pool; --indent N sets the leading spaces of the sd-core output (default 12).
What each output sets up:
| Core | Output | Slice and DNN it provisions |
|---|---|---|
| OAI CN5G (Duranta, OAI) | SQL INSERTs for the three subscriber tables (AuthenticationSubscription, AccessAndMobilitySubscriptionData, SessionManagementSubscriptionData), 5G-AKA, milenage |
slice sst 1 / sd 000001, DNN oai, IPv4, no static IP addresses |
| Open5GS (OCUDU) | a bash script that runs open5gs-dbctl add for each SIM, then mongosh |
the dbctl default DNN (internet) plus an extra session COSMOS-O with the same QoS; every session forced to IPv4 |
| Aether SD-Core | subscribers: (one entry per SIM) and a device-groups: block |
DNN COSMOS-S, MTU 1400 |
Amarisoft ltemme |
a ue_db: [ … ] block, sim_algo: "milenage" |
the core's own default DNN |
Open5GS. Run the script on the host where the Open5GS MongoDB is up. It calls
open5gs-dbctl at /opt/open5gs/misc/db/open5gs-dbctl unless you set DBCTL:
cosmos-sim-gen open5gs > provision.sh
DBCTL=/path/to/open5gs-dbctl bash provision.sh
rm provision.sh
The IPv4 step matters for OCUDU: open5gs-dbctl provisions IPv4v6 sessions, srsRAN/OCUDU is
IPv4-only, and a dual-stack request is rejected while registration still succeeds. What a second
run of the script does to subscribers that already exist is not verified.
OAI CN5G. The OAI CN5G compose file mounts database/oai_db2.sql as the MySQL init script, and
upstream that file holds 101 subscribers on the demo PLMN 208/95. A pruned live database is
re-seeded from it at every docker compose down -v or omf load. Rebuild the init file instead:
cosmos-sim-gen --plmn 00101 oai-cn5g > /tmp/seed.sql
cosmos-sim-initsql oai_db2.sql.upstream-bak /tmp/seed.sql oai_db2.sql
cosmos-sim-initsql keeps the original schema and replaces only the subscriber INSERTs. It
refuses to write if any 15-digit IMSI from the original survives. Prove it with a real teardown
(docker compose down -v && up -d), not a restart: a restart reuses the volume. Delete
/tmp/seed.sql afterwards.
Aether SD-Core. Splice the output into radio-5g-values.yaml under
omec-sub-provision.config.simapp.cfgFiles."config.yaml".configuration (that is why the default
indent is 12). Each SIM gets its own entry, because each card has its own key: an IMSI range
sharing one key would authenticate one card and fail the rest.
Amarisoft. Paste the output as the ue_db value in mme.cfg, or include the file. This is the
core side only. If you drive these subscribers from Amarisoft lteue, the UE side must use
sim_algo: "milenage" too; with the shipped "xor" it fails authentication against OAI CN5G and
Open5GS. If a UE host needs an lteue UE list, build it on the core server and pipe it to the UE
host; do not store it on a console.
The convention is one APN per stack, so you can see which stack a modem is attached to:
| Stack | Core | APN the subscribers get |
|---|---|---|
| OCUDU | Open5GS | internet and COSMOS-O |
| Duranta / OAI | OAI CN5G | oai (COSMOS-D is defined but not provisioned yet) |
| Aether SD-Core | SD-Core | COSMOS-S |
| Amarisoft | ltemme |
the core's default (COSMOS-A is defined but not provisioned yet) |
The modem's APN must be one your core's SMF serves. Otherwise registration succeeds and the PDU
session is rejected.
| Node | Modem | IMSI | USB | Notes |
|---|---|---|---|---|
node1.osc.cosmos-lab.org |
Quectel RM520N-GL | 001010000000033 |
USB 3 (10000M) | the only modem on the node; Intel NUC, replaced 2026-11-14; ModemManager is masked |
node1.rrail.cosmos-lab.org |
Quectel RM510Q-GL | 001010000000011 |
USB 3 (bus 4-6) | ignores AT+QNWLOCK (cell lock); answers ERROR to AT+QSCAN |
node1.rrail.cosmos-lab.org |
SIMCom SIM8200EA-M2 (Qualcomm SDX55) | 001010000000013 |
USB 3 (bus 4-4) | two modems on this node: see below |
sdr1-in3.sb1.cosmos-lab.org |
Quectel RM520N-GL | 001010000000032 |
USB 3 | honours AT+QNWLOCK |
sdr1-in3.sb1.cosmos-lab.org |
SIMCom (SDX55) | 001010000000022 |
USB 3 | two modems on this node |
The UE nodes run the lte5gue.ndz image, which carries qmicli, iperf3 and cosmos-ue-tools.
Two modems on one node. On node1.rrail the SIMCom takes cdc-wdm0 and wwan0 and the
Quectel cdc-wdm1 and wwan1 (as of 2026-10-15). A modem reboot can swap wwan0 and wwan1, and
the ttyUSB numbers move. Find each modem's AT port by name:
ls -l /dev/serial/by-id/
The Quectel AT port is the usb-Quectel_…-if02-port0 entry (also /dev/quectel-at on lte5gue
images); the SIMCom AT port is the usb-QCOM_SDXPRAIRIE…-if02 entry.
The test phones are Samsung Galaxy phones on USB with adb. Both are on USB 2, so throughput
tethered through the node is not valid for performance tests: run iperf3 on the phone instead
(the android back-end of cosmos-ue-traffic does this).
| Phone | Node | SIM | State (2026-11-13/14) |
|---|---|---|---|
| Galaxy S24 (SM-S921U1) | node1.rrail |
001010000000034 |
adb authorized 2026-11-13; dropped off USB on 2026-11-14, current state not verified |
| Galaxy S22 (SM-S901U) | node1.osc |
the inventory lists 001010000000035, but on 2026-11-13 the phone reported a SIM on the retired PLMN 310/014 |
does not attach to a 001/01 cell until that is fixed; ask the testbed administrators |
Before a phone can be used: accept "Allow USB debugging" on the phone once (a person at the phone),
and create the test APN in the phone's settings (the adb shell cannot write APNs). A reimage of
the node creates a new adb key, which the phone must accept again. Airplane mode is scripted with
cmd connectivity airplane-mode enable|disable.
| Soft UE | Use with | Where it is | IMSI |
|---|---|---|---|
srsRAN_4G srsue (ZMQ) |
OCUDU, no radio | /opt/srsran4g/build/srsue/src/srsue on the ocudu.ndz image |
001010123456780 |
OAI nr-uesoftmodem (RFsim) |
Duranta/OAI, no radio | /opt/duranta/cmake_targets/ran_build/build/ on the duranta.ndz image |
001010123456781 |
Amarisoft lteue |
any stack, over the air through an SDR; up to 64 UEs on one radio | the lte5gue.ndz image (used on sdr1-in3.sb1 with its N310, and on srv1-lg1.sb1) |
001010123456789 and the 64-UE pool |
lteue needs an Amarisoft licence from the COSMOS licence server, which grants one seat per
component testbed-wide. Whether external users may run lteue, and when, is not verified: ask the
testbed administrators.
nr-uesoftmodem ships configured for IMSI 2089900007487 on PLMN 208/99. Point it at
001010123456781 to use the COSMOS PLMN.
Both packages are on apt.cosmos-lab.org, suite noble. Every COSMOS reference image has that
repository configured, so an image built on top of one installs them with apt:
apt-get update && apt-get install cosmos-ue-tools cosmos-ue-traffic
If your image does not start from a COSMOS reference image, ask the testbed administrators for the
repository line.
cosmos-ue-tools 1.0Modem tools for the UE node: Quectel RM5xx and SIMCom SDX55 over QMI. It depends on python3,
python3-serial, libqmi-utils, usbutils and iproute2.
| Command | What it does |
|---|---|
cosmos-ue-prep <simcom\|quectel> <up\|down\|verify> [apn] |
brings a modem into a known state (below) |
cosmos-ue-at <port> <AT command> [wait_s] |
sends one AT command and prints the reply on one line |
cosmos-ue-qeng [port] |
prints the Quectel AT+QENG="servingcell" line and AT+C5GREG?. The port defaults to /dev/ttyUSB2: always pass the by-id port |
/usr/lib/cosmos-ue/modem-resolve.sh |
a shell function for your own scripts: modem_resolve <quectel\|simcom> sets QMI and WWAN for that modem and returns 2, with a message, when it cannot tell |
cosmos-ue-prep actions:
down: stops the data call it started and deregisters the modem (AT+CFUN=0). Run itup: sets the CPU governor to performance, deregisters, reboots the modem (AT+CFUN=1,1),UE_IP=<address> IF=<interface> and ends with UP. If the data callverify: checks the USB speed, the persistent settings and the CPU governor, and exits 1 onVERIFY-DRIFT). It changes nothing.The persistent settings it enforces: the requested NSSAI (AT+C5GNSSAI), automatic PLMN selection
(AT+COPS=0), and on the Quectel usbnet 0, mode_pref NR5G, the NR band mask and no cell lock;
on the SIMCom AT+CNMP=71 and PDP context 1 with your APN.
Environment variables:
| Variable | Default | Meaning |
|---|---|---|
BANDS |
77:78 |
Quectel NR band mask (nr5g_band). Use 41 for the sb1 n41 over-the-air cell. The SIMCom keeps its all-band mask |
LOCK |
unset (no lock) | Quectel only: <pci>:<ssb arfcn>[:<scs kHz>:<band>], default SCS 30 kHz, band 78. Applied after the reboot, because a lock does not survive AT+CFUN=1,1 |
NSSAI |
01 (SST 1, no SD) |
the requested slice. It must match your AMF exactly: Open5GS treats "no SD" and SD 000000 as different slices |
DN_ROUTE |
the OAI CN5G demo data-network subnet | the subnet routed through the modem. Set it to your core's data network |
The APN defaults to oai. Examples for the cores on this page:
systemctl stop ModemManager # if it runs: it holds the AT and QMI ports
cosmos-ue-prep quectel verify
cosmos-ue-prep quectel up COSMOS-O # OCUDU + Open5GS
cosmos-ue-prep simcom up oai # Duranta + OAI CN5G
cosmos-ue-prep quectel down # before you stop the DU
How it picks the modem: cosmos-ue-prep takes the USB device with the modem's vendor ID (Quectel
2c7c, SIMCom 1e0e). On node1.rrail and sdr1-in3.sb1 there is one modem of each vendor, so
the choice is unambiguous. It keeps the data-call state in /run/ue-prep-<cdc-wdm>.state.
Both modems carrying traffic at once. Each up sets one data-network route, so the second
modem's route replaces the first. Add per-source policy routing, one table per modem, and bind
iperf3 to the UE address:
ip rule add from <ue-ip> table N; ip route replace <dn-subnet> dev <wwanX> table N
Read the IF= line that up prints; never assume which wwan belongs to which modem. Remove the
rules after the run.
cosmos-ue-traffic 1.4A generator of seeded, repeatable offered-load scenarios for any experiment: sweeps, staircases,
Poisson bursts, Pareto ON/OFF, periodic loads, extremes, a 24 h diurnal profile, UE classes,
application sessions and closed-loop ladders. The same scenario, seed and cell always give the same
events. It depends on python3, python3-yaml and zstd. The player needs only the Python
standard library, so the same package serves UE hosts.
| Command | What it does |
|---|---|
cosmos-ue-traffic --help |
prints the list of subcommands (safe: it runs nothing) |
cosmos-ue-traffic validate <scenario> |
checks a scenario |
cosmos-ue-traffic plan <scenario> <outdir> |
expands it into an explicit event list for a cell and back-end; changes nothing on the testbed |
cosmos-ue-traffic run <scenario> <outdir> |
plans and plays it |
cosmos-ue-traffic report <run_dir> [out.json] |
offered against delivered load per step |
cosmos-ue-traffic expand \| play \| power \| finalize \| replay |
the older scenario format, the lteue player, power export, dataset finalize, and re-checking closed-loop decisions |
validate, plan and run take --cell <calibration.yml>, --backend <lteue|lteue-tun|cots|android|dry> (default dry), --backend-config <file>, --ue-count,
--sink-addr and --seed; run also takes --host, --port, --speed, --tail-s and --stats.
The old command names ee-load-gen, lteue-load and ee-load-gate-report remain as aliases.
The package installs:
| Path | Contents |
|---|---|
/usr/share/cosmos-ue-traffic/scenarios/ |
shipped scenarios; gen-*.yml are the general examples, for instance gen-cots-sweep.yml (DL and UL rate staircases for 1-2 COTS modems, then two application sessions) |
/usr/share/cosmos-ue-traffic/cells/ |
cell calibrations (saturation load and per-UE ceilings) for the COSMOS stack and O-RU combinations, for example ocudu-benetel-3350-100.yml |
/usr/share/cosmos-ue-traffic/backends/ |
back-end examples: cots-example.yml, android-example.yml, lteue-tun-example.yml, dry.yml |
/usr/share/doc/cosmos-ue-traffic/ |
README.md, GENERATOR.md (design and output contract), LOAD_MODES.md |
Back-ends:
| Back-end | UEs | How it sends |
|---|---|---|
cots |
real modems | iperf3 (flows of at least 1 s) or the udpgen pacer, started over ssh on the UE host and the data-network host. Modems stay attached |
android |
the test phones over adb |
iperf3 on the phone; attach is airplane mode off plus a registration wait; Wi-Fi and airplane mode are restored after the run |
lteue |
Amarisoft lteue soft UEs |
lteue's remote API (default 127.0.0.1, port 9002) |
lteue-tun |
lteue soft UEs in TUN mode |
real iperf3 or udpgen inside each UE's network namespace (not yet checked on hardware) |
dry |
none | simulated; for rehearsal |
To use the cots back-end, copy the example and replace its UPPER-CASE placeholders (UE host, UE
address, data-network host and address). plan accepts placeholders; run refuses them.
cp /usr/share/cosmos-ue-traffic/backends/cots-example.yml ~/cots.yml
cosmos-ue-traffic validate /usr/share/cosmos-ue-traffic/scenarios/gen-cots-sweep.yml
cosmos-ue-traffic plan /usr/share/cosmos-ue-traffic/scenarios/gen-cots-sweep.yml RUN --backend cots --backend-config ~/cots.yml
cosmos-ue-traffic run /usr/share/cosmos-ue-traffic/scenarios/gen-cots-sweep.yml RUN --backend cots --backend-config ~/cots.yml
The android example lists what must be ready on a phone before a run: USB debugging accepted,
the test APN set on the phone, and a static arm64 iperf3 pushed to /data/local/tmp/iperf3.
UE nodes are reserved like other machines; there is no separate UE booking.
| UE node | How it is reserved |
|---|---|
node1.rrail |
its own machine row (node1) on the main scheduler page of the portal, 30 min to 6 h per reservation |
sdr1-in3.sb1 |
part of a reservation of the sb1 domain |
node1.osc |
osc group members only, like every osc machine: they may use it without a booking; powering or imaging it needs a reservation of it |
Reserve the UE node for the same slot as your fronthaul server and O-RU. See
Reserving fronthaul servers and O-RUs.
Other users' cells share the RF space: lock the modem to your band (BANDS) and, on a Quectel that
honours it, to your cell (LOCK).
| Symptom | Cause | Fix |
|---|---|---|
Authentication failure (MAC failure) on a fresh registration |
the core's subscriber does not match the SIM | provision the core from cosmos-sim-gen <core>; never type keys by hand |
a UE with an IMSI beginning 310014 never registers |
retired PLMN 310/014 | use a 001/01 SIM |
lteue UEs fail authentication against OAI CN5G or Open5GS |
lteue uses sim_algo: "xor" |
use "milenage" on the UE side |
| registration succeeds, PDU session rejected | the modem's APN is not a DNN your core serves | use the APN from APNs per stack |
OCUDU: Unsupported PDU Session Type: ipv4v6, registration still succeeds |
Open5GS subscriber provisioned as IPv4v6 | provision with the cosmos-sim-gen open5gs script (it forces IPv4) |
reject [62] Cannot find Requested NSSAI |
the requested slice differs from the AMF's | set NSSAI for cosmos-ue-prep to your AMF's slice |
data call fails after a DU restart (reject cause 26, QMI end reason cm 1140) |
the old PDU session is still in the core | run cosmos-ue-prep … down before every DU stop; up recovers once on its own |
| DL delivers 45-70 % less than the gNB sends | the modem was re-attached with AT+CFUN=0 / AT+CFUN=1 |
cosmos-ue-prep … up (a full modem reboot) |
verify prints WARN USB link is 480 Mb/s |
the modem is on USB 2 | do not use it for tests; ask the testbed administrators |
| the modem never searches for your cell | a previous user left manual PLMN selection (+COPS: 1,…) |
cosmos-ue-prep … up restores automatic selection |
qmicli: CID allocation failed in the CTL client: Transaction timed out |
ModemManager holds the QMI port | systemctl stop ModemManager |
the data call starts on the wrong modem (generic-no-service) |
two modems on the node, wrong cdc-wdm |
resolve the modem by name (modem_resolve, /dev/serial/by-id/) |
| the second modem's traffic goes nowhere | each up replaces the single data-network route |
per-source policy routing (see cosmos-ue-tools above) |
| the UE sees no cell | the O-RU is not radiating, or radiates another channel or PCI (all UEs are within 10-15 ft of all O-RUs) | check your DU and O-RU, not the distance |
| an AT query returns nothing | another process holds the AT port | only one process at a time on an AT port |
cosmos-ue-qeng talks to the wrong modem |
it defaults to /dev/ttyUSB2 |
pass the by-id AT port |
Modem-level recovery (carrier MBN profiles, forbidden-PLMN list, dead USB data path) is on the
COTS UE: the Quectel RM520N-GL modem page.
Author(s): COSMOS team · Last verified: 2026-11-19 (facts from the package sources; not run) · Tags: ue, sim, cosmos-sim-db, cosmos-ue-tools, cosmos-ue-traffic, quectel, simcom, lteue, open5gs, oai-cn5g, sd-core