VES PNF Registration Request changes.
[o-du/l2.git] / docs / user-guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 User Guide
5 ***********
6
7 This is the user guide for Cherry release of O-DU/l2.
8 Follow installation-guide to get all the dependencies ready.
9
10 .. contents::
11    :depth: 3
12    :local:
13
14
15 A. Execution:
16 -------------
17
18 I. Execution - On locally compiling O-DU High Source Code
19 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
21 1. Assign virtual IP addresses as follows:
22
23    a. ifconfig <interface name>:ODU "192.168.130.81"
24    b. ifconfig <interface name>:CU_STUB "192.168.130.82"
25    c. ifconfig <interface name>:RIC_STUB "192.168.130.80"
26
27 PS: If O1 interface is enabled, IPs should match those configured in "startup_config.xml"
28     ( Refer Installation Guide - "Setting up Netconf server" )
29
30 2. Execute CU Stub:
31
32    a. Navigate to CU execution folder
33
34       - cd <O-DU High Directory>/l2/bin/cu_stub
35
36    b. Run CU Stub binary
37
38       - ./cu_stub
39
40 3. Execute RIC Stub:
41
42    a. Navigate to RIC execution folder
43
44       - cd <O-DU High Directory>/l2/bin/ric_stub
45
46    b. Run RIC Stub binary
47
48       - ./ric_stub
49
50 4. Execute O-DU High:
51
52    a. Navigate to ODU execution folder
53
54       - cd <O-DU High Directory>/l2/bin/odu
55
56    b. Run ODU binary
57
58       - ./odu
59
60 PS: CU stub and RIC stub must be run (in no particular sequence) before ODU. 
61
62 II. Execution - Using Docker Images
63 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64
65 The call flow between O-DU High and CU Stub can be achieved by executing docker containers.
66
67 - Pull the last built docker images:
68     -   docker pull nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2:3.0.1
69     -   docker pull nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2-cu-stub:3.0.1
70
71 - Run CU Stub docker:
72     - docker run -it --privileged --net=host --entrypoint bash
73       nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2-cu-stub:3.0.1   
74     - ./cu_stub
75
76 - Run ODU docker:
77     - docker run -it --privileged --net=host --entrypoint bash
78       nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2:3.0.1   
79     - ./odu
80
81
82 B. Pairwise testing with Intel O-DU Low:
83 -----------------------------------------
84
85 This section describes the changes required in compilation and execution of O-DU High binaries to successfully integrate
86 with Intel O-DU Low in timer mode.
87
88
89 I. Pre-requisites
90 ^^^^^^^^^^^^^^^^^^
91
92    1. Install O-DU High as per installation-guide . 
93
94    2. Clone O-DU Low code in <O-DU Low Directory> from
95
96       a. https://gerrit.o-ran-sc.org/r/admin/repos/o-du/phy and,
97
98       b. https://github.com/intel/FlexRAN
99       
100    3. Install O-DU Low as per https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-phy/en/latest/index.html .
101
102
103 II. Compilation
104 ^^^^^^^^^^^^^^^^
105
106    1. Build ODU :
107
108       a. Create folder <O-DU High Directory>/l2/src/wls_lib. Copy wls_lib.h from <O-DU Low Directory>/phy/wls_lib/ to 
109          <O-DU High Directory>/l2/src/wls_lib.
110
111       b. Create folder <O-DU High Directory>/l2/src/dpdk_lib. Copy following files from
112          <O-DU Low Directory>/dpdk-19.11/x86_64-native-linuxapp-gcc/include/ to <O-DU High Directory>/l2/src/dpdk_lib.
113          
114          - rte_branch_prediction.h
115          - rte_common.h
116          - rte_config.h
117          - rte_dev.h
118          - rte_log.h
119          - rte_pci_dev_feature_defs.h
120          - rte_bus.h
121          - rte_compat.h
122          - rte_debug.h
123          - rte_eal.h
124          - rte_os.h
125          - rte_per_lcore.h
126
127       c. Navigate to build folder
128
129          - cd <O-DU High Directory>/l2/build/odu
130
131       d. Build ODU Binary:
132            
133          - make odu PHY=INTEL_L1 PHY_MODE=TIMER MACHINE=BIT64 MODE=FDD
134
135
136 III. Execution
137 ^^^^^^^^^^^^^^^
138
139    1. Execute O-DU Low:
140
141       a. Setup environment:
142       
143          - cd <O-DU Low Directory>/phy/
144          - source ./setupenv.sh
145
146       b. Run O-DU Low binary :
147       
148          - cd <O-DU Low Directory>/FlexRAN/l1/bin/nr5g/gnb/l1
149          - To run in timer mode : ./l1.sh -e
150          - L1 is up when following prints are seen on console:
151
152                 | Non BBU threads in application
153                 | \==================================================================
154                 | nr5g_gnb_phy2mac_api_proc_stats_thread: [PID: 8659] binding on [CPU 0] [PRIO: 0] [POLICY: 1]
155                 | wls_rx_handler (non-rt):                [PID: 8663] binding on [CPU 0]
156                 | \==================================================================
157           
158                 PHY>welcome to application console
159
160    2. Execute FAPI Translator:
161
162       a. Setup environment:
163    
164          - cd <O-DU Low Directory>/phy/
165          - source ./setupenv.sh
166
167       b. Run FAPI translator binary:
168
169          - cd <O-DU Low Directory>/phy/fapi_5g/bin/
170          - ./oran_5g_fapi --cfg=oran_5g_fapi.cfg
171
172    3. Execute CU Stub and RIC Stub:
173
174       a. Run steps in sections A.I.1 through A.I.3 .
175
176    4. Execute DU:
177    
178       a. DU execution folder
179      
180          - cd <O-DU High Directory>/l2/bin/odu
181       
182       b. Export WLS library path
183
184          - export LD_LIBRARY_PATH=<O-DU Low Directory>/phy/wls_lib/lib:$LD_LIBRARY_PATH
185       
186       c. Run ODU binary
187
188          - ./odu
189
190
191 C. Message Flow:
192 ----------------
193
194 O-DU High opens WLS interface during bring up. Message exchanges can begin once the interface is ready.
195 Following diagram shows P5 messages exchanged with O-DU Low in timer mode.
196
197 .. figure:: O-DU_High_Low_Flow.jpg
198   :width: 600
199   :alt: Figure 7 O-DU High - O-DU Low Message Flow Diagram
200
201   Figure 7 - O-DU High - O-DU Low Message Flow Diagram
202
203 Note: UL IQ-Sample request and response are needed by Intel O-DU Low in timer mode(testing mode) only. Code changes for
204 these are guarded under INTEL_TIMER_MODE flag which can be enabled using compilation option "PHY_MODE=TIMER", as
205 mentioned in section B.I.1.d .
206
207
208 D. Health Check execution: get alarm-list
209 -------------------------------------------
210
211 To execute the get alarm-list flow, following steps are required to be executed:
212
213    1.   Start Netconf netopeer client 
214    
215    2. Connect to the server with 
216
217       | user: netconf
218       | pwd:  netconf!
219
220    3. Send a Netconf get request for alarms xpath
221
222 Here are the steps as executed in the terminal 
223
224      |  netopeer2-cli
225      |  > connect --login netconf
226      |  Interactive SSH Authentication
227      |  Type your password:
228      |  Password:
229      |  > get --filter-xpath /o-ran-sc-odu-alarm-v1\:odu/alarms
230      |  DATA
231      |  <odu xmlns=\"urn\:o-ran\:odu\:alarm\:1.0\">
232      |    <alarms>
233      |      <alarm>
234      |        <alarm-id>1009</alarm-id>
235      |        <alarm-text>cell id  [1] is up</alarm-text>
236      |        <severity>2</severity>
237      |        <status>Active</status>
238      |        <additional-info>cell UP</additional-info>
239      |      </alarm>
240      |    </alarms>
241      |  </odu>
242
243 The XML output is a list of active alarms in the O-DU High system.
244
245 Note: Integration with SMO/OAM is not yet done so a Netconf CLI client(netopeer2-cli) is used to connect to the Netconf server and send the get request.