Difference between revisions of "4G: OpenAirInterface instalasi"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Sumber: https://hackmd.io/@ChiehChun/SkKj1oRoV/https%3A%2F%2Fhackmd.io%2F%40ChiehChun%2FrJkKmWPlH?type=book ==Referensi== * https://hackmd.io/@ChiehChun/SkKj1oRoV/https%3...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Sumber: https://hackmd.io/@ChiehChun/SkKj1oRoV/https%3A%2F%2Fhackmd.io%2F%40ChiehChun%2FrJkKmWPlH?type=book
 
Sumber: https://hackmd.io/@ChiehChun/SkKj1oRoV/https%3A%2F%2Fhackmd.io%2F%40ChiehChun%2FrJkKmWPlH?type=book
 +
 +
 +
'''WARNING:''' tidak recommended, karena akses source ke eurocom perlu account
 +
 +
 +
 +
 +
==Internet setting==
 +
 +
  ifconfig
 +
 +
 +
==Set up OAI eNB and EPC==
 +
 +
Environment/low-latency kernel set up
 +
 +
sudo apt-get update
 +
sudo apt-get install vim
 +
sudo vim /etc/hosts (replace ubuntu to oai.openair4G.eur oai)
 +
sudo reboot
 +
sudo apt-get install git -y  (#install git)
 +
 +
git config --global user.name "Your Name"
 +
git config --global user.email "Your email address"
 +
 +
cd /usr/local/src
 +
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
 +
# clone the eNB/UE source code
 +
git clone https://gitlab.eurecom.fr/oai/openair-cn.git
 +
# clone the EPC source code
 +
 +
# 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
 +
  
  

Latest revision as of 13:13, 30 September 2022

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


WARNING: tidak recommended, karena akses source ke eurocom perlu account



Internet setting

 ifconfig


Set up OAI eNB and EPC

Environment/low-latency kernel set up

sudo apt-get update 
sudo apt-get install vim
sudo vim /etc/hosts (replace ubuntu to oai.openair4G.eur oai)
sudo reboot
sudo apt-get install git -y  (#install git)
git config --global user.name "Your Name"
git config --global user.email "Your email address"
cd /usr/local/src
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
# clone the eNB/UE source code
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