0% found this document useful (0 votes)
18 views11 pages

Flex Ric

The document provides a step-by-step guide for installing and setting up FlexRIC, including the installation of SWIG, necessary packages, and the OAI setup. It details the commands for cloning repositories, building OAI and FlexRIC, and starting the gNB, UE, and near-RT RIC processes. Additionally, it addresses potential issues with Python versions and provides updated commands for installation on recent Ubuntu versions.

Uploaded by

ramrb3600
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views11 pages

Flex Ric

The document provides a step-by-step guide for installing and setting up FlexRIC, including the installation of SWIG, necessary packages, and the OAI setup. It details the commands for cloning repositories, building OAI and FlexRIC, and starting the gNB, UE, and near-RT RIC processes. Additionally, it addresses potential issues with Python versions and provides updated commands for installation on recent Ubuntu versions.

Uploaded by

ramrb3600
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2/12/26, 1:31 PM FlexRIC

FlexRIC
STEP:1 Installation:

1- Install SWIG: An interface generator to enable the multi-language feature (i.e., C/C++ and Python) for the xApps.

1 git clone [Link]


2 cd swig
3 git checkout release-4.1
4 ./[Link]
5 ./configure --prefix=/usr/
6 make -j8
7 make install

If make install command doesn’t work, try using sudo make install.

[Link] 1/11
2/12/26, 1:31 PM FlexRIC

2- All important packages

sudo apt install libsctp-dev python3.8 cmake-curses-gui libpcre2-dev python-dev

[Link] 2/11
2/12/26, 1:31 PM FlexRIC

We're seeing these errors because:


1. python3.8 and python-dev are not available by default in recent Ubuntu versions like Ubuntu 22.04 (Jammy
Jellyfish).
2. python3.8 has likely been superseded by newer versions (like python3.10 or python3.11 ).
3. python-dev is a meta-package that has been deprecated. It’s now replaced with version-specific packages like
python3-dev .

Fixes
1. Install the latest Python 3 development headers:

Instead of python3.8 , install the default version's development files:

1 sudo apt install python3-dev

This will install headers for the default Python 3 version (likely 3.10 or 3.11 on Ubuntu 22.04).

Updated Command

1 sudo apt install libsctp-dev python3-dev cmake-curses-gui libpcre2-dev

STEP:2 OAI SETUP

1- Clone the OAI Repository

1 git clone [Link] oai


2 cd oai/

[Link] 3/11
2/12/26, 1:31 PM FlexRIC

2- Build OAI with E2 Agent

By default, OAI will build the E2 Agent with E2AP v2 and KPM v2. If you want a different version, edit the variable
E2AP_VERSION and KPM_VERSION at OAI's [Link] file.

Currently available versions:

KPM v2.03 KPM v3.00

E2AP v1.01 Y Y

E2AP v2.03 Y Y

E2AP v3.01 Y Y

Please note that KPM SM v2.01 is supported only in FlexRIC, but not in OAI.

1 cd cmake_targets/
2 ./build_oai -I -w SIMU --gNB --nrUE --build-e2 --ninja

-I option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai
dependencies have changed.
-w option is to select the radio head support you want to include in your build. Radio head support is provided
via a shared library, which is called the "oai device" The build script creates a soft link from liboai_device.so
to the true device which will be used at run-time (here the USRP one, liboai_usrpdevif.so). The RF simulatorRF
simulator is implemented as a specific device replacing RF hardware, it can be specifically built using -w SIMU
option, but is also built during any softmodem build.
--gNB is to build the nr-softmodem and nr-cuup executables and all required shared libraries

--nrUE is to build the nr-uesoftmodem executable and all required shared libraries

--ninja is to use the ninja build tool, which speeds up compilation

--build-e2 option is to use the E2 agent, integrated within RAN.

[Link] 4/11
2/12/26, 1:31 PM FlexRIC

This takes a bit time.

These logs take time. We can check the logs getting updated by going to the path given.

If the openair2/E2AP/flexric folder is empty, try manually the following commands:

1 git submodule init


2 git submodule update

STEP:3 FlexRIC

By default, FlexRIC will build the nearRT-RIC with E2AP v2 and KPM v2. If you want a different version, edit the
variable E2AP_VERSION and KPM_VERSION at FlexRIC's [Link] file. Note that OAI's and FlexRIC's
E2AP_VERSION and KPM_VERSION need to match due to O-RAN incompatibilities among versions.

1- Clone the FlexRIC repository

[Link] 5/11
2/12/26, 1:31 PM FlexRIC

1 git clone [Link] flexric


2 cd flexric/
3 git checkout f1c08ed2b9b1eceeda7941dd7bf435db0168dd56

2- Build FlexRIC

mkdir build && cd build && cmake .. && make -j8

If u get an error, while building use gcc version 10 and g++ version 10.

3- Installation of Service Models(SMs)

[Link] 6/11
2/12/26, 1:31 PM FlexRIC

sudo make install

By default the service model libraries will be installed in the path /usr/local/lib/flexric while the configuration
file in /usr/local/etc/flexric .

STEP:4 Start the process

1-Start the gNB

In Terminal 1:

1 cd ~/oai/cmake_targets/ran_build/build
2 sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/[Link].band78.fr1.106PR
[Link] --gNBs.[0].min_rxtxtime 6 --rfsim --sa

[Link] 7/11
2/12/26, 1:31 PM FlexRIC

2-Start the UE

In Terminal 2:

1 cd ~/oai/cmake_targets/ran_build/build
2 sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --[Link] 001
010000000001 --[Link] [Link]

[Link] 8/11
2/12/26, 1:31 PM FlexRIC

3-Start the near-RT RIC

In Terminal 3:

1 cd ~/
2 ./flexric/build/examples/ric/nearRT-RIC

[Link] 9/11
2/12/26, 1:31 PM FlexRIC

In a new terminal:

1 cd ~/flexric
2 ./build/examples/xApp/c/monitor/xapp_kpm_moni

[Link] 10/11
2/12/26, 1:31 PM FlexRIC

[Link] 11/11

You might also like