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).
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
Login to ARA portal with your credentials.
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 rg530in 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.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_v28
8192
ARA_Shared_Net
User Equipment
arawirelesshub/ocudu:cots_ue_v2.18
8192
ARA_Shared_Net
Access the containers through the console tab in Project -> Containers, or over SSH via the jumpbox (see ARA Jumpbox).
Select the SDR. In the Base Station container, list the SDRs. If none is found, see FAQ.
# uhd_find_devices
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
--sdrin Step 9 (--sdris not needed with--profile rg530).Connect to the core network. The RAN reaches the core over
eth4.6a. Get the
eth4IP address:# ifconfig eth4
6b. Add the route to the core, using your
eth4IP (10.189.3.112is only an example):# ~/add_route.sh 10.189.3.112
6c. Ping the AMF. Stop with
CTRL+Cafter a few replies.# ping -I eth4 10.189.8.8
For Agronomy Farm UE 010 (RG530F), ping
10.189.8.7instead. If the ping fails, re-check Step 6b.
Check the band. Before starting the gNB, scan the band with
band_scanto see which part of n78 is free and whichdl_arfcnandrx_gainsuit 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:
Recommended: the
dl_arfcnandrx_gainto use.Current: the default
dl_arfcnandrx_gainused byrun_ran.py, and whether thatrx_gainis 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_gainat which the channel stays clean.
Use the recommendation in Step 9: pass the
rx_gainwith--rx-gain, and thedl_arfcnto 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_arfcnalso changes the cell’s DL_SSB_ARFCN, so updateCELL_LOCKin Step 10 with the value the gNB/DU prints at startup.The results are saved as
summary.jsonin the folder printed at the end. To search a different range or a 20 MHz cell, add--fmin/--fmaxor--bw 20(use the same--bwin Step 9). For all options, runpython3 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.
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
In Step 9, use
--ric flexric.Load the Docker images, then start the RIC:
# cd ~/docker_images # for f in *.tar; do docker load -i "$f"; done # cd ~/oran-sc-ric # docker compose up
In Step 9, use
--ric oransc.Skip this step. In Step 9, use
--ric none. Steps 12 and 13 (xApp) are also skipped.
Start the RAN. Start the gNB, O-CU, or O-DU with the
run_ran.pylauncher. 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.pyoptions 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--ricand--sdrto match your setup.# run_ran.py gnb --ric oransc --sdr 192.168.20.2
The gNB is ready at
==== gNB started ====.
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.
Start the O-CU first, then the O-DU, each in its own terminal, with the same
--ric(and--profile).# run_ran.py cu --ric oransc # run_ran.py du --ric oransc --sdr 192.168.20.2
They are ready at
==== CU started ====and==== DU started ====.
With a RIC, the CU and DU register as two separate E2 nodes.
Note
Radio options (
--sdr,--bw, gains, PCI) go on the DU; core options on the CU.Optionally, add
--bw 20for a 20 MHz cell at 30.72 MS/s (the default is 40 MHz at 61.44 MS/s), and--tx-gain/--rx-gainto 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 rg530to everyrun_ran.pycommand (no--sdrneeded). It sets AMF10.189.8.7, PLMN24080, TAC4694, PCI3instead of the default1(distinct from the Ericsson cell), and SDR192.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 cuand thenrun_ran.py duwith 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.2as in the examples above.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 is1,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 theue_start.shcommand line:You used the
dl_arfcnrecommended in Step 7:CELL_LOCK=1,<DL_SSB_ARFCN>,30,78 ./ue_start.shYou used
--bw 20:CELL_LOCK=1,628992,30,78 ./ue_start.shYou used
--profile rg530:CELL_LOCK=3,628320,30,78 ./ue_start.sh, or PCI3with the DL_SSB_ARFCN of your channel and bandwidth from the cases above.
On the UE container, run the script, adding
CELL_LOCKfrom 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:
Locks the Quectel modem to your gNB’s cell, reboots it, and confirms the lock.
Waits until the UE registers on the locked cell.
Starts the PDU session with
quectel-CM.Detects the
enx*data interface and its IPv4 address.
The example output below was taken with a gNB/DU started with
--bw 20and PCI 3 (CELL_LOCK=3,628992,30,78).While the UE registers, the gNB/DU console shows the UE attaching.
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: aping, and separate downlink (-R) and uplinkiperf3commands. Ifiperf3hangs becausequectel-CMreconnected and dropped the 5G route, run the twoip route/ip rulecommands it prints, then retry. Logs are saved under/root/runs/ue_<hostname>_<time>/.
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 matchCELL_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.
Generate traffic. On the UE container, run the downlink
iperf3command printed byue_start.sh(-R= downlink; drop-Rfor 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.10with your UE IP from Step 10.
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
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
The xApp finds one E2 node (monolithic) or two (split).
Observe the KPMs. The xApp prints per-UE downlink/uplink throughput (
DRB.UEThpDl/DRB.UEThpUl). The output with FlexRIC:
The output with the ORAN SC RIC:
View the RAN metrics. In the gNB (or DU) terminal, press
tthenENTERto show live per-UE metrics (PCI, CQI, MCS, bit-rate, SNR). Works with or without a RIC.
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
--sdragainstuhd_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
eth4IP.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--ricmatches your RIC.UE does not register: make sure the gNB (or DU) is running and
CELL_LOCKmatches its PCI, DL_SSB_ARFCN, and band, then re-run./ue_start.sh. AT-command replies are logged inservingcell.txtin the run’s log folder.Agronomy Farm UE 010 (RG530F) does not attach: check the launcher summary shows
PCI 3, PLMN 24080, TAC 4694andAMF 10.189.8.7; re-run./ue_start.sh.No PDU session: re-run
./ue_start.shand checkquectelCM.login the run’s log folder.iperf3 hangs:
quectel-CMmay have reconnected and dropped the 5G route. Re-run theip route/ip rulecommands printed at the end ofue_start.sh, then retryiperf3.
Tip
For weather measurements alongside the experiment, see ARA Weather APIs.