4G: OpenAirInterface instalasi

From OnnoWiki
Revision as of 11:42, 30 September 2022 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Sumber: https://hackmd.io/@ChiehChun/SkKj1oRoV/https%3A%2F%2Fhackmd.io%2F%40ChiehChun%2FrJkKmWPlH?type=book



   Build OAI LTE eNB & EPC BMW Lab.@NTUST
       OAI architecture
       Build OAI LTE on VM
       OAI LTE Testing
           1. Installation on PC
           2. Set up OAI eNB and EPC
           3. RUN OAI
           4. Testing results

OAI architecture

Build OAI LTE on VM

Follow this note for building on the virtual machine OAI LTE Testing 1. Installation on PC

   Install os
   STEP1: Format USB
   STEP2: Make a bootable USB (Refus)(https://rufus.akeo.ie/)
       Download Rufus 3.1 Portable
       Download ubuntu 14.04.5 .iso
       Open Refus and load ubuntu.iso -> click “START”
   STEP3:
   Insert USB in mini pc and press F2 to enter Bios (Depends on different computer brands)
   STEP4: Move USB to first boot order , and save(F10)
   STEP5: Install ubuntu os


name : oai password : linux

   Internet setting
   STEP1: Check internet state

oai@oai:~$ ifconfig


Have no internet connection

   STEP2: Editing wired connection
   Select IPV4 Settings
   Method : Manual
   Address : 140.118.121.32
   Netmask : 255.255.255.0
   Gateway : 140.118.121.254
   DNS : 140.118.31.99
   STEP3: oai@oai:~$ ifconfig , check whether connect to internet

2. Set up OAI eNB and EPC

   OAI environment set up and installation
   STEP 1 : Environment/low-latency kernel set up

oai@oai:~$ sudo apt-get update oai@oai:~$ sudo apt-get install vim oai@oai:~$ sudo vim /etc/hosts (replace ubuntu to oai.openair4G.eur oai) oai@oai:~$ sudo reboot oai@oai:~$ sudo apt-get install git -y (#install git) oai@oai:~$ git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git (# clone the eNB/UE source code) oai@oai:~$ git clone https://gitlab.eurecom.fr/oai/openair-cn.git (# clone the EPC source code)

  1. if the openair-cn can not clone from Gitlab, try the follow command

oai@oai:~$ git clone https://github.com/OPENAIRINTERFACE/openair-cn.git

oai@oai:~$ cd openair-cn/ oai@oai:~/openair-cn$ git checkout v0.3.2 (# swtich the branch to the one that we gonna use) oai@oai:~$ sudo apt-get install linux-lowlatency-lts-vivid -y (# Install low-lentency kernel) oai@oai:~$ sudo apt-get install cpufrequtils (# Set cpu scaling) oai@oai:~$ sudo vim /etc/default/cpufrequtils add GOVERNOR="performance" to this file oai@oai:~$ sudo update-rc.d ondemand disable oai@oai:~$ dpkg --get-selections | grep linux-image (# remove the kernel we won't used) oai@oai:~$ sudo apt-get purge linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic linux-image-generic-lts-xenial oai@oai:~$ sudo update-grub2

   STEP 2 : Reboot and change the kernel to low-latency

@oai:~$sudo reboot

Press esc to setting interface when reboot

Change kernel

   STEP 3 : check uname -a , you will have
   Openair-CN (EPC) installation
   STEP 1 : Build the package for HSS

oai@oai:~$ cd openair-cn/SCRIPTS/ oai@oai:~/openair-cn/SCRIPTS$ sudo ./build_hss -i (# Install the package which is needed from HSS)

   Set MySQL password to “linux”
   Choose apache
   Set phpmyadmin password to “linux”
   STEP 2 : Build the package for EPC ( including MME and SPGW )

oai@oai:~/openair-cn/SCRIPTS$ sudo ./build_epc -i (# Install the package which is needed from epc (including MME and SPGW))

   Openairinterface eNB installation
   STEP 1 : Install the package which is needed from eNB, including UHD driver

oai@oai:~/openair-cn/SCRIPTS$ cd ~/openairinterface5g/cmake_targets/ oai@oai:~/openairinterface5g/cmake_targets$ sudo ./build_oai -I --eNB -x --install-system-files -w USRP

   STEP 2 : Adapt your modification,if you do any modification related to source code

oai@oai:~/openairinterface5g/cmake_targets$ sudo ./build_oai -w USRP -x -c --eNB

   Configuration Setting for connect eNB to EPC

eNB part-

   STEP 1 : Copy the configruation files we will use for eNB

oai@oai:~/openairinterface5g/cmake_targets$ cd ~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/ oai@oai:~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF$ cp enb.band7.tm1.50PRB.usrpb210.conf ~/ oai@oai:~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF$ cd oai@oai:~$ vim enb.band7.tm1.50PRB.usrpb210.conf

-> modify eNB configuration

   STEP 2 : Edit configuration
   If git brach is on v0.6.1_tdd, there do NOT have “ENB_IPv4_ADDRESS_FOR_X2C” and “ENB_PORT_FOR_X2C”. And on the branch of v0.6.1_tdd, we do not set the X2C interface. However, the git branch is on the develop/master, there would have “ENB_IPv4_ADDRESS_FOR_X2C” and “ENB_PORT_FOR_X2C” in the NETWORK_INTERFACES.
   And we need to set the X2C address as same as S1U.
       : wq to save
   STEP 3: Record your eth0 ip address

oai@oai:~$ ifconfig

EPC part- (gedit epc.cong.in)

   STEP 4 : Edit EPC configuration
   OAI config format

3. RUN OAI

   step 1 : build epc (Terminal 1)

oai@oai:~/openair-cn/BUILD/EPC$ cd ~/openair-cn/SCRIPTS/ oai@oai:~/openair-cn/SCRIPTS$ sudo ./build_epc -i oai@oai:~/openair-cn/SCRIPTS$ sudo ./build_epc -c -l

   step 2 : build hss (Terminal 2)

oai@oai:~/openair-cn/SCRIPTS$ sudo ./build_hss -c -l

   STEP 3 : run epc (Terminal 1)

oai@oai:~/openair-cn/SCRIPTS$ sudo ./run_epc -i -r

   STEP 4 : run hss (Terminal 2)

oai@oai:~/openair-cn/SCRIPTS$ sudo ./run_hss

   STEP 5 : run eNB (Terminal 3)
   Mark : Run eNB twice to succeed

oai@oai:~$ cd openairinterface5g/cmake_targets/lte_build_oai/build/ oai@oai:~/openairinterface5g/cmake_targets/lte_build_oai/build$ sudo ifconfig eth0:3 192.170.0.2 up oai@oai:~/openairinterface5g/cmake_targets/lte_build_oai/build$ sudo ifconfig eth0:4 192.170.1.2 up oai@oai:~/openairinterface5g/cmake_targets/lte_build_oai/build$ sudo ./lte-softmodem -E -O ~/enb.band7.tm1.50PRB.usrpb210.conf -d

Mark1 : Once you checkout the branch (means modify the code), you need to compile again.

oai@oai:~/openairinterface5g/cmake_targets$ sudo ./build_oai -w USRP -x -c --eNB

Mark2 : If you want to go back master from other branch, you need to send git checkout -f first and then git branch master

Mark3 : If you change the IP adress and then eNB part should:

oai@oai:~/openairinterface5g/cmake_targets/lte_build_oai/build$ sudo ifconfig eth0:3 192.170.0.2 up oai@oai:~/openairinterface5g/cmake_targets/lte_build_oai/build$ sudo ifconfig eth0:4 192.170.1.2 up oai@oai:~/openairinterface5g/cmake_targets/lte_build_oai/build$ sudo ./lte-softmodem -E -O ~/enb.band7.tm1.50PRB.usrpb210.conf -d (#run eNB)

Mark4 : CTRL+C to cease

   Connection scenario :

4. Testing results

   UE connection testing



Referensi