Setup of OAI 5g gNB with flexRic for 5GCN - Apbk20/OpenAirInterface_Notes GitHub Wiki

1 Install

1.1 Install prerequisites and Download the required dependencies.

git clone https://github.com/swig/swig.git
cd swig
git checkout release-4.1 
./autogen.sh
./configure --prefix=/usr/
make -j8
make install
sudo apt install libsctp-dev python3.8 cmake-curses-gui libpcre2-dev python3-dev

2. Deployment

2.1 OAI RAN

2.1.1 Clone the OAI repository

git clone https://gitlab.eurecom.fr/oai/openairinterface5g ~/MR_5GNR_SLicing/oai
cd ~/MR_5GNR_SLicing/oai

2.1.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 CMakeLists.txt file.

cd ~/MR_5GNR_SLicing/oai/cmake_targets/
./build_oai -I 
./build_oai -w USRP --gNB --build-e2 --ninja -C

2.2 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 CMakeLists.txt file. Note that OAI's and FlexRIC's E2AP_VERSION and KPM_VERSION need to match due to O-RAN incompatibilities among versions.

2.2.1 Clone the FlexRIC repository

git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
cd flexric/
git checkout 70dd779f5339f4dac3ac176a24b49c45046a59fa

2.2.2 change FlexRIC.conf IP address

code flexric.conf

2.2.3 Build FlexRIC

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

2.2.4 Installation of Service Models (SMs)

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.

In order to configure E2 agent, please, add the following block in OAI's configuration file:

code ~/MR_5GNR_SLicing/oai/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf
e2_agent = {
  near_ric_ip_addr = "192.168.10.15";
  sm_dir = "/usr/local/lib/flexric/"
}

And change the IP of AMF and RU USRP to X30xx

RUs = (
{
  local_rf       = "yes"
  nb_tx          = 2;
  nb_rx          = 2;
  att_tx         = 0;
  att_rx         = 0;
  bands          = [77];
  max_pdschReferenceSignalPower = -27;
  max_rxgain                    = 75;
  eNB_instances  = [0];
  ##beamforming 1x2 matrix: 1 layer x 2 antennas
  bf_weights = [0x00007fff, 0x0000];
  #clock_src = "internal";
#  sdr_addrs = "addr=192.168.20.2,clock_source=internal,time_source=internal"
  sdr_addrs = "type=n3xx";
  clock_src = "internal";
}
);
  ////////// AMF parameters:
  amf_ip_address = (
  {
    ipv4       = "192.168.71.132";
    ipv6       = "192:168:30::17";
    active     = "yes";
    preference = "ipv4";
  }
  );

  NETWORK_INTERFACES :
  {
    GNB_INTERFACE_NAME_FOR_NG_AMF            = "enx3c18a02356b3";
    GNB_IPV4_ADDRESS_FOR_NG_AMF              = "192.168.10.15";
    GNB_INTERFACE_NAME_FOR_NGU               = "enx3c18a02356b3";
    GNB_IPV4_ADDRESS_FOR_NGU                 = "192.168.10.15";
    GNB_PORT_FOR_S1U                         = 2152; # Spec 2152
  }

}
);