From 86c39286524f42c20a49f2dc7805ac46b81268cb Mon Sep 17 00:00:00 2001
From: Shruthi <ssainakkina@iisc.ac.in>
Date: Fri, 5 Mar 2021 21:09:39 +0530
Subject: [PATCH] Minor build error fix, README improved

---
 executables/nr-gnb.c |  4 +---
 nfapi/nrNFAPI.md     | 21 +++++++++++++++------
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c
index 5a53c69063f..6632289102b 100644
--- a/executables/nr-gnb.c
+++ b/executables/nr-gnb.c
@@ -428,7 +428,7 @@ static void *gNB_L1_thread( void *param ) {
       if (gNB->CC_id==0) {
         int next_slot;
         next_slot = (slot_rx + 1) % 20;
-        if (rxtx(gNB,frame_rx,next_slot,frame_tx,next_slot,thread_name) < 0) break
+        if (rxtx(gNB,frame_rx,next_slot,frame_tx,next_slot,thread_name) < 0) break;
       }
     if (wait_on_condition(&L1_proc->mutex,&L1_proc->cond,&L1_proc->instance_cnt,thread_name)<0) break;
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 1 );
@@ -445,8 +445,6 @@ static void *gNB_L1_thread( void *param ) {
       if (rxtx(gNB,frame_rx,slot_rx,frame_tx,slot_tx,thread_name) < 0) break;
     }
 
-    clock_gettime(CLOCK_MONOTONIC,&t);
-    //printf("\n %d.%d",t.tv_sec,t.tv_nsec);
    
     if (release_thread(&L1_proc->mutex,&L1_proc->instance_cnt,thread_name)<0) break;
    
diff --git a/nfapi/nrNFAPI.md b/nfapi/nrNFAPI.md
index 299a43fd932..b78a205e843 100644
--- a/nfapi/nrNFAPI.md
+++ b/nfapi/nrNFAPI.md
@@ -1,17 +1,24 @@
 # Procedure to run nFAPI in 5G NR
 
-## Conributed by 5G Testbed IISC 
-### Developers: Sudhakar B,Mahesh K,Gokul S,Aniq U.R
+## Conributed by 5G Testbed IISc 
+
+### Developers: Mahesh K,Gokul S,Aniq U R, Sai Shruthi N, Sudhakar B
 
 ## Procedure to Build gNB and UE
 
 The regular commands to build gNB and UE can be used
 ```
-sudo ./build_oai --gNB --UE
+sudo ./build_oai --gNB --nrUE
 
 ```
 ## Procedure to run NR nFAPI using RF-Simulator
 
+### Bring up another loopback interface
+
+If running for the first time on your computer, or you have restarted your computer, bring up another loopback interface with this command:  
+
+sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
+
 ### VNF command
 ```
 sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band78.tm1.106PRB.nfapi.conf --nfapi 2 --noS1 --phy-test
@@ -28,8 +35,10 @@ sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --rfsim --phy-test --rrc_config_path
 
 ```
 ## Procedure to run NR nFAPI using Hardware
-Will be updated as we have not yet currently tested on hardware
+
+To be updated.
 
 ## Notes
-* In order to acheive the synchronization between VNF and PNF and receive the P7 messages within the timing window the order in which we should run the modules on different terminals is UE->VNF->PNF
-* Currently only downlink is functional and working as we are still working on uplink functionality
+* If running for the first time on local branch, run in the following order - VNF then PNF. This is so that necessary files are generated for the UE to run. Stop this run (it's ok if it stops on its own due to an error). From every subsequent run follow the next bullet. 
+* In order to achieve synchronization between the VNF and PNF, and receive P7 messages within the timing window, the order in which we should run the modules on different terminals is UE->VNF->PNF.
+* Currently downlink transmission from gNB to UE is partially functional and we are working on improving this. Uplink P7 messages are disabled and we will work on uplink integration after completing downlink.
-- 
GitLab