Alan Lee
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# LAB3 --- # Single Machine ? Mutiple Machine ? - In general, we can deploy eNodeB and EPC in different machine. But we can also depoly eNodeB and EPC in single machine (All in one). You can check the following pictures to know the different architecture. - OAI eNodeB and OAI EPC in single machine ![](https://i.imgur.com/Iyj3xDk.png) - OAI eNodeB and OAI EPC in different machine ![](https://i.imgur.com/3ZSFiGq.png) --- # Build EPC & eNodeB in Single Machine This tutorial using a Single Machine EPC-eNodeB Scenario and other Single Machine to be the UE. Also, this tutorial will guide you to build your own Experiment Profile from scratch. ### 1. Create Experiment Profile After you created an account, you can go to your dashboard and start an Experiment. ![](https://i.imgur.com/A7sNkLx.png) ### 2. Give Name and Create Topology You can give the name whatever you want, but try to use the simple one. Then click "Create Topology" button to design a new Topology ![](https://i.imgur.com/rSSy4ph.png) ### 3. Creating the Topology Drag the Bare Metal PC node to your workspace ![](https://i.imgur.com/S6RgeDy.png) - Give a name for the node, and select raw-pc for the Node Type. - For the Hardware Type, you should choose **nuc5300**, because this is the only Hardware Type that have USRP B210 (Radio Frequency Device) attached to it. - For the Disk Image, you should choose Ubuntu 14.04 LTS 64-Bit, because this is the stable Ubuntu OS for running the OAI. ![](https://i.imgur.com/0XHJb7B.png) #### Select OS Disk Image ![](https://i.imgur.com/atMmyDY.png) Drag one more Bare Metal PC node to your workspace, so we can operate it as UE. We should choose the same specification as the previous node. ![](https://i.imgur.com/4Twf0Ja.png) FYI, we can change the icon so it will be looked different. ![](https://i.imgur.com/vQrSY6B.png) ### 4. Write Description and Instructions You can describe what the purpose of this profile, what Hardware Specification, OS, and Kernel that you used in each nodes, and so on. Moreover, you can write the instructions, so other people who want to instantiate your Profile can follow the same step as you do. But it doesn't matter if you want to update it later. #### Select who can instantiate our Profile, then Click Instantiate You can choose if you want to set your Profile to private (only for your project member), or if you want to let it public (open for everyone). Then you can click "Create" ![](https://i.imgur.com/zuZ7uI5.png) ### 5. Name the Experiments After you give a name for your experiment, you should wait it until it's ready ![](https://i.imgur.com/TA5vRQ0.png) ![](https://i.imgur.com/F5f1rRr.png) ![](https://i.imgur.com/V0GA9M2.png) After it ready, you can open the terminal using POWDER Shell and insert the documented commands ![](https://i.imgur.com/paOI3Wj.png) ### 6. Update system utility #### sudo apt-get update ![](https://i.imgur.com/AUbnTXT.png) ### 7. Configure the hostname & hosts file #### hostname Check the hostname and copy it into the hostname & hosts file #### sudo nano /etc/hostname ![](https://i.imgur.com/SV27n4N.png) ![](https://i.imgur.com/NHv8EgN.png) #### sudo nano /etc/hosts Put a line below the last line. Use this format: 127.0.1.1 ==(tab)== ==(tab)== ==(your hostname)== openair4G.eur ==(space)== ==(your hostname)== ![](https://i.imgur.com/8JBILVO.png) ### 8. Install the latest version of Git #### sudo apt-get install git -y ![](https://i.imgur.com/qNtZ626.png) ### 9. Clone the eNodeB Source Code #### git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ### 10. Clone the EPC Source Code #### git clone https://gitlab.eurecom.fr/oai/openair-cn.git ![](https://i.imgur.com/2IIiPF9.png) ### 11. Choose the Source Code Branch you want to use #### cd openair-cn/ #### git checkout v0.3.2 ![](https://i.imgur.com/Ci9N5es.png) ### 12. Install Low Latency Kernel #### sudo apt-get install linux-lowlatency-lts-vivid -y ![](https://i.imgur.com/wILEWBt.png) ![](https://i.imgur.com/QUzRS9v.png) ### 13. Set CPU Scalling Use this to maximize the CPU usage #### sudo apt-get install cpufrequtils ![](https://i.imgur.com/B5NpXvM.png) ![](https://i.imgur.com/xega54Q.png) ``` ``` #### sudo nano /etc/default/cpufrequtils add GOVERNOR="performance" line in the file ![](https://i.imgur.com/e94oU7S.png) ![](https://i.imgur.com/DXHeS6Z.png) ``` ``` #### sudo nano /etc/default/grub Find the line and modify it to this line GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_pstate=disable processor.max_cstate=1 intel_idle.max_cstate=0 idle=poll" ![](https://i.imgur.com/0TwTpJQ.png) ``` ``` #### sudo update-rc.d ondemand disable ![](https://i.imgur.com/cQqTuTM.png) ### 14. Show the list of installed Kernel #### dpkg --get-selections | grep linux-image ### 15. Remove the unused Kernels Remove all Kernel except those Low Latency Kernels #### sudo apt-get purge linux-image-3.13.0-143-generic linux-image-extra-3.13.0-143-generic linux-image-generic ![](https://i.imgur.com/mBcviJf.png) ### 16. Set the Low Latency to be Default Kernel #### sudo update-grub2 ### 17. Reboot PC #### sudo reboot ![](https://i.imgur.com/GuQJ5Zi.png) ### 18. Install the package those are needed by the HSS #### sudo update-grubcd openair-cn/SCRIPTS/ #### sudo ./build_hss -i ![](https://i.imgur.com/mPXsJll.png) ##### set password to "linux" ![](https://i.imgur.com/xyd3Njr.png) ![](https://i.imgur.com/kTYzLiz.png) ##### select apache ![](https://i.imgur.com/PL9VtIn.png) ##### select "Yes" ![](https://i.imgur.com/dj0FyTM.png) ##### set password to "linux" ![](https://i.imgur.com/CsPHdxZ.png) ![](https://i.imgur.com/I6W1IC2.png) ![](https://i.imgur.com/oDOdrOd.png) ### 19. Install the package those are needed by the HSS (including MME & SPGW) #### sudo ./build_epc -i ![](https://i.imgur.com/isLUw0E.png) ![](https://i.imgur.com/tw1lQcI.png) ![](https://i.imgur.com/RJn07z5.png) ![](https://i.imgur.com/AGtQo1V.png) ### 20. Install the package those are needed from eNB, (including UHD driver) #### cd ~/openairinterface5g/cmake_targets/ #### sudo ./build_oai -I --eNB -x --install-system-files -w USRP ![](https://i.imgur.com/jWTaUjh.png) ![](https://i.imgur.com/S3oR0bV.png) ### 21. Configure the eNB configruation file You should copy the file to your home directory to make it easier for you when configuring it #### cd ~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/ #### cp enb.band7.tm1.50PRB.usrpb210.conf ~/ #### cd #### sudo nano enb.band7.tm1.50PRB.usrpb210.conf Edit the MME Parameters and Network Interfaces part to exactly same as this tutorial figure ![](https://i.imgur.com/wmFDis0.png) ![](https://i.imgur.com/HTo4Kvd.png) ![](https://i.imgur.com/kAFdiys.png) ``` ``` ### 22. Take a look at your Network Configuration #### ifconfig Take a note of your eth0 IP (inet addr). We will need it later ![](https://i.imgur.com/j39tMoD.png) ### 23. Configure your EPC configuration file #### cd openair-cn/BUILD/EPC/ #### sudo nano epc.conf.in ![](https://i.imgur.com/LtD37Cc.png) Change the REALM to "openair4G.eur" ![](https://i.imgur.com/A0CgxRM.png) Edit the S6A_CONF directory to /usr/lib/ Edit the HSS_HOSTNAME from "oai-pc" into your long hostname in the step number 7a ![](https://i.imgur.com/UN3SrqP.png) Change the MNC and TAC, follow the figure ![](https://i.imgur.com/nnJ4jVi.png) Change the LOGGING OUTPUT to "CONSOLE" ![](https://i.imgur.com/UJo9UZI.png) Edit the P-GW interface for SGI with your previously noted IP (from ifconfig) ![](https://i.imgur.com/WrZh7MQ.png) Change the DNS, follow the figure ![](https://i.imgur.com/Xfy4ml2.png) ``` ``` ### 24. Build the EPC and HSS #### cd ~/openair-cn/SCRIPTS/ #### sudo ./build_epc -i ![](https://i.imgur.com/YgL0oGP.png) #### sudo ./build_epc -c -l ![](https://i.imgur.com/82moVER.png) #### sudo ./build_hss -c -l ![](https://i.imgur.com/GYg4Fde.png) ### 25. Run HSS #### sudo ./run_hss ![](https://i.imgur.com/oApbQWT.png) ![](https://i.imgur.com/uBwP31I.png) ### 26. Run EPC #### sudo ./run_epc -i -r ![](https://i.imgur.com/G7cVcqQ.png) ![](https://i.imgur.com/ylgrIaz.png) ### 27. Run eNB #### cd openairinterface5g/cmake_targets/lte_build_oai/build/ #### sudo ifconfig eth0:3 192.170.0.2 up #### sudo ifconfig eth0:4 192.170.1.2 up #### sudo ./lte-softmodem -E -O ~/enb.band7.tm1.50PRB.usrpb210.conf ![](https://i.imgur.com/1OaLN5x.png) ![](https://i.imgur.com/WbKn7FZ.png) ![](https://i.imgur.com/fnx30p4.png) ### 28. Successully run HSS, EPC, and eNB ![](https://i.imgur.com/yR8qHMH.png) You should make sure that your terminal runs the Log message like this. It means the eNB is waiting the UE to be attached --- # Build UE in single machine --- ### Implementation of OAI UE in POWDER ## Create Experiment profile 1. We get an error in the first experiment and also get a suggestion about porting OAI using nuc5300. So we try it again use another topology ![](https://i.imgur.com/Knl0eSE.png) 2. I name it correct1 ![](https://i.imgur.com/7x2X0eu.png) 3. Click create topology, ![](https://i.imgur.com/lH5utOl.png) 4. drag 1 Bare metal PC to the space ![](https://i.imgur.com/8ZFJl5L.png) 5. left-click on the icon, chose hardware type : nuc5300 since this hardware is connected with USRP b210. ![](https://i.imgur.com/Q1s2BS7.png) Choose disk image Ubuntu14-64-STD as shown in the figure below ![](https://i.imgur.com/zJYJeOv.png) 6. Finish it by clicking accept and it directly go to the next page. Just hit create button ![](https://i.imgur.com/ro7SqOt.png) 7. After process, it will be shown, Hit instantiate button to start the project ![](https://i.imgur.com/9PPiWVR.png) 8. fill the name of your profile to the blank, i name my profile as correct1profile and click finish ![](https://i.imgur.com/WTr7Vov.png) 10. wait until the process finish. You have 16 hours to finish your experiment. If you think it is not enough you can extend it ![](https://i.imgur.com/AyR34iF.png) ## Start Instalation Kernel 1. Picture shown below is the shell view of our PC. You can click tab topology view if you want to see your topology ![](https://i.imgur.com/y0CzQwQ.png) 2. type sudo apt-get update ![](https://i.imgur.com/sz7fPIO.png) 3. Go to this link : https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/uestartup 4. Setup the kernel, we choose kernel vivid ![](https://i.imgur.com/dcdNxGu.png) 5. type : sudo apt-get install linux-lowlatency-lts-vivid -y ![](https://i.imgur.com/51UMjsv.png) type sudo reboot to know the result 6. press symbol x next to UE 7. go to topology view 8. click left-click, choose shell 9. Type uname -r to check whether your kernel low latency already installed ![](https://i.imgur.com/8dAGfbd.png) ## Increase power management 1. According to this link https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/uestartup if we want to increase the use of power we have to ensure doing this procedure : - Install low-latency kernel - Disable C-states from BIOS (or from GRUB) - Disable CPU freq. scaling 2. We have finished installing low-latency kernel 3. To check CPU frequency scaling type this command watch grep \ "cpu MHz\ " /proc/cpuinfo ![](https://i.imgur.com/cAmqJqV.png) press Ctrl+C to back to shell 4. we can see the picture that the CPU is used devided in some parts. 5. The next step to disable CPU frequency is install cpufrequtils using this command : sudo apt-get install cpufrequtils ![](https://i.imgur.com/aJ5YKE8.png) 6. create cpufrequtils file sudo vi /etc/default/cpufrequtils 7. And add the following line to it: GOVERNOR="performance" ![](https://i.imgur.com/yzyptAa.png) save and exit 8. Now you need to disable ondemand daemon, otherwise after you reboot the settings will be overwritten. *sudo update-rc.d ondemand disable* ![](https://i.imgur.com/BTtcpp7.png) 9. and type : sudo /etc/init.d/cpufrequtils restart ![](https://i.imgur.com/C0b86lD.png) 10. to check our setting : cpufreq-info ![](https://i.imgur.com/3kj8ftg.png) 11. type sudo Reboot 12. you must disable p-state and c-state in linux so you need to add intel_pstate=disable to the Linux boot options, i.e GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_pstate=disable" in /etc/default/grub, then perform update-grub. You may optionally add the following as well "processor.max_cstate=1 intel_idle.max_cstate=0 idle=poll" ![](https://i.imgur.com/bJasdc5.png) then perform update-grub. ![](https://i.imgur.com/OFMy8lR.png) 13. Append "blacklist intel_powerclamp" to the end of /etc/modprobe.d/blacklist.conf, to blacklist the intel_powerclamp" module. If the file does not exist, create one, and add the line into it. ![](https://i.imgur.com/2TwbKVX.png) 16. Install i7z utility to check the cpu *sudo apt-get install i7z* ![](https://i.imgur.com/yqGXW8h.png) and *sudo i7z* ![](https://i.imgur.com/V86cUEa.png) 17. We have successfully increased the performance of our CPU. The next step is to implement OAI in powder ## Save our disk image 1. Before we continue to next step, we should save our work on disk image by clicking create disk image ![](https://i.imgur.com/2HBQ7qA.png) 2. If we choose the first choice it is like only save, if we want to save as without replacing current file we can choose second choice ![](https://i.imgur.com/lSSgU6i.png) after choosing one of them hit continue button 3. If we want to put our file we should choose the locations like /usr/local or /opt. However it will be not saved ## Implement OAI UE 1. I go to /opt and I will download openairinterface to this folder ![](https://i.imgur.com/fgjSOIq.png) 2. Type sudo git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ![](https://i.imgur.com/dTNEr0p.png) 3. after success download it, go to openairinterface5g/cmake_targerts folder. run command sudo ./build_oai -I ![](https://i.imgur.com/Mqz2Eri.png) 4. Type sudo ./build_oai --UE -w USRP ![](https://i.imgur.com/IEP5Ykm.png) ### ./build_oai --UE -w USRP Problem - run command *sudo ./build_oai --UE -w USRP* but we found failed of build ![](https://i.imgur.com/VTb7CHF.png) - we tried to solv it, in a real case when we got this problem we just try to make a file of build_oai as an execute file. Go to */opt/openairinterface5g/cmake_targets/lte_build_oai/build/CMakeFiles/* you can use command *ls -l CMakeOutput.log* to see whether your file is readable, writeable, executeable file or not ![](https://i.imgur.com/Cix6bUt.png) - because CMakeOutput.log is not executable file so we run this command chmod +x CMakeOutput.log ![](https://i.imgur.com/DBAAeUg.png) - after that run this command sudo apt-get install libboost-all-dev, press y to continue when you get the question. Wait until the process done ![](https://i.imgur.com/tXsUgTw.png) 5. go to folder tools by running this command cd tools, and type sudo ./init_nas_s1 UE 6. go to folder cd /opt/openairinterface5g/targets/bin and type sudo -E ./lte-softmodem.Rel14 -U -C2660000000 -r25 --ue-scan-carrier --ue-txgain 125 --ue-rxgain 125 2>&1 | tee UE.log ![](https://i.imgur.com/XwmbrQj.png) 7. go to openairinterface5g/cmake_targets/ and type sudo apt-get install libboost-all-dev ![](https://i.imgur.com/uNpCtKC.png) 8. type sudo ./build_oai --UE -w USRP -x ![](https://i.imgur.com/VXIcfoU.png) 9. we are assuming that this process is correct and we can use another new shell ![](https://i.imgur.com/AkRLYeV.png) --- OAI eNB and EPC installation is created by David Raditya K (davidraditya.netic@yahoo.com) OAI UE installation is created by Asif Ali Zamzami

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

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

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully