# OpenAirInterface Walkthrough: Research-Grade 5G Stack

OpenAirInterface (OAI) has been the backbone of academic 5G research since before 5G was a commercial reality. It came out of Eurecom in the south of France, and is now stewarded by the OpenAirInterface Software Alliance (OSA). The codebase covers the entire stack — UE, gNB (split or monolithic), and a 5G core (CN5G) — and tracks Release 16 with active Release 17 features landing.

If you are doing protocol research, building a testbed for a paper, or experimenting with PHY-layer modifications, OAI is the stack you reach for. If you want a production-feel gNB with a clean config, you reach for srsRAN. Both are valid; they target different jobs.

What Lives in the Repo

OAI is hosted on the OSA GitLab (gitlab.eurecom.fr/oai/openairinterface5g). The interesting trees:

  • openair1/ — PHY layer, including the 5G NR PHY, all the OFDM/SC-FDMA processing, channel estimation, and HARQ logic. This is where most research patches land.
  • openair2/ — L2 (MAC, RLC, PDCP) and RRC for both LTE and NR.
  • openair3/ — NAS and S1AP/NGAP code.
  • ci-scripts/ and tools/ — what the project uses for its CI testbeds, including the famous Eurecom CI matrix.
  • cmake_targets/ — the build system entry point. OAI uses a custom build_oai script wrapped around CMake.

The 5G core (openair-cn5g) is a separate set of repos under the same group: oai-amf, oai-smf, oai-upf, oai-nrf, oai-ausf, oai-udm, oai-udr. They are containerized and have a Docker Compose deployment that works.

Who Actually Uses It

OAI shows up in three contexts:

  1. Academic research — papers on PHY layer, RIS, ML-based channel estimation, and protocol extensions almost always have an OAI implementation. Eurecom, NYU Wireless, Northeastern's Colosseum testbed, and POWDER all run OAI.
  2. Operator labs — tier-1 operators evaluating O-RAN options use OAI to prototype before deciding on a vendor.
  3. Standardization — feature contributions to 3GPP RAN groups frequently get prototyped in OAI to demonstrate feasibility.

It is less common in commercial private-5G deployments because the build, tuning, and documentation curve is steeper than srsRAN. That is changing — OAI now has supported Docker images and the ColliBri and 5G-EVE EU projects pushed substantial productization.

Hardware

The supported front-ends overlap with srsRAN: USRP B210, X310, N310, plus AW2S and Benetel RU options for O-RAN 7.2x split testing. OAI is the reference implementation for several O-RAN fronthaul interfaces, so if you care about Open Fronthaul, this is where you go.

For a SISO bench setup, a B210 plus an i7/i9 host with isolated cores works for 40 MHz n78. For O-RAN 7.2 split, you need a real RU (Benetel RAN650, LITEON, Foxconn) and DPDK-capable NICs.

Building OAI

OAI's build_oai script handles dependency installation and compilation:

git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd openairinterface5g
source oaienv
cd cmake_targets
./build_oai -I              # installs dependencies, run once
./build_oai --gNB --nrUE -w USRP --ninja

A full build pulls in UHD, builds the PHY simulators, the gNB, and the nrUE binary. Expect 10–20 minutes on a decent host.

Bringing Up a gNB and UE

OAI ships reference configs under targets/PROJECTS/GENERIC-NR-5GC/CONF/. For a SISO B210 n78 20 MHz config, the path is gnb.sa.band78.fr1.106PRB.usrpb210.conf. Open it and at minimum set:

  • tracking_area_code, mcc, mnc to match your CN5G config.
  • amf_ip_address to your AMF.
  • GNB_INTERFACE_NAME_FOR_NG_AMF to the host interface that reaches the AMF.

Launch the gNB:

sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --sa

For the simulated UE on the same host with no RF, use the RF simulator:

sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 \
    -C 3619200000 --rfsim --sa --uicc0.imsi 001010000000001

The UE will perform cell search, attach, register with the AMF, and bring up oaitun_ue1. ping -I oaitun_ue1 8.8.8.8 confirms data plane.

Where It Fits Versus Alternatives

vs srsRAN Project: OAI is broader (UE + gNB + CN), more configurable, and leads on research features (RIS, sidelink prototypes, 7.2x fronthaul). srsRAN is cleaner code, faster to bring up, and has a much shorter learning curve. For a testbed paper, OAI. For a teaching lab, srsRAN. vs commercial RAN: OAI does not match a vendor box on stability, scheduler quality, or feature completeness. It does match — and often beat — vendor boxes on the speed at which a new feature can be added. vs Magma / free5GC / Open5GS for the core: OAI's CN5G is fine for OAI-tied testing. If you want a core to use across multiple gNB vendors, Open5GS or free5GC are easier in practice.

What Trips People Up

OAI's tooling assumes you read the source. Logs are verbose, configs have inherited LTE-era field names that no longer make sense, and the CMake feature flags interact in non-obvious ways. Plan to spend the first week reading the wiki and the ci-scripts to understand what configurations the project itself tests against. If a config is not in CI, assume it is not currently working.