![]() |
OAI 5G NR SA tutorial with OAI nrUE |
Table of Contents
[[TOC]]
In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and OAI nrUE.
Minimum hardware requirements:
Please install and configure OAI CN5G as described here: OAI CN5G
# https://files.ettus.com/manual/page_build_guide.html
sudo apt install -y autoconf automake build-essential ccache cmake cpufrequtils doxygen ethtool g++ git inetutils-tools libboost-all-dev libncurses-dev libusb-1.0-0 libusb-1.0-0-dev libusb-dev python3-dev python3-mako python3-numpy python3-requests python3-scipy python3-setuptools python3-ruamel.yaml
git clone https://github.com/EttusResearch/uhd.git ~/uhd
cd ~/uhd
git checkout v4.8.0.0
cd host
mkdir build
cd build
cmake ../
make -j $(nproc)
make test # This step is optional
sudo make install
sudo ldconfig
sudo uhd_images_downloader
# Get openairinterface5g source code
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g
cd ~/openairinterface5g
git checkout develop
# Install OAI dependencies
cd ~/openairinterface5g/cmake_targets
./build_oai -I
# nrscope dependencies
sudo apt install -y libforms-dev libforms-bin
# Build OAI gNB
cd ~/openairinterface5g/cmake_targets
./build_oai -w USRP --ninja --nrUE --gNB --build-lib "nrscope" -C
cd ~/oai-cn5g
docker compose up -d
Note: From tag 2024.w45
, OAI gNB runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
If you are using an earlier version than 2024.w45
, you should add the --sa
argument to the sample commands below to obtain a correct behavior.
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 -E --continuous-tx
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --usrp-tx-thread-config 1
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --usrp-tx-thread-config 1 -E --continuous-tx
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band257.u3.32prb.usrpx410.conf --rfsim
Note: From tag 2024.w45
, OAI nrUE runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
If you are using an earlier version than 2024.w45
, you should add the --sa
argument to the sample commands below to obtain a correct behavior.
Important notes:
Run OAI nrUE with USRP B210
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --ue-fo-compensation -E --uicc0.imsi 001010000000001
Important notes:
Run OAI nrUE with RFsimulator
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --uicc0.imsi 001010000000001 --rfsim
Important notes:
Run OAI nrUE with RFsimulator in FR2
cd ~/openairinterface5g/cmake_targets/ran_build/build
sudo ./nr-uesoftmodem -r 32 --numerology 3 --band 257 -C 27533280000 --uicc0.imsi 001010000000001 --ssb 72 --rfsim
A configuration file can be fed to the nrUE command line in order to connect to the local NGC.
The nrUE configuration file (e.g. ue.conf) is structured in a key-value format and contains the relevant UICC parameters that are necessary to authenticate the UE to the local 5GC. E.g.:
uicc0 = {
imsi = "001010000000001";
key = "fec86ba6eb707ed08905757b1bb44b8f";
opc = "C42449363BBAD02B66D16BC975D77CC1";
dnn = "oai";
nssai_sst = 1;
}
Parameter | Description | Default Value |
---|---|---|
IMSI | Unique identifier for the UE within the mobile network. Used by the network to identify the UE during authentication. It ensures that the UE is correctly identified by the network. | 001010000000001 |
key | Cryptographic key shared between the UE and the network, used for encryption during the authentication process. | fec86ba6eb707ed08905757b1bb44b8f |
OPC | Operator key for the Milenage Authentication and Key Agreement algorithm used for encryption during the authentication process. | Ensures secure communication between the UE and the network by matching the encryption keys. |
DNN | Specifies the name of the data network the UE wishes to connect to, similar to an APN in 4G networks. | oai |
NSSAI | Allows the UE to select the appropriate network slice, which provides different QoS. | 1 |
The UE configuration must match the one of the network's AMF. The nrUE can connect by default to OAI CN5G with no need to provide the configuration file.
When running the nr-uesoftmodem
, one can specify the nrUE configuration file using the -O
option. E.g.:
sudo ./nr-uesoftmodem --rfsim --rfsimulator.serveraddr 127.0.0.1 -r 106 --numerology 1 --band 78 -C 3619200000 -O ~/nrue.uicc.conf
The CL option --uicc0.imsi
can override the IMSI value in the configuration file if necessary (e.g. when running multiple UEs): --uicc0.imsi 001010000000001
.
More details available at ci-scripts/yaml_files/5g_rfsimulator/README.md.
Note: From tag 2024.w45
, OAI nrUE runs by default in standalone (SA) mode.
In earlier versions the default mode was non-standalone (NSA).
If you are using an earlier version than 2024.w45
, you should add the --sa
argument to the sample commands above to obtain a correct behavior.
ping 192.168.70.135 -I oaitun_ue1
Please also refer to the official USRP Host Performance Tuning Tips and Tricks tuning guide.
The following steps are recommended. Please change the network interface(s) as required. Also, you should have 10Gbps interface(s): if you use two cables, you should have the XG firmware. Refer to the N300 Getting Started Guide for more information.
sudo ethtool -G <ifname> rx 4096 tx 4096
mitigations=off nosmt
in your grub config and update grub. (This step is optional)Example code to run:
for ((i=0;i<$(nproc);i++)); do sudo cpufreq-set -c $i -r -g performance; done
sudo sysctl -w net.core.wmem_max=62500000
sudo sysctl -w net.core.rmem_max=62500000
sudo sysctl -w net.core.wmem_default=62500000
sudo sysctl -w net.core.rmem_default=62500000
sudo ethtool -G enp1s0f0 tx 4096 rx 4096
sudo cpupower idle-set -D 0
--MACRLCs.[0].ul_max_mcs 14
.--L1s.[0].max_ldpc_iterations 4
.--tune-offset <Hz>
command line switch, where <Hz>
is ideally half the bandwidth, or possibly less.-A
option at the nrUE and/or gNB side, e.g., -A 45
. This modifies the timing advance (in samples). Adjust +/-5 if the issue persists.--MACRLCs.[0].ulsch_max_frame_inactivity 0
.Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )