OCUDU Prototyping with O-RAN Compliant nearRT-RIC and xApps

Platform: OCUDU software stack, nearRT-RIC (ORAN SC and FlexRIC), and Universal Software Radio Peripherals (USRPs).

Resources used: USRP NI N320 (Base Station), N320 host computer, Quectel RM5xxQ-GL or RG530F (UE), Quectel host computer, power amplifiers, CommScope SS-65M-R2 Sector BS Antenna, and Quectel YEMN017AA Antenna.

Description: This experiment demonstrates an over-the-air 5G NR Radio Access Network (RAN) built with the OCUDU 5G software stack and, optionally, monitored through an O-RAN compliant near-RT-RIC and xApps. You can choose:

  • RIC: FlexRIC, ORAN SC RIC, or no RIC.

  • RAN mode: Monolithic gNB (CU + DU in one process), or OCU-ODU split (O-CU and O-DU connected over F1).

With a RIC, the RAN nodes expose an E2 agent, and a monitoring xApp collects per-UE downlink/uplink throughput KPMs (E2SM-KPM). The core network is in the ARA data center, reachable via the fiber backhaul.

Note

This experiment uses a COTS Quectel UE. For the OpenAirInterface software nrUE instead, see OCUDU with OpenAirInterface nrUE (Indoor/Sandbox and Outdoor).

OCUDU experiment architecture

Experiment Architecture: The OCUDU 5G RAN (monolithic gNB or OCU-ODU split) connects over the air to a COTS Quectel UE. The gNB/CU and DU expose E2 agents to the near-RT-RIC, which relays KPM measurements to the monitoring xApp. The Open5GS core network is hosted in the ARA data center.

Note

The core network runs an iperf3 server. You cannot access the core directly, but you can run iperf3 and ping against it from the UE.

