This repository includes custom xApp, Docker image and scripts for generating traffic.
To use it, three repositories are needed:
- srsRAN_Project, commit: d90cd4e26dba7ad652d16006045eca25ea272315
- srsRAN_4G, commit: ec29b0c1ff79cebcbe66caa6d6b90778261c42b8
- oran-sc-ric, commit: 1356ee99cec9489acf8906768a7a8c927b07597d
To install, go through the provided tutorials:
This repository contains patches for two repositories: srsRAN_Project and oran-sc-ric.
They are available in the patches directory.
Changes for srsRAN_Project include support for reading mcs and number of not ok packets as KPMs.
Please apply the patch before building.
Change for oran-sc-ric is an xApp docker image switch. Please make sure to first build the original one, as the one from gymnasium-xApp is based on it.
Before running, please ensure that the config files are copied from the gymnasium-xApp repo, and the patches are applied.
To connect 3 UEs, these steps must be performed in order:
- start 5G core in srsRAN_Project/docker: $ docker compose up 5gc
- start nearRT ric in oran-sc-ric: $ docker compose up
- start gNB in srsRAN_Project/build/apps/gnb: $ sudo ./gnb -c gnb_zmq.yaml e2 --addr="10.0.2.10" --bind_addr="10.0.2.1"
- start all 3 UEs in srsRAN_4G/srsRAN_4G/build/srsue/src: $ sudo ip netns add ue1; sudo ./srsue 5ue1.conf
- start GNU-Radio Companion: $ sudo gnuradio-companion multi_ue_scenario.grc
Then, to generate traffic, please use: scripts/add_routes_downlink.sh, and then scripts/traffic.py
Once the docker image is changed, you can log onto it and run the xApp
$ docker exec -ti python_xapp_runner bash
root@python_xapp_runner:/opt/xApps# ./my_xapp.py
1744982543159 21/RMR [INFO] ric message routing library on SI95 p=4560 mv=3 flg=00 id=a (f447e29 4.9.4 built: Dec 13 2023)
Subscribe to E2 node ID: gnbd_001_001_00019b_0, RAN func: e2sm_kpm, Report Style: 4, metrics: ['DRB.UEThpDl', 'RRU.PrbUsedDl', 'NokDl', 'McsDl']
Successfully subscribed with Subscription ID: 2vu6K85SD7zQRRqpZZQR2DLKAkXLogs are stored in the format that Tensorboard supports. To use:
$ ./setup_venv.sh
$ source tb/bin/activate
$ tensorboard --logdir ../../gym_xapp/runs/And then it should be ready on localhost:6006 in your browser.