How to setup and use OpenAirInterface with a near-RT RIC
OpenAirInterface (OAI) is a 3GPP-compliant software implementation of the full 5G NR stack. In this tutorial, we show how OpenRAN Gym users can get started with deploying an OAI gNB on Colosseum equipped with a standard compliant E2 agent for the E2AP component and custom Service Models based on protocol buffers, together with a Near-RT RIC and a sample xApp.
The basic repository for this project can be found here. It contains submodules that point to the different projects that are relevant to this tutorial.
This is a basic xapp (
xapp-oai submodule) that subscribes to selected RAN parameters, receives periodic indications messages and sends control requests to update these parameters. The base xApp can communicate with the gNB by means of a RIC, or via direct socket communication.
This component (
xapp-oai submodule) connects the xApp with the RIC. In downstream (from the xApp to the gNB), the connector receives our custom sm buffers to be encapsulated in E2AP messages and sent to the RIC. In upstream (from the gNB to the xApp), the connector retrieves custom Service Model (SM) buffers from E2AP to be sent to the xApp.
See ColO-RAN for a detailed description of the RIC components.
Similar to what the xApp SM Connector does, the E2SIM component (
e2sim submodule) encapsulates/decapsulates custom SM buffers that are to be sent or that are received from the gNB. It communicates with the gNB via UDP sockets.
This component (in the
e2protobuf submodule) is a simple gNB emulator to test custom SMs without running a real gNB.
This repository contains our custom protobuf definitions (in the
This component (
openairinterface5g submodule) is a fork of OpenAirInterface with the addition of a custom xApp agent.
This tutorial showcases an end-to-end 5G SA deployment with a near-RT RIC and an xApp reading L2 info from the gNB.
This requires a Colosseum reservation with the following SRNs:
oai-corefor the core network functions
oai-gnb-e2agentfor the E2-compliant gNB
oai-gnb-e2agentacting as UEs
oai-ricfor the near-RT RIC and the sample xApp
Once the reservation is ready, start the core network in the
Then start the near-RT RIC in the
and take note of the IP address of the SRN:
You can check if all the ric components are running by using the command
docker ps, whose result should be this:
Start the gNB in the
In the same SRN, start the
RIC_IP is the
col0 IP address you have previously found. The E2 Agent of the gNB is successfully connected with the RIC if the following line is shown:
Now start the xApp container in the
The xApp is separated into two components: an
xapp-connector which establishes a connection with the RIC, and a
base-xapp which implements the xApp logic.
xapp-connector in a dedicated terminal:
Wait for the following lines to appear:
xapp-connector is now ready to communicate with the base xApp, which should be started in a separate terminal:
The base xApp will now receive periodic update messages from the gNB:
Since no UEs are connected, the collection of UE L2 statistics is empty.
Run the following command in a
oai-gnb-e2agent SRN different from the one where the gNB is running to activate an UE:
to activate a 0dB attenuation rf scenario, and:
to finally start the UE. The xApp is now reporting the statistics:
You can add more UEs. To test the end-to-end connection add the route to the UE subnet in the core network SRN:
In the UE SRN, add the route to the core network host:
and take note of the UE GTP endpoint IP:
iperf3 server in the UE SRN:
and test the connection in downlink by running this in the
where UE_IP is the UE GTP endpoint IP. Add
-R to the previous command to the the uplink connection.