How to run a KPM xApp leveraging the X5G testbed comprising OAI, NVIDIA ARC-OTA, and the OSC Near-RT RIC
X5G is an open, programmable, and multi-vendor private 5G O-RAN testbed that leverages the NVIDIA Aerial SDK for the High-PHY layer and OpenAirInterface for the higher layers.
More details can be found in the following paper:
D. Villa, I. Khan, F. Kaltenberger, N. Hedberg, R. Soares da Silva, S. Maxenti, L. Bonati, A. Kelkar, C. Dick, E. Baena, J. M. Jornet, T. Melodia, M. Polese, and D. Koutsonikolas, "X5G: An Open, Programmable, Multi-vendor, End-to-end, Private 5G O-RAN Testbed with NVIDIA ARC and OpenAirInterface," arXiv:2406.15935 [cs.NI], pp. 1-15, June 2024. [pdf] [bibtex]
This tutorial servers as a reference on how to operate a Key Performance Measurement (KPM) xApp in an end-to-end platform with similar capabilities to those provided by X5G. A possible final outcome of this tutorial can be found on this X5G Overview Video.
The following prerequisites are recommended to be met in order to properly run the tutorial.
The NVIDIA Aerial information and installation guide are available on its official website.
The O-RAN Software Community (OSC) Near-RT RIC Release E can be installed following this guide. Note that for this tutorial, the OSC Near-RT RIC runs on an OpenShift cluster, whereas a plain Kubernetes deployment might require specific networking configurations.
The OpenAirInterface (OAI) gNB code requires the addition of a custom E2 Agent to manage E2SM (E2 Service Model) functionalities that has been developed and tested as part of the following publication:
E. Moro, M. Polese, A. Capone, T. Melodia, "An Open RAN Framework for the Dynamic Control of 5G Service Level Agreements," in Proceedings of IEEE NFV-SDN, Dresden, Germany, November 2023. [pdf] [bibtex]
The E2 agent is based on the OSC e2sim project. An OAI version with the custom E2 Agent already integrated in the 2024.w18 release of OAI can be found at this GitHub repository.
A basic and easily extensible xApp developed in Python can be found at the GitHub repository. This repository contains some Python examples that can subscribe to selected RAN parameters, receive periodic indication messages, and send control requests to update these parameters.
The xApp SM connector component connects the xApp with the OSC Near-RT RIC. On one side, it receives the custom SM buffers to be encapsulated in E2AP (E2 Application Protocol) messages and sent to the RIC. On the other side, it retrieves the custom SM buffers from E2AP to be sent to the xApp. The connector is part of the base xApp code and can be found at this GitHub repository.
The e2sim is a component that can run on the same server as the OAI L2/L3 and ARC PHY and has the duty to encapsulate/decapsulate the custom Service Model (SM) buffers to be sent to or received from the gNB. It communicates with the gNB via UDP sockets. The e2sim codebase can be found at this GitHub repository.
We assume that all components listed in the prerequisites, such as the gNB with NVIDIA ARC-OTA and OAI, OSC Near-RT RIC, e2sim, and xApp, have been compiled and are functioning properly. Please note that the commands and terminals used in this tutorial may vary depending on your setup.
To run the system in this tutorial, we open 5 terminals as follows:
In T1, we first run the NVIDIA L1 cuBB
, for example, by using the following command (it may vary based on your ARC release and configurations, please refer to Running cuBB End-to End):
In T2, once the L1 is ready, we can run the custom version of OAI
with the usual OAI start command (note that this command can also vary based on your OAI configuration):
From this point onwards, we can connect the UEs as desired, for example, from within T6.
In T3, we run the e2sim
on the same machine where OAI is running, specifying the IP and port of the OSC Near-RT RIC, for example:
The E2 Agent of the gNB and the RIC are successfully connected if the following prompt is shown:
In T4, we can start connecting our xApp by running the xapp-sm-connector
with:
We wait for the connector to finish its initialization, which is indicated by, for example, the following line:
In T5, we start the xApp
Python code by running, for example:
If everything is running correctly, we should periodically see the UEs’ metrics displayed on the screen:
The kpm-xapp.py
script can be easily modified to save these metrics in an external dB, such as InfluxDB, and then display them on a dashboard, such as Grafana.