### Install Node.js Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/DOC/websrvuse.md Installs the Node.js runtime environment using apt. This example shows the output of the installation process. ```bash sudo apt install nodejs -y Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: diodon libdiodon0 libxdo3 xdotool Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded. Need to get 28.9 MB of archives. After this operation, 188 MB of additional disk space will be used. Get:1 https://deb.nodesource.com/node_18.x jammy/main amd64 nodejs amd64 18.17.1-deb-1nodesource1 [28.9 MB] Fetched 28.9 MB in 3s (11.3 MB/s) Selecting previously unselected package nodejs. (Reading database ... 399541 files and directories currently installed.) Preparing to unpack .../nodejs_18.17.1-deb-1nodesource1_amd64.deb ... Unpacking nodejs (18.17.1-deb-1nodesource1) ... Setting up nodejs (18.17.1-deb-1nodesource1) ... Processing triggers for man-db (2.10.2-1) ... ``` -------------------------------- ### Setup Hugepages for DPDK Source: https://github.com/oai/openairinterface5g/blob/develop/doc/LDPC_OFFLOAD_SETUP.md Configures hugepages on the system, which are required for DPDK performance. This example sets up 16GB of 1GB hugepages. ```bash sudo dpdk-hugepages.py -p 1G --setup 16G ``` -------------------------------- ### DPDK Compilation and Installation Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md Installs necessary build tools (meson, ninja-build) and then compiles and installs the DPDK library. Ensure you are in the extracted DPDK directory. ```bash # Installing meson : it should pull ninja-build and compiler packages # on debian sudo apt install python3-pyelftools meson # on Fedora/RHEL sudo dnf install python3-pyelftools meson tar xvf dpdk-20.11.9.tar.xz && cd dpdk-stable-20.11.9 # F release tar xvf dpdk-24.11.4.tar.xz && cd dpdk-stable-24.11.4 # K release meson build ninja -C build sudo ninja install -C build ``` -------------------------------- ### OAI UE Command Line Parameters Example Source: https://github.com/oai/openairinterface5g/blob/develop/doc/runmodem-nrue.md This log output guides the user on setting UE command line parameters for testing OAI UE with OAI gNB. It shows an example of required parameters like carrier frequency, bandwidth, numerology, and SSB subcarrier. ```shell [PHY] Command line parameters for OAI UE: -C 3319680000 -r 106 --numerology 1 --ssb 516 ``` -------------------------------- ### Install clang-format using apt Source: https://github.com/oai/openairinterface5g/blob/develop/doc/clang-format.md Remove existing clang-format installations and install clang-format-12 on Ubuntu systems. ```bash sudo apt-get remove clang-format* sudo apt-get install clang-format-12 ``` -------------------------------- ### Start the UE with RF Simulator Server Source: https://github.com/oai/openairinterface5g/blob/develop/doc/handover-tutorial.md Launches the User Equipment (UE) with RF simulation capabilities, acting as the RF simulator server. This setup is crucial for enabling multiple DUs to connect to the same RF simulation environment. ```bash sudo ./nr-uesoftmodem -C 3450720000 -r 106 --numerology 1 --ssb 516 -O --rfsim --rfsimulator.[0].serveraddr server ``` -------------------------------- ### Start CUUP Executable Source: https://github.com/oai/openairinterface5g/blob/develop/doc/E1AP/E1-design.md Command to start the CUUP executable. Use the specified configuration file. ```bash sudo ./nr-cuup -O ../../../ci-scripts/conf_files/gnb-cuup.sa.f1.conf ``` -------------------------------- ### Start Softmodem with Configuration Source Source: https://github.com/oai/openairinterface5g/blob/develop/common/config/DOC/config/rtusage.md Use the -O option to specify the configuration source and its parameters when starting softmodems. ```bash # ./lte-softmodem -O :::... ``` -------------------------------- ### Example CI Script Output Source: https://github.com/oai/openairinterface5g/blob/develop/ci-scripts/README.md This is an example of the expected output when running a scenario using the CI framework. It shows the log messages indicating the start of the scenario and the deployment of components. ```log [2025-08-07 18:07:49,631] INFO: ---------------------------------------- [2025-08-07 18:07:49,631] INFO: Creating HTML header [2025-08-07 18:07:49,631] INFO: ---------------------------------------- [2025-08-07 18:07:49,766] INFO: ---------------------------------------- [2025-08-07 18:07:49,767] INFO: Starting Scenario: xml_files/container_5g_rfsim_simple.xml [2025-08-07 18:07:49,767] INFO: ---------------------------------------- [2025-08-07 18:07:49,767] INFO: placing all artifacts for this run in /home/richie/oai/cmake_targets/log/container_5g_rfsim_simple.xml.d/ [...] [2025-08-07 18:07:49,771] INFO: ---------------------------------------- [2025-08-07 18:07:49,771] INFO: Test ID: 1 (#1) [2025-08-07 18:07:49,771] INFO: Deploy OAI 5G CoreNetwork [2025-08-07 18:07:49,771] INFO: ---------------------------------------- ``` -------------------------------- ### Install Git Source: https://github.com/oai/openairinterface5g/blob/develop/doc/GET_SOURCES.md Installs the Git client on Debian/Ubuntu-based systems. ```shell sudo apt-get update sudo apt-get install git ``` -------------------------------- ### Install DPDK with Custom Prefix for Xilinx T2 Source: https://github.com/oai/openairinterface5g/blob/develop/doc/LDPC_OFFLOAD_SETUP.md Builds and installs DPDK to a custom directory, useful for managing installations with non-default prefixes. Ensure meson and ninja are installed. ```bash cd ~/dpdk-stable meson setup --prefix=/opt/dpdk-t2 build cd build ninja sudo ninja install sudo ldconfig ``` -------------------------------- ### Compile and Install libyang2 and libnetconf2 from Source on Ubuntu Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md Detailed steps to compile and install specific versions of libyang2 and libnetconf2 from source on Ubuntu, required for M-plane functionality when distribution packages are insufficient. Includes build, installation, and cleanup commands. ```bash rm -rf /tmp/build_mplane_v2 mkdir /tmp/build_mplane_v2 # libyang cd /tmp/build_mplane_v2 git clone https://github.com/CESNET/libyang.git cd libyang git checkout v2.1.111 mkdir build && cd build cmake -DENABLE_TESTS=OFF \ -DENABLE_VALGRIND_TESTS=OFF \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DCMAKE_INSTALL_RPATH=/usr/local/lib \ -DPLUGINS_DIR=/usr/local/lib/libyang \ -DPLUGINS_DIR_EXTENSIONS=/usr/local/lib/libyang/extensions \ -DPLUGINS_DIR_TYPES=/usr/local/lib/libyang/types \ -DYANG_MODULE_DIR=/usr/local/share/yang/modules/libyang .. make -j8 sudo make install sudo ldconfig #libnetconf cd /tmp/build_mplane_v2 git clone https://github.com/CESNET/libnetconf2.git cd libnetconf2 git checkout v2.1.37 mkdir build && cd build cmake -DENABLE_TESTS=OFF \ -DENABLE_EXAMPLES=OFF \ -DENABLE_VALGRIND_TESTS=OFF \ -DCLIENT_SEARCH_DIR=/usr/local/share/yang/modules \ -DCMAKE_INSTALL_PREFIX=/usr/local \ -DCMAKE_INSTALL_RPATH=/usr/local/lib \ -DLIBYANG_INCLUDE_DIR=/usr/local/include \ -DLIBYANG_LIBRARY=/usr/local/lib/libyang.so \ -DLY_VERSION_PATH=/usr/local/include \ -DYANG_MODULE_DIR=/usr/local/share/yang/modules/libnetconf2 .. make -j8 sudo make install sudo ldconfig # to uninstall libraries # cd /tmp/build_mplane_v2/libyang/build && sudo make uninstall # cd /tmp/build_mplane_v2/libnetconf2/build && sudo make uninstall # cd # rm -rf /tmp/build_mplane_v2 ``` -------------------------------- ### NR-UE Configuration File Example Source: https://github.com/oai/openairinterface5g/blob/develop/ci-scripts/yaml_files/5g_rfsimulator/README.md Example of a libconfig file for NR-UE configuration, specifying IMSI, key, and OPC. ```libconfig uicc0 = { imsi = "208990100001100"; key = "fec86ba6eb707ed08905757b1bb44b8f"; opc= "C42449363BBAD02B66D16BC975D77CC1"; pdu_sessions = ({ dnn = "oai"; nssai_sst = 1; }); } ``` -------------------------------- ### UE Initial Connection Setup and Registration Sequence Source: https://github.com/oai/openairinterface5g/blob/develop/doc/RRC/rrc-dev.md This diagram visualizes the sequence of messages for an initial UE connection, including RRC setup, NAS authentication, security procedures, and optional PDU session setup. ```mermaid sequenceDiagram participant ue as UE participant du as DU participant cucp as CU-CP participant cuup as CU-UP participant amf as AMF ue->>du: Msg1/Preamble du->>ue: Msg2/RAR ue->>cucp: F1AP Initial UL RRC Msg Tr (RRC Setup Req, in Msg3) Note over cucp: rrc_handle_RRCSetupRequest() cucp->>ue: F1AP DL RRC Msg Transfer (RRC Setup, in Msg4) ue->>cucp: F1AP UL RRC Msg Transfer (RRC Setup Complete) Note over cucp: rrc_handle_RRCSetupComplete() %% TODO: when is RRC connected? cucp->>amf: NGAP Initial UE Message (NAS Registration/Service Req) Note over amf,ue: NAS Authentication Procedure (see 24.501) Note over amf,ue: NAS Security Procedure (see 24.501) amf->>cucp: NGAP Initial Context Setup Req Note over cucp: rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ() Note over cucp: rrc_gNB_generate_SecurityModeCommand() cucp->>ue: F1AP DL RRC Msg Transfer (RRC Security Mode Command) ue->>cucp: F1AP UL RRC Msg Transfer (RRC Security Mode Complete) Note over cucp: rrc_gNB_decode_dcch() (inline) opt No UE Capabilities present Note over cucp: rrc_gNB_generate_UECapabilityEnquiry() cucp->>ue: F1AP DL RRC Msg Transfer (RRC UE Capability Enquiry) ue->>cucp: F1AP UL RRC Msg Transfer (RRC UE Capability Information) Note over cucp: handle_ueCapabilityInformation() end opt PDU Sessions in NGAP Initial Context Setup Req present Note over cucp: trigger_bearer_setup() cucp->>cuup: E1AP Bearer Context Setup Req cuup->>cucp: E1AP Bearer Context Setup Resp Note over cucp: rrc_gNB_process_e1_bearer_context_setup_resp() cucp->>du: F1AP UE Context Setup Req du->>cucp: F1AP UE Context Setup Resp Note over cucp: rrc_CU_process_ue_context_setup_response() Note over cucp: e1_send_bearer_updates() cucp->>cuup: E1AP Bearer Context Modification Req cucp->>ue: F1AP DL RRC Msg Transfer (RRC Reconfiguration) cuup->>cucp: E1AP Bearer Context Modification Resp ue->>cucp: F1AP UL RRC Msg Transfer (RRC Reconfiguration Complete) Note over cucp: handle_rrcReconfigurationComplete() end Note over cucp: rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP() cucp->>amf: NGAP Initial Context Setup Resp (NAS Registration/Service Complete) ``` -------------------------------- ### Start gNB-mono Source: https://github.com/oai/openairinterface5g/blob/develop/openair2/E2AP/README.md Command to start the gNB-mono in a standalone configuration. Ensure you are in the build directory and specify the configuration file path. ```bash cd /build sudo ./nr-softmodem -O /targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim ``` -------------------------------- ### Install Dependencies for open-nFAPI Source: https://github.com/oai/openairinterface5g/blob/develop/nfapi/open-nFAPI/README.md These commands install the necessary dependencies on a fresh Ubuntu installation to build the open-nFAPI project. ```bash sudo apt-get install autoconf sudo apt-get install gcc sudo apt-get install g++ sudo apt-get install libtool sudo apt-get install make sudo apt-get install doxygen sudo apt-get install libcunit1-dev sudo apt-get install libz-dev sudo apt-get install libsctp-dev sudo apt-get install libboost-all-dev ``` -------------------------------- ### Example Comparison Output Source: https://github.com/oai/openairinterface5g/blob/develop/doc/UnitTests.md This is an example of the output from the compare.py tool, showing the differences in time and CPU usage between two benchmark result files. ```bash Comparing ../../file.json to ../../file1.json Benchmark Time CPU Time Old Time New CPU Old CPU New -------------------------------------------------------------------------------------------------------------------------------- BM_rotate_cpx_vector/100 +0.3383 +0.3384 43 58 43 58 BM_rotate_cpx_vector/100 +0.2334 +0.2335 42 52 42 52 BM_rotate_cpx_vector/100 +0.1685 +0.1683 42 49 42 49 BM_rotate_cpx_vector/100 +0.1890 +0.1889 42 50 42 50 BM_rotate_cpx_vector/100 +0.0456 +0.0457 42 44 42 44 BM_rotate_cpx_vector/100 +0.0163 +0.0162 42 42 42 42 BM_rotate_cpx_vector/100 +0.0005 +0.0004 43 43 43 43 BM_rotate_cpx_vector/100 +0.0134 +0.0129 43 43 43 43 BM_rotate_cpx_vector/100 +0.0162 +0.0162 42 42 42 42 BM_rotate_cpx_vector/100 +0.0003 +0.0003 42 42 42 42 ``` -------------------------------- ### Compile and Install WLS Library Source: https://github.com/oai/openairinterface5g/blob/develop/doc/nfapi.md Compile and install the WLS library using specified toolchain and ISA. Ensure correct environment variables are set. ```bash WIRELESS_SDK_TOOLCHAIN=gcc WIRELESS_SDK_TARGET_ISA=avx2 make sudo WIRELESS_SDK_TOOLCHAIN=gcc WIRELESS_SDK_TARGET_ISA=avx2 make install ``` -------------------------------- ### Example Benchmark Output Source: https://github.com/oai/openairinterface5g/blob/develop/doc/UnitTests.md This is an example of the output generated by a Google Benchmark run, showing performance metrics for different iterations. ```bash 2024-08-26T11:55:49+02:00 Running ./openair1/PHY/TOOLS/tests/benchmark_rotate_vector Run on (8 X 4700 MHz CPU s) CPU Caches: L1 Data 48 KiB (x4) L1 Instruction 32 KiB (x4) L2 Unified 1280 KiB (x4) L3 Unified 12288 KiB (x1) Load Average: 0.51, 0.31, 0.29 ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead. --------------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------------- BM_rotate_cpx_vector/100 43.1 ns 43.1 ns 16683136 BM_rotate_cpx_vector/256 70.1 ns 70.0 ns 9647446 BM_rotate_cpx_vector/1024 277 ns 277 ns 2378273 BM_rotate_cpx_vector/4096 1070 ns 1070 ns 654792 BM_rotate_cpx_vector/16384 4220 ns 4220 ns 169070 BM_rotate_cpx_vector/20000 5288 ns 5289 ns 136190 ``` -------------------------------- ### Example 5G Downlink Simulator Path Source: https://github.com/oai/openairinterface5g/blob/develop/doc/physical-simulators.md This example shows the file path for the 5G downlink simulator within the OAI project structure. ```bash # 5G Downlink simulator openair1/SIMULATION/NR_PHY/dlsim.c ``` -------------------------------- ### Example: Package All Available Components Source: https://github.com/oai/openairinterface5g/blob/develop/doc/packages.md A comprehensive example command to configure and build all available OAI packages, including USRP, LTE, NR, COMMON, and PHYSIM. ```bash cmake .. -GNinja -DOAI_USRP=ON -DPACKAGING_USRP=ON -DPACKAGING_LTE=ON -DPACKAGING_NR=ON -DPACKAGING_COMMON=ON -DENABLE_TELNETSRV=ON -DPACKAGING_PHYSIM=ON ninja cpack ``` -------------------------------- ### Start eNodeB Command Source: https://github.com/oai/openairinterface5g/blob/develop/doc/L2NFAPI_NOS1.md Command to start the eNodeB softmodem with a specified configuration file and disable S1 interface. Includes an example of checking network interfaces. ```bash sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf --noS1 > enb.log 2>&1 sleep 10 ifconfig ens3 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX inet addr:192.168.122.31 Bcast:192.168.122.255 Mask:255.255.255.0 .... oaitun_enb1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.0.1.1 P-t-P:192.172.0.2 Mask:255.255.255.0 .... ``` -------------------------------- ### Configuration File Example with New Parameter Source: https://github.com/oai/openairinterface5g/blob/develop/common/config/DOC/config/devusage/addaparam.md Illustrates how a new parameter ('opt2') can be included in the configuration file for a specific section ('somesection'). ```c somesection = { opt1 = 3; opt2 = "abcd"; }; ``` -------------------------------- ### Install Node.js 18 using apt-get Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/DOC/websrvuse.md Installs Node.js version 18 and npm on Debian-based systems using NodeSource repositories. This method involves fetching a setup script, updating the package list, and then installing Node.js. It also suggests installing build tools if needed. ```bash curl -s https://deb.nodesource.com/setup_18.x | sudo bash apt-get update sudo apt-get install -y nodejs # You may also need development tools to build native addons: # sudo apt-get install gcc g++ make ``` -------------------------------- ### Loading a Device Library with Command-Line Arguments Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/DOC/loader/rtusage.md This example demonstrates how to load a specific device library, 'liboai_device_USRP.so', using a command-line argument to override the default configuration. It shows the softmodem command and the expected log output indicating the parameters being set. ```bash ./lte-softmodem -O libconfig:/usr/local/oai/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf:dbgl5 --loader.oai_device.shlibversion _USRP ``` ```text [LIBCONFIG] loader.oai_device.shlibpath not found in /usr/local/oai/develop-nb-iot-merge/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrpb210.conf [LIBCONFIG] loader.oai_device.shlibversion set to default value "" [LIBCONFIG] loader.oai_device: 1/2 parameters successfully set, (1 to default value) [CONFIG] shlibversion set to _USRP from command line [CONFIG] loader.oai_device 1 options set from command line ``` -------------------------------- ### Deploy and Initialize Cassandra Database Source: https://github.com/oai/openairinterface5g/blob/develop/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md Navigate to the specific directory and start the Cassandra database and initialization container. This must be done before other deployments. ```bash $ cd ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz $ docker-compose up -d db_init ``` -------------------------------- ### Find Jansson Library Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/CMakeLists.txt Checks for the libjansson.so library. If not found, it halts the build with an error message, guiding the user to install the necessary package. ```cmake find_library(JSON NAMES "libjansson.so" REQUIRED) if (NOT JSON) message(FATAL_ERROR "libjansson not found, install libjansson-dev for ubuntu, jansson-devel for fedora if you need to build websrv back-end") else() message(STATUS "found libjansson for websrv") endif() ``` -------------------------------- ### iQ Player Session Example Source: https://github.com/oai/openairinterface5g/blob/develop/radio/iqplayer/DOC/iqrecordplayer_usage.md Demonstrates how to activate and configure the iQ player mode for replaying subframes using specific command-line options. This example shows the typical output during an iQ replay session. ```bash ./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf:dbgl5 --T_stdout 1 --log_config.global_log_options level,thread --eNBs.[0].component_carriers.[0].N_RB_DL 25 --device.recplay.subframes-replay 1 [CONFIG] get parameters from libconfig /usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf , debug flags: 0x00000005 ................................ .................................. [PHY]I lte-softmodem rxdataF[0] 0x55f52df52f40 for RU 0 [CONFIG] device.recplay.subframes-file set to default value "/tmp/iqfile" [CONFIG] subframes-record: 0 [CONFIG] device.recplay.subframes-record set to default value [CONFIG] subframes-replay: 0 [CONFIG] device.recplay.subframes-replay set to default value [CONFIG] subframes-max: 120000 [CONFIG] device.recplay.subframes-max set to default value [CONFIG] subframes-loops: 5 [CONFIG] device.recplay.subframes-loops set to default value [CONFIG] subframes-read-delay: 700 [CONFIG] device.recplay.subframes-read-delay set to default value [CONFIG] subframes-write-delay: 15 [CONFIG] device.recplay.subframes-write-delay set to default value [LIBCONFIG] device.recplay: 7/7 parameters successfully set, (7 to default value) [CONFIG] subframes-replay: 1 [CONFIG] device.recplay 1 options set from command line [CONFIG] loader.oai_iqplayer.shlibversion set to default value "" [LIBCONFIG] loader.oai_iqplayer: 2/2 parameters successfully set, (1 to default value) [CONFIG] loader.oai_iqplayer 0 options set from command line [LOADER] library liboai_iqplayer.so successfully loaded [HW]I lte-softmodem Loading subframes using mmap() from /tmp/iqfile size=324433632 bytes ... [HW]I lte-softmodem Replay iqs from USRP B200 device, bandwidth 5.000000e+06 [HW]I lte-softmodem Loaded 10550 subframes. [HW]I lte-softmodem iqplayer device initialized, replay /tmp/iqfile for 5 iterations[HW]I lte-softmodem [RAU] has loaded USRP B200 device. ............................................. ............................................. [PHY]I ru thread max_I0 18, min_I0 12 [PHY]I lte-softmodem prach_I0 = 0.0 dB [PHY]I ru thread max_I0 18, min_I0 0 [HW]I ru thread starting subframes file with wrap_count=1 wrap_ts=81024000 ts=107616555 [PHY]I lte-softmodem prach_I0 = 0.0 dB [PHY]I ru thread max_I0 18, min_I0 12 [HW]I ru thread starting subframes file with wrap_count=2 wrap_ts=162048000 ts=188640555 [PHY]I lte-softmodem prach_I0 = 0.0 dB [PHY]I ru thread max_I0 18, min_I0 0 [HW]I ru thread starting subframes file with wrap_count=3 wrap_ts=243072000 ts=269664555 [PHY]I lte-softmodem prach_I0 = 0.0 dB [PHY]I ru thread max_I0 19, min_I0 12 [HW]I ru thread starting subframes file with wrap_count=4 wrap_ts=324096000 ts=350688555 [PHY]I lte-softmodem prach_I0 = 0.0 dB [PHY]I ru thread max_I0 18, min_I0 12 [HW]W ru thread iqplayer device terminating subframes replay after 5 iteration /usr/local/oai/develop/openairinterface5g/radio/iqplayer/iqplayer_lib.c:222 trx_iqplayer_read() Exiting OAI softmodem: replay ended, triggering process termination ``` -------------------------------- ### BladeRF Configuration File Example Source: https://github.com/oai/openairinterface5g/blob/develop/radio/BLADERF/README.md Example content for the bladerf.conf file, used for automatic loading of FPGA images and setting initial device parameters like trim DAC and frequency. ```bash cat ~/.config/Nuand/bladeRF/bladerf.conf # Load the hostedx40.rbf FPGA image, set the trim DAC, and # configure the frequency fpg a ~/.config/Nuand/bladeRF/image.rbf # trimdac 592 # frequency 2.4G ``` -------------------------------- ### Debug OAI Executable with GDB Source: https://github.com/oai/openairinterface5g/blob/develop/doc/packages.md Example of how to use GDB to debug an OAI executable, such as the NR softmodem. Ensure both stripped and debug symbol packages are installed. ```bash gdb --args /usr/bin/nr-softmodem -O /etc/openairinterface/nr/gnb.sa.band78.fr1.106PRB.usrpb210.conf -E --continuous-tx -A -2 --device.name oai_usrpdevif ``` -------------------------------- ### Specify asn1c Executable Path with CMake Source: https://github.com/oai/openairinterface5g/blob/develop/doc/BUILD.md Configure the build to use a specific asn1c executable directly via CMake, for example, when installed in a custom location like /opt/asn1c. ```bash cmake .. -GNinja -DASN1C_EXEC=/opt/asn1c/bin/asn1c ``` -------------------------------- ### Build OAI with Web Server (Dependencies Met) Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/DOC/websrvuse.md This example demonstrates a successful build of OAI with the web server components when all backend (libulfius, libjansson) and frontend (NPM) dependencies are met. It shows the successful configuration and build process. ```bash $ ./build_oai --ninja -c -C --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope" [...] -- found libulfius for websrv -- found libjansson for websrv -- found npm for websrv -- Configuring webserver backend -- Configuring webserver frontend [...] -- Configuring done -- Generating done -- Build files have been written to: /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build cd /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build Running "cmake --build . --target nr-softmodem nr-cuup nr-uesoftmodem oai_usrpdevif telnetsrv websrv nrscope params_libconfig coding rfsimulator dfts -- -j8" Log file for compilation is being written to: /usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/log/all.txt nr-softmodem nr-cuup nr-uesoftmodem oai_usrpdevif telnetsrv websrv nrscope params_libconfig coding rfsimulator dfts compiled BUILD SHOULD BE SUCCESSFUL ``` -------------------------------- ### Display Help for Configuration Parameters Source: https://github.com/oai/openairinterface5g/blob/develop/common/config/DOC/config/rtusage.md This command displays help for all supported parameters, including those in the root section and specific sections like 'root'. It's useful for understanding available options and their descriptions. ```bash ./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.nbiot.band7.tm1.50PRB.usrpb210.conf --help ``` -------------------------------- ### UE Process Configuration with ZMQ Source: https://github.com/oai/openairinterface5g/blob/develop/radio/zmq/README.md Configure the UE process to use the ZMQ radio driver and specify TX/RX channels for communication with the gNB. This example shows a typical command-line setup. ```bash sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --device.name oai_zmqdevif --zmq.[0].tx_channels tcp://127.0.0.1:4557 --zmq.[0].rx_channels tcp://127.0.0.1:4556 --ssb 516 ``` -------------------------------- ### Specify asn1c Executable Path with Ninja Source: https://github.com/oai/openairinterface5g/blob/develop/doc/BUILD.md Configure the build to use a specific asn1c executable, for example, when installed in a custom location like /opt/asn1c. This uses the Ninja build tool. ```bash ./build_oai --ninja --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c ``` -------------------------------- ### Install Docker and Prerequisites Source: https://github.com/oai/openairinterface5g/blob/develop/doc/NR_SA_Tutorial_OAI_CN5G.md Installs necessary packages like git, net-tools, and putty. It also sets up Docker CE, CLI, containerd, buildx plugin, and compose plugin on Ubuntu. Adds the current user to the docker group for non-sudo access. ```bash sudo apt install -y git net-tools putty # https://docs.docker.com/engine/install/ubuntu/ sudo apt update sudo apt install -y ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME:-"$VERSION_CODENAME"}") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Add your username to the docker group, otherwise you will have to run in sudo mode. sudo usermod -a -G docker $(whoami) reboot ``` -------------------------------- ### Build OAI with Web Server (Missing Frontend Dependency) Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/DOC/websrvuse.md This example illustrates a build failure when the frontend dependency for the web server (NPM) is not installed. The CMake error indicates that NPM could not be found. ```bash $ ./build_oai --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope" [...] -- found libulfius for websrv -- found libjansson for websrv CMake Error at common/utils/websrv/CMakeLists.txt:45 (find_program): Could not find NPM using the following names: npm -- Configuring incomplete, errors occurred! See also "/usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build/CMakeFiles/CMakeOutput.log". build have failed ``` -------------------------------- ### Start the gNB Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md Execute the nr-softmodem executable from the build directory. Ensure the M-plane configuration file and CPU list are adapted to your machine. ```bash cd ~/openairinterface5g/cmake_targets/ran_build/build sudo ./nr-softmodem -O --thread-pool ``` -------------------------------- ### Build OAI with Web Server (Missing Backend Dependency) Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/DOC/websrvuse.md This example shows a build failure when the backend dependency for the web server (libulfius) is not installed. It demonstrates the CMake error message indicating the missing library. ```bash $ ./build_oai --gNB --nrUE -w USRP --build-lib "telnetsrv websrv nrscope" [...] CMake Error at common/utils/websrv/CMakeLists.txt:31 (find_library): Could not find ULFIUS using the following names: libulfius.so -- Configuring incomplete, errors occurred! See also "/usr/local/oai/develop_unmodified/openairinterface5g/cmake_targets/ran_build/build/CMakeFiles/CMakeOutput.log". build have failed ``` -------------------------------- ### logInit Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/LOG/DOC/configurelog.md Initializes the logging facility by allocating internal data and setting up configuration. This is the first step before using other logging functions. ```APIDOC ## logInit ### Description Initializes the logging facility, allocating internal data structures and setting up the configuration. This function must be called before any other logging operations. ### Function Signature ```c int logInit(void); ``` ### Returns Returns an integer status code. A return value of 0 typically indicates success, while a non-zero value indicates an error. ``` -------------------------------- ### gNB Process Configuration with ZMQ Source: https://github.com/oai/openairinterface5g/blob/develop/radio/zmq/README.md Configure the gNB process to use the ZMQ radio driver and specify TX/RX channels for communication with the UE. This example shows a typical command-line setup, inverting the channel ports from the UE configuration. ```bash sudo ./nr-softmodem -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --device.name oai_zmqdevif --zmq.[0].tx_channels tcp://127.0.0.1:4556 --zmq.[0].rx_channels tcp://127.0.0.1:4557 ``` -------------------------------- ### Example: Monolithic gNB with L2 Simulator Source: https://github.com/oai/openairinterface5g/blob/develop/ci-scripts/conf_files/README.md This example demonstrates the naming convention for a monolithic gNB configuration when using the L2 simulator, including band and PRB details. ```text gnb.sa.band77.106prb.l2sim.conf ``` -------------------------------- ### Initialize Logging Facility Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/LOG/DOC/configurelog.md Allocates internal data and sets up the logging utility. Configuration is typically done via the configuration module. ```C int logInit (void); ``` -------------------------------- ### Install Frontend JavaScript Dependencies Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/CMakeLists.txt Custom target to run 'npm install' within the frontend directory to install necessary JavaScript dependencies. ```cmake add_custom_target( websrvfront_installjsdep WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/frontend COMMAND npm install DEPENDS frontend/package-lock.json ) ``` -------------------------------- ### Display Help Information Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/T/DOC/T/to_vcd.md Run this command to view all available options and usage instructions for the to_vcd utility. ```shell ./to_vcd -h ``` -------------------------------- ### Install Python Packages from Requirements File Source: https://github.com/oai/openairinterface5g/blob/develop/doc/data_recording.md Installs all required Python packages for the data recording application using a requirements.txt file. This is an alternative to installing packages individually. ```bash python3 -m pip install -r common/utils/data_recording/requirements.txt ``` -------------------------------- ### Install Node.js 18 using NVM Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/websrv/DOC/websrvuse.md Installs Node.js version 18 using the Node Version Manager (NVM). This is recommended for ensuring compatibility with the websrv frontend. It involves downloading and executing the NVM install script, sourcing the bashrc, and then installing and using Node.js 18. ```bash curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash source ~/.bashrc nvm install 18 nvm use 18 ``` -------------------------------- ### Install Babeltrace Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/LOG/DOC/lttng_logs.md Installs the Babeltrace tool, which is used for analyzing LTTng trace logs. ```bash sudo apt-get install babeltrace ``` -------------------------------- ### Run NR UE with UE Capabilities Source: https://github.com/oai/openairinterface5g/blob/develop/doc/runmodem-nrue.md This example demonstrates how to run the NR UE softmodem with a specified UE capabilities file. The `--uecap_file` option is used to provide the path to the XML file containing UE capabilities, which is essential for certain operation modes like SA. ```shell sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3319680000 --ue-nb-ant-tx 2 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml ``` -------------------------------- ### Start nearRT-RIC Source: https://github.com/oai/openairinterface5g/blob/develop/openair2/E2AP/README.md Command to start the nearRT-RIC application. Navigate to the flexric directory before executing. ```bash cd flexric # or openairinterface5g/openair2/E2AP/flexric ./build/examples/ric/nearRT-RIC ``` -------------------------------- ### Configure PKG_CONFIG_PATH for Custom DPDK Installations Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md When DPDK is installed in a custom path, set the `PKG_CONFIG_PATH` environment variable to include the `pkgconfig` directory of your DPDK installation. This allows `pkg-config` to locate the DPDK libraries. ```bash export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/ pkg-config --libs libdpdk --static ``` -------------------------------- ### Start IQ Player in Record Mode Source: https://github.com/oai/openairinterface5g/blob/develop/radio/iqplayer/DOC/iqrecordplayer_usage.md Activates record mode for the IQ Player. Ensure the configuration file path and logging options are correctly set. ```bash ./lte-softmodem -O libconfig:/usr/local/oai/conf/enb.band7.tm1.20PRB.usrpb210.conf:dbgl5 --log_config.global_log_options level,thread --device.recplay.subframes-record 1 ``` -------------------------------- ### Create and Build ran-base Image Source: https://github.com/oai/openairinterface5g/blob/develop/openshift/README.md Create an image stream and build configuration for the 'ran-base' image, then start the build process. The '--from-file' flag uploads the local repository for the build. ```bash oc create -f openshift/ran-base-is.yaml oc create -f openshift/ran-base-bc.yaml oc start-build ran-base --from-file= --follow ``` -------------------------------- ### Install OAI Packages on RHEL/Fedora Source: https://github.com/oai/openairinterface5g/blob/develop/doc/packages.md Installs the generated RPM packages for various OAI components. ```bash rpm -i liboai-common.rpm liboai-usrp.rpm oai-lte.rpm oai-nr.rpm oai-physim.rpm ``` -------------------------------- ### Install Host Dependencies Source: https://github.com/oai/openairinterface5g/blob/develop/doc/cross-compile.md Installs dependencies required to compile OAI on the host system (x86). ```shell cmake_targets/build_oai -I ``` -------------------------------- ### Launch ProtO-RU Emulator Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md Command to launch the ProtO-RU emulator with a specified configuration file. Ensure the path to the configuration file is correct. ```bash sudo ./ru_emulator -c ``` -------------------------------- ### Install linuxptp Package Source: https://github.com/oai/openairinterface5g/blob/develop/doc/Aerial_FAPI_Split_Tutorial.md Installs the linuxptp package on Ubuntu systems, which provides ptp4l and phc2sys. ```bash sudo apt install linuxptp -y ``` -------------------------------- ### Create and Build ran-build Image Source: https://github.com/oai/openairinterface5g/blob/develop/openshift/README.md Create an image stream and build configuration for the 'ran-build' image, then start the build process. This follows the same procedure as building the 'ran-base' image. ```bash oc create -f openshift/ran-build-is.yaml oc create -f openshift/ran-build-bc.yaml oc start-build ran-build --from-file= --follow ``` -------------------------------- ### Install OAI Packages on Ubuntu/Debian Source: https://github.com/oai/openairinterface5g/blob/develop/doc/packages.md Installs the generated Debian (.deb) packages for various OAI components. ```bash dpkg -i liboai-common.deb liboai-usrp.deb oai-lte.deb oai-nr.deb oai-physim.deb ``` -------------------------------- ### Disable Install RPATH for Packaging Source: https://github.com/oai/openairinterface5g/blob/develop/CMakeLists.txt Conditionally disables the installation RPATH if any of the specified packaging options are enabled. ```cmake if(PACKAGING_LTE OR PACKAGING_NR OR PACKAGING_COMMON OR PACKAGING_USRP OR PACKAGING_PHYSIM) set(CMAKE_SKIP_INSTALL_RPATH TRUE) endif() ``` -------------------------------- ### Run the UE NAS Simulator Tester Source: https://github.com/oai/openairinterface5g/blob/develop/tests/nr-ue-nas-simulator/README.md Execute the built tester binary with its configuration file. Ensure you are in the correct directory and the LD_LIBRARY_PATH is set. ```bash openairinterface5g/build$ LD_LIBRARY_PATH=. ./tests/nr-ue-nas-simulator/nr-ue-nas-simulator-test -O ../tests/nr-ue-nas-simulator/test.conf ``` -------------------------------- ### Start OAI eNB Service Source: https://github.com/oai/openairinterface5g/blob/develop/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md Use this command to start the OAI eNB service in detached mode. ```bash $ docker-compose up -d oai_enb0 Creating rfsim4g-oai-enb ... done ``` -------------------------------- ### Check RU Configuration Help Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md Execute this command to view the available subcommands and options for configuring the RU. ```bash sshpass -p microampcfg ssh remctl@ "help" ``` -------------------------------- ### Start LTTng Tracing Source: https://github.com/oai/openairinterface5g/blob/develop/common/utils/LOG/DOC/lttng_logs.md Starts the active LTTng tracing session. Events will be captured from this point onwards. ```bash sudo lttng start ``` -------------------------------- ### Configure and Bind VFs for Benetel 550-A/650 with Intel X710 Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md This script configures network interface settings like MTU and VLAN, creates two VFs, assigns MAC addresses and VLANs to them, and then binds these VFs to the specified driver. It's recommended to save this as a script for repeated use. ```bash set -x IF_NAME=eno12409 MAX_RING_BUFFER_SIZE=4096 MTU=9216 DU_U_PLANE_MAC_ADD=00:11:22:33:44:66 DU_C_PLANE_MAC_ADD=00:11:22:33:44:67 VLAN=3 U_PLANE_PCI_BUS_ADD=31:06.0 C_PLANE_PCI_BUS_ADD=31:06.1 DRIVER=vfio_pci sudo ethtool -G $IF_NAME rx $MAX_RING_BUFFER_SIZE tx $MAX_RING_BUFFER_SIZE sudo ip link set $IF_NAME mtu $MTU sudo modprobe iavf sudo sh -c 'echo 0 > /sys/class/net/$IF_NAME/device/sriov_numvfs' sudo sh -c 'echo 2 > /sys/class/net/$IF_NAME/device/sriov_numvfs' sudo ip link set $IF_NAME vf 0 mac $DU_U_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set U plane PCI address sudo ip link set $IF_NAME vf 1 mac $DU_C_PLANE_MAC_ADD vlan $VLAN mtu $MTU spoofchk off # set C plane PCI address sleep 1 sudo /usr/local/bin/dpdk-devbind.py --unbind $U_PLANE_PCI_BUS_ADD sudo /usr/local/bin/dpdk-devbind.py --unbind $C_PLANE_PCI_BUS_ADD sudo modprobe $DRIVER sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $U_PLANE_PCI_BUS_ADD sudo /usr/local/bin/dpdk-devbind.py --bind $DRIVER $C_PLANE_PCI_BUS_ADD ``` -------------------------------- ### Install Mandatory Packages on Fedora for M-Plane Source: https://github.com/oai/openairinterface5g/blob/develop/doc/ORAN_FHI7.2_Tutorial.md Command to install necessary development packages on Fedora for M-plane functionality. ```bash sudo dnf install pcre-devel libssh-devel libxml2-devel libyang2-devel libnetconf2-devel ``` -------------------------------- ### Start CUCP Executable Source: https://github.com/oai/openairinterface5g/blob/develop/doc/E1AP/E1-design.md Command to start the CUCP executable. Use the specified configuration file and set 'min_rxtxtime' to 6 when connecting an OAI UE. ```bash sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb-cucp.sa.f1.conf --gNBs.[0].min_rxtxtime 6 ```