Lab 3: TDD Reconfiguration rApp
In this lab, you will deploy a 5G Standalone (SA) network using the OpenAirInterface (OAI) RF Simulator for the gNB and the OAI minimal 5G Core (5GC).
In the second phase of the experiment, you will use the BubbleRAN rApp SDK and its oam_services to dynamically reconfigure the TDD pattern of the RAN cell. The configuration is applied through the Non-RT RIC and SMO, and the gNB is automatically restarted to apply the changes. This simulates OAM-based control of the access network using an rApp.
apiVersion: athena.trirematics.io/v1
kind: Network
metadata:
name: oran
namespace: trirematics
spec:
slices:
- plmn: "00101"
dnn: internet
network-mode: IPv4
service-type: 1
differentiator: 0x000001
ipv4-range: "12.1.1.0/24"
ipv6-range: "2001:1:2::/64"
access:
- name: oai-gnb
stack: 5g-sa
model: oai-ran/monolithic-gnb
radio:
device: rf-sim
identity:
an-id: 10
tracking-area: 1
cells:
- band: n78
arfcn: 641280
bandwidth: 40MHz
subcarrier-spacing: 30kHz
tdd-config:
period: 5ms
dl-slots: 7
dl-symbols: 6
ul-slots: 2
ul-symbols: 4
core-networks:
- oai-5gc.oran
controller: ric.oran
core:
- name: oai-5gc
stack: 5g-sa
model: oai-cn/minimal
identity:
region: 0
cn-group: 4
cn-id: 5
edge:
- name: ric
stack: 5g-sa
model: mosaic5g/flexric
- name: sdl
stack: 5g-sa
model: mosaic5g/xapps-sdl
dns:
ipv4:
default: 8.8.8.8
secondary: 8.8.4.4
---
apiVersion: athena.trirematics.io/v1
kind: Terminal
metadata:
name: ue1
namespace: trirematics
spec:
vendor: oai
stack: 5g-sa
model: terminal/nr-rfsim
preferred-access: oai-gnb.oran
target-cores:
- oai-5gc.oran
identity:
imsi: "001010000000001"
pin: "1234"
opc: "0xc42449363bbad02b66d16bc975d77cc1"
key: "0xfec86ba6eb707ed08905757b1bb44b8f"
sqn: "0xff9bb4000001"
slice:
dnn: internet
network-mode: IPv4
service-type: 1
differentiator: 0x000001
radio:
bands:
- n78
readiness-check:
method: ping
target: google-ip
interface-name: oaitun_ue0
Network Deployment
Deploy the file using the command brc install network open-ran.yaml
.
The network includes a single access network node with one cell. Initially, the TDD configuration is:
period: "5ms"
dl_slots: 7
dl_symbols: 6
ul_slots: 2
ul_symbols: 4
Check for the status of the deployment using the command brc observe
and make sure all the Elements are in
the 1/1 Y
state.
Please run the following command to check the UE connectivity before updating the TDD configuration:
brc test rtt ue1 gateway -- -c 3
TDD Pattern Change via rApp
from br_rapp_sdk import OAMServices
from br_rapp_sdk.oam_services.network_types import *
if __name__ == "__main__":
# Initialize the OAMServices client
oam_services = OAMServices()
# Get the list of networks
net_id = NetworkId("oran")
result = oam_services.network.get_network(network_id=net_id)
if result.status == "success":
net_spec = result.data.get("item", [])
else:
print("Failed to retrieve networks: ", result.error)
exit(1)
# Print the current TDD configuration
print("TDD Config before change:", net_spec.access[0].cells[0].tdd_config)
# Change the TDD configuration
new_tdd_config = TDDConfig(
period="5ms",
dl_slots=6,
dl_symbols=6,
ul_slots=3,
ul_symbols=4
)
net_spec.access[0].cells[0].tdd_config = new_tdd_config
# Apply the updated network specification
result = oam_services.network.apply_network(
network_name=net_id,
network_spec=net_spec
)
if result.status == 'success':
network_id = result.data.get('network_id')
print(f"Access applied successfully: {network_id}")
else:
print(f"Error applying access: {result.error}")
# Retrieve the updated network to verify the change
result = oam_services.network.get_network(network_id=net_id)
if result.status == "success":
updated_net_spec = result.data.get('item')
print("TDD Config after change:", updated_net_spec.access[0].cells[0].tdd_config)
else:
print("Failed to retrieve updated network: ", result.error)
You will change this configuration to via tdd-rapp.py
:
period: "5ms"
dl_slots: 6
dl_symbols: 6
ul_slots: 3
ul_symbols: 4
Use the following commands to run the rApp within the cluster:
python3 ./tdd-rapp.py
Make sure the BubbleRAN rApp SDK is installed in your environment. You can install it using the command pip3 install br-rapp-sdk
.
Run the rApp inside the cluster, and make sure your kubeconfig file is located at ~/.kube/config.
After running the rApp, the RAN will be restarted to apply the new TDD configuration. You can check the status of the deployment using the command brc observe
, and make sure all the Elements are in
the 1/1 Y
state.
Please run the following command to check the UE connectivity after updating the TDD configuration:
brc test rtt ue1 gateway -- -c 3
💬 Questions
- Does this rApp need an xApp to function?
- What is the role of the TDD pattern in the context of 5G networks? Hint: https://bubbleran.com/docs/user-guide/studio/lessons/tdd
- How the TDD pattern change can impact the network performance and user experience?
- Use OAM services to change the bandwidth and frequency of the gNB.