Detailed Steps for the Experiment

  1. Login to ARA portal with your credentials.

  2. Create two reservations using the Project -> Reservations -> Leases tab. Reserve a matching Base Station and User Equipment pair from the table below.

    Resource No.

    Site

    Resource Type

    Device Type

    Device ID

    1

    Gilbert

    AraRAN

    Base Station

    000

    2

    Horticulture

    AraRAN

    User Equipment

    000 or 001

    3

    Curtiss Farm

    AraRAN

    Base Station

    000

    4

    Curtiss Farm

    AraRAN

    User Equipment

    000

    5

    Feedmill

    AraRAN

    User Equipment

    000 or 001

    6

    Agronomy Farm

    AraRAN

    Base Station

    000

    7

    Agronomy Farm

    AraRAN

    User Equipment (Quectel RM5xxQ-GL)

    001

    8

    Agronomy Farm

    AraRAN

    User Equipment (Quectel RG530F)

    010

    Important

    Only the Quectel RG530F (Agronomy Farm UE 010) needs --profile rg530 in Steps 7 and 9, because its SIM card requires it (see the RG530F note). Agronomy Farm UE 001 uses the RM5xxQ-GL, so run it like any other UE, without the profile.

  3. Create the containers as shown below. The Base Station image contains the OCUDU stack, FlexRIC, the xApps, and run_ran.py.

    Component/Reservation

    Container Image

    CPU

    Memory

    Network

    Base Station

    arawirelesshub/ocudu:complete_outdoor_v2

    8

    8192

    ARA_Shared_Net

    User Equipment

    arawirelesshub/ocudu:cots_ue_v2.1

    8

    8192

    ARA_Shared_Net

  4. Access the containers through the console tab in Project -> Containers, or over SSH via the jumpbox (see ARA Jumpbox).

  5. Select the SDR. In the Base Station container, list the SDRs. If none is found, see FAQ.

    # uhd_find_devices
    
    ../../_images/ocudu_uhd_find_devices.png

    Choose the SDR for your UE:

    User Equipment

    SDR IP Address

    CurtissFarm-UE-000, Portable-UE-000, AgronomyFarm-UE-[001, 010], Gilbert-UE-003

    192.168.20.2

    Horticulture-UE-[000, 001]

    192.168.30.2

    FeedMill-UE-[000, 001]

    192.168.40.2

    You will check it in the band scan in Step 7 and pass it with --sdr in Step 9 (--sdr is not needed with --profile rg530).

  6. Connect to the core network. The RAN reaches the core over eth4.

    6a. Get the eth4 IP address:

    # ifconfig eth4
    

    6b. Add the route to the core, using your eth4 IP (10.189.3.112 is only an example):

    # ~/add_route.sh 10.189.3.112
    

    6c. Ping the AMF. Stop with CTRL+C after a few replies.

    # ping -I eth4 10.189.8.8
    

    For Agronomy Farm UE 010 (RG530F), ping 10.189.8.7 instead. If the ping fails, re-check Step 6b.

  1. Check the band. Before starting the gNB, scan the band with band_scan to see which part of n78 is free and which dl_arfcn and rx_gain suit your site. The scan only receives; nothing is transmitted. It needs the SDR for itself, so run it before starting the gNB/DU, or stop them first.

    Pass the SDR you chose in Step 5 with --sdr. For example, for a Horticulture UE:

    # cd ~/band_scan
    # python3 band_scan.py --sdr 192.168.20.2
    

    Without --sdr, the scan uses the SDR set in the gNB configuration. Either way, the SDR address is shown on the first line of the output.

    The scan takes less than a minute. It surveys the band, tests the best channels and the launcher’s default channel at several receive gains, and checks that the gNB accepts each channel. It ends with a summary like the one below, taken on the Agronomy Farm BS with SDR 192.168.20.2:

    ../../_images/ocudu_band_scan.png

    • Recommended: the dl_arfcn and rx_gain to use.

    • Current: the default dl_arfcn and rx_gain used by run_ran.py, and whether that rx_gain is OK.

    • Occupied: frequency ranges where other transmitters are active.

    • Busy: share of time something else transmits inside the channel. Prefer channels near 0%.

    • rx_gain: the highest rx_gain at which the channel stays clean.

    Use the recommendation in Step 9: pass the rx_gain with --rx-gain, and the dl_arfcn to the gNB after --. For the scan above:

    # run_ran.py gnb --ric oransc --sdr 192.168.20.2 --rx-gain 20 -- cell_cfg --dl_arfcn 628062
    

    For the OCU-ODU split, add both to the DU command.

    Note

    A different dl_arfcn also changes the cell’s DL_SSB_ARFCN, so update CELL_LOCK in Step 10 with the value the gNB/DU prints at startup.

    The results are saved as summary.json in the folder printed at the end. To search a different range or a 20 MHz cell, add --fmin/--fmax or --bw 20 (use the same --bw in Step 9). For all options, run python3 band_scan.py --help.

    Note

    The scan is a snapshot: other transmitters’ load changes over the day. Re-run it if the UE struggles to attach or the uplink is poor.

  1. Start the near-RT-RIC. Choose one tab. Use a separate terminal for each component from here on.

    # cd ~
    # ./flexric/build/examples/ric/nearRT-RIC
    
    ../../_images/ocudu_ric_started.png

    In Step 9, use --ric flexric.

  1. Start the RAN. Start the gNB, O-CU, or O-DU with the run_ran.py launcher. Your settings go on the command line, so no YAML editing is needed. Before starting, the launcher prints a summary of your settings and checks them; if the check fails, nothing is started.

    Note

    To see all run_ran.py options and examples, run:

    # run_ran.py --help
    

    Choose one tab. The examples use the ORAN SC RIC and a Horticulture UE (SDR 192.168.30.2); change --ric and --sdr to match your setup.

    # run_ran.py gnb --ric oransc --sdr 192.168.20.2
    

    The gNB is ready at ==== gNB started ====.

    ../../_images/ocudu_gnb_monolithic_started.png

    With a RIC, check the E2 connection: in the FlexRIC terminal (E2 SETUP-REQUEST accepted), or in the gNB log for the ORAN SC RIC.

    ../../_images/ocudu_RIC_accepts_E2_setup_request.png

    ../../_images/ocudu_gnb_cu_du_connects_to_oran_osc_ric.png

    Optionally, add --bw 20 for a 20 MHz cell at 30.72 MS/s (the default is 40 MHz at 61.44 MS/s), and --tx-gain / --rx-gain to set the SDR gains (0–60 dB). For example:

    # run_ran.py gnb --ric none --sdr 192.168.20.2 --bw 20 --tx-gain 45 --rx-gain 25
    

    Important

    Quectel RG530F only (Agronomy Farm UE 010). The RG530F SIM cards (IMSI 24080…) are on a separate core, also used by the Ericsson network at this site. Add --profile rg530 to every run_ran.py command (no --sdr needed). It sets AMF 10.189.8.7, PLMN 24080, TAC 4694, PCI 3 instead of the default 1 (distinct from the Ericsson cell), and SDR 192.168.20.2.

    # run_ran.py gnb --ric oransc --profile rg530 --tx-gain 45 --rx-gain 33
    

    For the OCU-ODU split, run run_ran.py cu and then run_ran.py du with the same --profile rg530. The profile can be combined with other options, such as --bw 20.

    Do not use the profile with an RM5xxQ-GL UE, including Agronomy Farm UE 001. For UE 001, pass --sdr 192.168.20.2 as in the examples above.

  2. Start the UE. The UE start script locks the Quectel modem to one cell, given as CELL_LOCK=PCI,DL_SSB_ARFCN,SCS_kHz,BAND. The default lock is 1,628320,30,78, which only matches a gNB/DU started in Step 9 with the default PCI (1), channel, and 40 MHz bandwidth.

    Important

    Set CELL_LOCK first if you changed the channel or bandwidth, or used --profile rg530, in Step 9. Otherwise the UE will not register. Read the PCI and DL_SSB_ARFCN that the gNB/DU prints at startup, then pass them on the ue_start.sh command line:

    • You used the dl_arfcn recommended in Step 7: CELL_LOCK=1,<DL_SSB_ARFCN>,30,78 ./ue_start.sh

    • You used --bw 20: CELL_LOCK=1,628992,30,78 ./ue_start.sh

    • You used --profile rg530 : CELL_LOCK=3,628320,30,78 ./ue_start.sh, or PCI 3 with the DL_SSB_ARFCN of your channel and bandwidth from the cases above.

    On the UE container, run the script, adding CELL_LOCK from the box above if needed:

    # ./ue_start.sh                             # default channel, 40 MHz
    # CELL_LOCK=1,628992,30,78 ./ue_start.sh    # example: gNB/DU started with --bw 20
    

    The script runs four steps, retrying each automatically, so no manual AT commands are needed:

    1. Locks the Quectel modem to your gNB’s cell, reboots it, and confirms the lock.

    2. Waits until the UE registers on the locked cell.

    3. Starts the PDU session with quectel-CM.

    4. Detects the enx* data interface and its IPv4 address.

    The example output below was taken with a gNB/DU started with --bw 20 and PCI 3 (CELL_LOCK=3,628992,30,78).

    While the UE registers, the gNB/DU console shows the UE attaching.

    ../../_images/ocudu_ue_registers_with_network.png

    On success, the script confirms the data session is on the locked cell, pings the core over 5G, and prints [DONE] ue ready for user-plane testing. It then prints ready-to-use commands with your UE IP filled in: a ping, and separate downlink (-R) and uplink iperf3 commands. If iperf3 hangs because quectel-CM reconnected and dropped the 5G route, run the two ip route/ip rule commands it prints, then retry. Logs are saved under /root/runs/ue_<hostname>_<time>/.

    ../../_images/ocudu_pdu_session_established.png

    Note

    If the script fails, fix the cause and re-run it:

    • UE did not register to locked cell ... — the gNB/DU is not running, or its PCI/DL_SSB_ARFCN/band does not match CELL_LOCK.

    • No enx* interface with IPv4 ... — the PDU session did not come up. Re-run ./ue_start.sh.

