Software-defined End-to-End 5G Network
In this tutorial, we will show how the entire end-to-end 5G network can be simulated using software defined user equipment (UE). This allows for the evaluation of novel — non-standard compliant — algorithms and protocols.Such a setup enables you to test and prototype two-sided network functions such as AI/ML-based CSI feedback compression or even custom constellations forpilotless communications.
Ensure that you have already built the UE containeroai-nr-ue (seeOpenAirInterface Setup).
Note
For end-to-end RF experiments, this tutorial requires asecond Jetson device with another USRP connected to it. Alternatively, you can use two USRPs connected to the same Jetson. However, end-to-end simulations can be done by using OAI’srfsimulator mode.In this mode, the UE is connected to the gNB via a simulated RF interface.
Run the gNB
Before connecting the UE, the gNB needs to be ready to connect.
# start the gNB with USRP connected./scripts/start_system.shb200# or start the gNB in rfsimulator mode./scripts/start_system.shrfsim
Check that the gNB is running correctly
dockerlogs-foai-gnb
During the initialization procedure, the gNB provides the required UE parameters
136387.122571[PHY]A(nr_common_signal_proced:92)CommandlineparametersforOAIUE:-C3319680000-r106--numerology1--ssb516
These parameters depend on the choice of the configuration file of the gNB.
Run the UE
Set the above UE parameters asUE_EXTRA_OPTIONS in the.env file in the correspondingconfig directory. For the above example with 106 PRBs, theUE_EXTRA_OPTIONS should be
UE_EXTRA_OPTIONS=-r106--numerology1-C3319680000
For RF based experiments, we recommend to use the 24 or 51 PRB configurations.
Also set theUSRP_SERIAL_UE to the serial number of the USRP connected to the UE. For cable-based experiments, the two USRPs must be connected as shown inFig. 19.
Instead of using a real sim-card the UE can be configured via theconfig/common/nrue.uicc.conf file. In case you modify the IMSI, ensure it is registered in theoai_db.sql. Otherwise, the UE will not be recognized by the 5G core network.
Note that thestart_system.sh script will automatically start the UE when the gNB is running. Otherwise, you can start the UE with
# load environment variablesset-asourceconfig/b200/.envset+a# start the UE containercdconfig/common/dockercomposeup-doai-nr-ue# and shutdown the UEdockercomposestopoai-nr-ue
For RF experiments, this needs to be done on the second Jetson device.
Verify that the UE is running correctly
dockerlogs-foai-nr-ue
You should now see the UE connected to the gNB.
Test performance
Verify that an IP address was assigned
dockerexec-tioai-nr-ueifconfig
This should show a network interface with IP12.1.1.2.
Ping an external network
dockerexec-tioai-nr-ueping-Ioaitun_ue1google.com
You can access the current UE stats via
dockerexec-tioai-nr-uecatnrL1_UE_stats-0.log
Or run an end-to-end speed test via
dockerexec-doai-ext-dniperf3-s# Running uplink test (UE to gNB)dockerexec-tioai-nr-ueiperf3-u-t10-i1-b5M-B12.1.1.2-c192.168.72.135# Running downlink test (gNB to UE)dockerexec-tioai-nr-ueiperf3-u-t10-i1-b5M-B12.1.1.2-c192.168.72.135-R
You can now also run multiple UEs by adding more instances ofoai-nr-ue in thedocker-compose.yaml file to simulate a multi-user scenario.
Testing in RF Simulator Mode
The OpenAirInterface (OAI) RF simulator enables testing without access to physical radio hardware. This tutorial summarizes the basic usage for the RF simulator. For further details, see the following resources:
Basic Configuration
When launching the gNB container, include these parameters in theUSE_ADDITIONAL_OPTIONS parameter of thedocker-compose.yaml file:
--rfsimulator.options chanmod--telnetsrv
On the UE side, activate the RF-Simulator with these parameters:
--rfsimulator.options chanmod--rfsimulator.serveraddr 192.168.71.140 # <gNB_IP_ADDRESS>
You can find an example configuration file in theconfig/rfsim folder.
Dynamic Re-configuration
The RF simulator supports runtime configuration through Telnet.SeeTelnet Usage Guide for details.
To control the downlink channel (on the UE):
# Connect to UEtelnet192.168.71.1509090# View current settingschannelmodshowcurrent# View available profileschannelmodshowpredef# Set noise powerchannelmodmodify0noise_power_dB-10
To control the uplink channel (on the gNB), connect to gNB and configure uplink:
# Connect to gNBtelnet192.168.71.1409090# Set noise powerchannelmodmodify1noise_power_dB-10
Note
Changes take effect immediately. No restart is required.