Test scenario3 (BubbleRan FlexRIC + BubbleRan xApp + Ntust O-DU) - HackMD (2024)

![](https://i.imgur.com/JORnn3y.png =150x)@NTUST, Taiwan[Contact us](crg@gapps.ntust.edu.tw)## <center>Test scenario3 (BubbleRan FlexRIC + BubbleRan xApp + Ntust O-DU)</center>[TOC]### 1. [Topology](https://drive.google.com/file/d/1t74Z9CiHv9bzbRDnUO7iEuplchg0J8Su/view?usp=sharing)![image](https://hackmd.io/_uploads/Hk4nzYSr6.png)#### 1.1 Used branch- OSC O-DU [G]: https://github.com/NTUST-BMW-Lab/odu-e2sm.git (multi-UE branch)- BubbleRan FlexRIC: https://gitlab.eurecom.fr/br/flexric.git (odu branch)- BubbleRan xApp: https://gitlab.eurecom.fr/br/flexric/-/blob/odu/examples/xApp/c/monitor/xapp_oran_moni.c?ref_type=heads### 2. The steps to integrate (FLEXRIC->CU_STUB->O-DU->xApp)#### 2.1 Install [O-DU and CU_STUB](https://hackmd.io/@Joechanghong/Install-ODU-CUSTUB)#### 2.2 Build and Install FlexRIC (For Ubuntu 20.04)##### 2.2.1 Install CMake It’s necessary to have cmake of version 3.15 or higher. Install the specfic version by manual:```bash=sudo apt-get updatesudo apt-get install ca-certificates gpg wgetwget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/nullecho 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/nullsudo apt-get updatesudo rm /usr/share/keyrings/kitware-archive-keyring.gpgsudo apt-get install kitware-archive-keyringecho 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal-rc main' | sudo tee -a /etc/apt/sources.list.d/kitware.list >/dev/nullsudo apt-get updatesudo apt-get install cmake```##### 2.2.2 Install required dependencies for SWIG```bash=sudo apt install autotools-dev automake libpcre2-dev yacc build-essential```##### 2.2.3 Install SWIGIt's a dependencies for cmake.```bash=git clone https://github.com/swig/swig.gitcd swiggit checkout v4.1.1./autogen.sh./configure --prefix=/usr/makemake install```##### 2.2.4 Install required dependencies```bash=## at least python3.8sudo apt install libsctp-dev python3 cmake-curses-gui python3-dev pkg-config libconfig-dev libconfig++-devsudo apt install libmysqlclient-dev mysql-server ## Install MySQL as a storage for xAppssudo apt install libwebsockets-dev libjson-c-dev ## Install websocket for proxy agentsudo snap install go --channel=1.19/stable ## Install Go for xAppsudo add-apt-repository -y ppa:deadsnakes/ppa ## Install Python ML xAppsudo apt install libsnappy-dev python3.11 python3.11-dev ## Install Python ML xApp```##### 2.2.5 Install FlexRIC```bash=git clone https://gitlab.eurecom.fr/br/flexric.git ```##### 2.2.6 Change the branch to odu ```bash=cd flexric/sudo git checkout master ##change branch to mastersudo git fetch origin ##Fetching update from remote reposudo git pull origin ##Pulling the newest code from your github/gitlabsudo git checkout odu ## change Branch to odu```##### 2.2.7 Modify FlexRIC Configuration```bash=sudo vim flexric/conf_files/xapp_oran_sm.conf## Modify the IP of RIC and XApp, and also change the format to 1 which our odu support. (For xApp)sudo vim flexric/conf_files/ric.conf## Modify RIC IP (For RIC)```![image](https://hackmd.io/_uploads/SkLNUyfE6.png)![image](https://hackmd.io/_uploads/SkBDUkMVa.png)##### 2.2.8 Build and cmake```bash=cdcd flexric/&& sudo mkdir build&& cd buildsudo cmake ..sudo make -jsudo make install```#### 2.3 Run FlexRIC```bash=cd flexric/build/sudo ./examples/ric/nearRT-RIC -c ../conf_files/ric.conf ## Run the ric and use ric.conf file``````bash=#### Run kpm-rc xAppsudo ./examples/xApp/c/kpm_rc/xapp_kpm_rc -c ../conf_files/xapp_oran_sm.conf## Run the xApp and use xapp_oran_sm.conf file```:::warning**1. The execute sequence: RIC->CU_STUB->O-DU->xApp****2. If you can't connect to FlexRIC and O-DU, you should check your port be opened.**:::### 3. Test result1 (Failed)#### 3.1 FlexRIC and O-DU test result1- The FlexRIC can't receive RIC Indication message from O-DU, because the flexric does not support action definition format3.![image](https://hackmd.io/_uploads/B1ZYsFuET.png)#### 3.2 FlexRIC and O-DU procedure (It should be fixed)![image](https://hackmd.io/_uploads/BJ96qKdVp.png)### 4. [Problems](https://hackmd.io/nRfkCqOZQL2nD2aBaLSb4w?view)### 5. Modified code :::success***Due to the failure of the test result in Step 3, Flexric did not receive the RIC indication message transmitted by ODU. This is attributed to differences in the supported action definition formats. Consequently, it is imperative to modify the program to ensure compatibility and mutual support between the formats.***:::#### Add action definition format3- `flexric/examples/xApp/c/kpm_rc/xapp_kpm_rc.c````c=143/*modified by joe*/statickpm_act_def_format_3_t gen_act_def_frmt_3(const char action[][25]){ int count = 0; kpm_act_def_format_3_t dst = {0}; dst.gran_period_ms = 100; // [1, 65535] dst.meas_info_lst_len = 2; dst.meas_info_lst = calloc(dst.meas_info_lst_len, sizeof(meas_info_format_3_lst_t)); assert(dst.meas_info_lst != NULL && "Memory exhausted"); for(unsigned i=0;i<dst.meas_info_lst_len;i++){ dst.meas_info_lst[count++] = gen_meas_info_format_3_lst(action[i]); } return dst;}/*modified by joe*/```- `flexric/examples/xApp/c/kpm_rc/xapp_kpm_rc.c````c=196/*modified by joe, change to format3*/statickpm_act_def_t gen_act_def(const char act[][25]){ kpm_act_def_t dst = {0}; dst.type = FORMAT_3_ACTION_DEFINITION; dst.frm_3 = gen_act_def_frmt_3(act); return dst;![Uploading file..._uh186qi3d]()}/*modified by joe, change to format3*/```- `flexric/examples/xApp/c/kpm_rc/xapp_kpm_rc.c````c=1110/*modified by joe*/ const char act[][25] = {"DRB.UEThpDl.SNSSAI", "RRU.PrbUsedDl.SNSSAI"}; /*modified by joe*/```- `flexric/examples/xApp/c/kpm_rc/xapp_kpm_rc.c````c=56/*modified by joe*//*void sm_cb_kpm(sm_ag_if_rd_t const* rd, global_e2_node_id_t const* e2_node){ assert(rd != NULL); assert(rd->type == INDICATION_MSG_AGENT_IF_ANS_V0); assert(rd->ind.type == KPM_STATS_V3_0); kpm_ind_data_t const* kpm = &rd->ind.kpm.ind; int64_t now = time_now_us(); printf("KPM ind_msg latency = %ld μs from E2-node type %d ID %d\n", now - kpm->hdr.kpm_ric_ind_hdr_format_1.collectStartTime, e2_node->type, e2_node->nb_id.nb_id); printf("Sojourn time %lf \n",kpm->msg.frm_3.meas_report_per_ue[0].ind_msg_format_1.meas_data_lst[0].meas_record_lst[0].real_val); { lock_guard(&mtx); free_ue_id_e2sm(&ue_id); ue_id = cp_ue_id_e2sm(&kpm->msg.frm_3.meas_report_per_ue[0].ue_meas_report_lst); } printf("UE ID %ld \n ", ue_id.gnb.amf_ue_ngap_id);}*/void sm_cb_kpm_oran_slice(sm_ag_if_rd_t const* rd, global_e2_node_id_t const* e2_node){ assert(rd != NULL); assert(rd->type == INDICATION_MSG_AGENT_IF_ANS_V0); assert(rd->ind.type == KPM_STATS_V3_0); static int indicationCount = 0; kpm_ind_data_t const* kpm = &rd->ind.kpm.ind; int64_t now = time_now_us(); printf("----------Indication # %d from E2-Node type %d nb_id %d-------------\n", indicationCount++, e2_node->type, e2_node->nb_id.nb_id); meas_cnt = indicationCount; for(unsigned int i=0;i<kpm->msg.frm_2.meas_data_lst_len;i++){ printf("Slice {%d-%d%d%d} measurment \"%s\" = ", kpm->msg.frm_2.meas_info_cond_ue_lst[i].matching_cond_lst->label_info_lst.sliceID->sST, *kpm->msg.frm_2.meas_info_cond_ue_lst[i].matching_cond_lst->label_info_lst.sliceID->sD[0], *kpm->msg.frm_2.meas_info_cond_ue_lst[i].matching_cond_lst->label_info_lst.sliceID->sD[1], *kpm->msg.frm_2.meas_info_cond_ue_lst[i].matching_cond_lst->label_info_lst.sliceID->sD[2], kpm->msg.frm_2.meas_info_cond_ue_lst[i].meas_type.name.buf); if(kpm->msg.frm_2.meas_data_lst[i].meas_record_lst->value == INTEGER_MEAS_VALUE){ printf("%d\n", kpm->msg.frm_2.meas_data_lst[i].meas_record_lst->int_val); // storedMeas[indicationCount][i] = kpm->msg.frm_2.meas_data_lst[i].meas_record_lst->int_val; } else if(kpm->msg.frm_2.meas_data_lst[i].meas_record_lst->value == REAL_MEAS_VALUE) printf("name %s, value %.2f\n", kpm->msg.frm_2.meas_info_cond_ue_lst[i].meas_type.name.buf, kpm->msg.frm_2.meas_data_lst[i].meas_record_lst->real_val); }}/*modified by joe*/```### 6. Test result2 (Successful)#### 6.1 FlexRIC and O-DU test result2- After modifying the code, the FlexRIC can receive RIC Indication message from O-DU.![messageImage_1701400031946](https://hackmd.io/_uploads/HJ4dBkwH6.jpg)### 7. [Demo vedio](https://youtu.be/kLFyj81ZAFk)### 8. [O-DU LOG](https://drive.google.com/file/d/14gqB-Cy14crNtC0w8NUf2yRczyFytSzV/view?usp=drive_link)### 9. The newest branch for FlexRIC and O-DU#### 9.1 Used branch- OSC O-DU [G]: https://github.com/han-hong-chang/odu-bubble.git (main branch)- BubbleRan FlexRIC: https://github.com/han-hong-chang/flexric-bubble.git (main branch) ### 10. Next step: - [x] (DL:12/29) Check the xApp again - [x] (DL: 12/29) Upload the newest version of xApp to gitlab

Last changed by

Published on HackMD

Sign in

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox

Sign in with Wallet Wallet ( )

Connect another wallet

New to HackMD? Sign up

Test scenario3 (BubbleRan FlexRIC + BubbleRan xApp + Ntust O-DU) - HackMD (2024)

References

Top Articles
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5712

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.