Monitoring Throughput with the xApp

Note

With --ric none, run Step 11, then go to Step 14.

  1. Generate traffic. On the UE container, run the downlink iperf3 command printed by ue_start.sh (-R = downlink; drop -R for uplink). Keep a long duration so the xApp can collect KPMs while traffic flows. For example:

    # iperf3 -c 10.189.8.8 -p 5209 -B 10.45.0.10 -R -t 10 -i 1 --connect-timeout 10000
    

    Replace 10.45.0.10 with your UE IP from Step 10.

    ../../_images/iperf3_ocudu.png

  2. Start the KPM xApp in a new Base Station terminal, using the command for your RIC.

    With FlexRIC:

    # cd ~/flexric/build/examples/xApp/c/monitor
    # ./xapp_oran_moni -c ./xapp_moni_e2sm_kpm.conf
    
    ../../_images/ocudu_xApp_starts_and_connects_to_ric.png

    With the ORAN SC RIC:

    # cd ~/oran-sc-ric
    # docker compose exec python_xapp_runner ./kpm_mon_xapp.py --metrics=DRB.UEThpDl,DRB.UEThpUl --kpm_report_style=1
    
    ../../_images/ocudu_kpm_moni_xapp_connects_to_oranoscric.png

    The xApp finds one E2 node (monolithic) or two (split).

  3. Observe the KPMs. The xApp prints per-UE downlink/uplink throughput (DRB.UEThpDl / DRB.UEThpUl). The output with FlexRIC:

    ../../_images/ocudu_xApps_collects_ULandDL_throughput_from_E2nodes.png

    The output with the ORAN SC RIC:

    ../../_images/ocudu_osc_ric_collects_kpm.png

  4. View the RAN metrics. In the gNB (or DU) terminal, press t then ENTER to show live per-UE metrics (PCI, CQI, MCS, bit-rate, SNR). Works with or without a RIC.

    ../../_images/ocudu_gNB_or_DU_logs_with_userdata.png

Troubleshooting

  • band_scan says the radio is in use: stop the gNB/DU, then run the scan again.

  • band_scan finds no USRP: check the address in --sdr against uhd_find_devices (Step 5), or the SDR address in the gNB configuration if you ran the scan without --sdr.

  • Launcher shows config check : FAILED: fix the option named in the error and run again.

  • No route to the AMF warning: re-run Step 6b with your eth4 IP.

  • DU cannot connect to the CU: start the CU first; restart the DU.

  • xApp sees no E2 node: make sure the RIC is running, the RAN was not started with --ric none, and --ric matches your RIC.

  • UE does not register: make sure the gNB (or DU) is running and CELL_LOCK matches its PCI, DL_SSB_ARFCN, and band, then re-run ./ue_start.sh. AT-command replies are logged in servingcell.txt in the run’s log folder.

  • Agronomy Farm UE 010 (RG530F) does not attach: check the launcher summary shows PCI 3, PLMN 24080, TAC 4694 and AMF 10.189.8.7; re-run ./ue_start.sh.

  • No PDU session: re-run ./ue_start.sh and check quectelCM.log in the run’s log folder.

  • iperf3 hangs: quectel-CM may have reconnected and dropped the 5G route. Re-run the ip route / ip rule commands printed at the end of ue_start.sh, then retry iperf3.

Tip

For weather measurements alongside the experiment, see ARA Weather APIs.