arifadh2003
    • 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
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

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

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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
    • Note Insights New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

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

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Open Air Interface [Introduction](#Introduction) [Installation](#Installing-OAI) ## Introduction ![image](https://hackmd.io/_uploads/rknUSsyqa.png) Open Air Interface is an open-source software alliance aim to democratising 5G Technology development, established in 2014. Open Air Interface work on entire 5G Techstack, from developing RAN components (such as gNB, CU, DU), 5G Core Network development (creating AMF, SMF, UPF, etc) to develop CI/CD pipeline to seamless testing and integration for all 5G software components. ## Installing OAI #### Installing git and cmake ``` sudo apt install -y git cmake build-essential ``` #### Cloning OAI repository ``` git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ``` ![image](https://hackmd.io/_uploads/BJ0auFl3a.png) #### Build from source code ``` git checkout 2022.w40 source oaienv cd cmake_targets ./build_oai -I ./build_oai --gNB --nrUE -w SIMU ``` ## Configure OAI ### Checking interface name ``` ifconfig ``` ### Aliasing interface ``` sudo ifconfig enp0s3:CU 192.168.130.82 sudo ifconfig enp0s3:DU 192.168.130.81 ``` > Note : You need to retype this command after boot up ### Configure OAI-CU 1. Path to O-CU Config File ``` nano ~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf ``` 2. Configure mcc and mnc based on Free5GC webconsole ![image](https://hackmd.io/_uploads/SkjJzW0WR.png) 3. Modify IP local and remote ![image](https://hackmd.io/_uploads/HkYwV-0ZR.png) 4. Setup the IP address of free5GC and the interface for NGU and Setup the network interfaces ![image](https://hackmd.io/_uploads/H1bQHWC-C.png) ### Configure OAI-DU 1. Path to O-DU Config File ``` nano ~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf ``` 2. Config O-DU ![image](https://hackmd.io/_uploads/HJXnm-0WR.png) ### Configure UE 1. Path to UE ``` nano ~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf ``` 2. Config UE based on Free5GC webconsole ![image](https://hackmd.io/_uploads/By_pQZRZR.png) ## End to End Test ### AMF Config a. Edit file ~/free5gc/config/amfcfg.yaml ``` cd ~/free5gc sudo nano ./config/amfcfg.yaml ``` b. Find the ngapIpList key ``` ... ngapIpList: # the IP list of N2 interfaces on this AMF - 127.0.0.1 ``` c. Replace localhost address with 192.168.56.101 ``` ... ngapIpList: # the IP list of N2 interfaces on this AMF - 192.168.125.101 # 127.0.0.1 ``` ![image](https://hackmd.io/_uploads/ByNqHi2Fa.png) d. Save the file and exit from text editor ### SMF Config a. Edit file ~/free5gc/config/smfcfg.yaml ``` cd ~/free5gc sudo nano ./config/smfcfg.yaml ``` b. Find interfaces block ``` ... interfaces: # Interface list for this UPF - interfaceType: N3 # the type of the interface (N3 or N9) endpoints: # the IP address of this N3/N9 interface on this UPF - 127.0.0.8 ``` c. Replace address 127.0.0.8 with your static address ``` ... interfaces: # Interface list for this UPF - interfaceType: N3 # the type of the interface (N3 or N9) endpoints: # the IP address of this N3/N9 interface on this UPF - 192.168.125.101 # 127.0.0.8 ``` ![image](https://hackmd.io/_uploads/HJPBUi2K6.png) ### UPF Config a. Edit file ~/free5gc/config/upfcfg.yaml ``` cd ~/free5gc sudo nano ./config/upfcfg.yaml ``` b. Find gtpu IP line ``` ... gtpu: forwarder: gtp5g # The IP list of the N3/N9 interfaces on this UPF # If there are multiple connection, set addr to 0.0.0.0 or list all the addresses ifList: - addr: 127.0.0.8 type: N3 ``` c. Replace address 127.0.0.8 with your static address ``` ... gtpu: forwarder: gtp5g # The IP list of the N3/N9 interfaces on this UPF # If there are multiple connection, set addr to 0.0.0.0 or list all the addresses ifList: - addr: 192.168.125.101 type: N3 ``` ### Move to a directory ``` cd ~/openairinterface5g/cmake_targets/ran_build/build/ ``` ### Launch CU Component in Terminal 1 ``` sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf ``` ### Launch DU Component in Terminal 2 ``` sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf ``` ### Launch UE in Terminal 3 ``` sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf ``` If not working, try ``` sudo RFSIMULATOR=server ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf ``` ## Log Analysis ![Screenshot 2024-05-06 163822](https://hackmd.io/_uploads/Hkc9M9ufA.png) The screenshot showing that there AMF detecting a RAN network with IP address 192.168.125.104. The screenshot also showing a user with SUCI defined at free5GC webconsole ![Screenshot 2024-05-06 163836](https://hackmd.io/_uploads/H1vkY9OzA.png) The screenshot showing AMF asking NRF about AUSF and UE state transition from Deregistered to Authentication ![Screenshot 2024-05-06 163848](https://hackmd.io/_uploads/rJilt9_MA.png) AUSF started the authentication process and asking NRF for UDM. UDM store the UE subscription data ![Screenshot 2024-05-06 163913](https://hackmd.io/_uploads/rybqCc_M0.png) UDM returning security information to AUSF, then AUSF generate security key. The picture also showing AMF sending authentication request to UE through RU and start an authentication timeout timer. ![Screenshot 2024-05-06 163928](https://hackmd.io/_uploads/S13oCcuGA.png) AMF stopping the timer and AMF failed to validate UE, then AMF sending authentication reject signal and change UE status from authentication to deregistered ![Screenshot 2024-05-06 163946](https://hackmd.io/_uploads/r1-aRq_MR.png) ## Optional Step ### Set Some Environment Variable ``` echo 'export CONFIG_PATH=~/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/' >> ~/.bashrc echo 'export RUN_PATH=~/openairinterface5g/cmake_targets/ran_build/build/' >> ~/.bashrc source ~/.bashrc ``` ### Create Three File ``` cat ~/openairinterface5g/run_cu.sh cat ~/openairinterface5g/run_du.sh cat ~/openairinterface5g/run_ue.sh ``` ### Write the File #### Write the run_cu.sh ``` sudo nano ~/openairinterface5g/run_cu.sh ``` Write this line: ``` #!/bin/bash cd $RUN_PATH sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf ``` #### Write the run_du.sh ``` sudo nano ~/openairinterface5g/run_du.sh ``` Write this line: ``` #!/bin/bash cd $RUN_PATH sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf ``` #### Write the run_ue.sh ``` sudo nano ~/openairinterface5g/run_cu.sh ``` Write this line: ``` #!/bin/bash cd $RUN_PATH sudo RFSIMULATOR=server ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --nokrnmod -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf ``` ### Edit the Permission ``` sudo chmod +x ~/openairinterface5g/run_cu.sh sudo chmod +x ~/openairinterface5g/run_du.sh sudo chmod +x ~/openairinterface5g/run_ue.sh ``` ### Run the shell script In Different terminals ``` cd ~/openairinterface5g ./run_cu.sh ``` ``` cd ~/openairinterface5g ./run_du.sh ``` ``` cd ~/openairinterface5g ./run_ue.sh ``` > Note: if you want to open new terminal, click alt+f2 to access terminal 2, alt+f3 to access terminal 3 ### CU-DU not separated #### Run OAI-gNB ``` cd ~/oai/cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --rfsim --sa ``` #### Run OAI-UE ``` cd ~/oai/cmake_targets/ran_build/build sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa ``` #### Result(UE) ![image](https://hackmd.io/_uploads/r1frS8tP0.png) #### Result(gNB) ![image](https://hackmd.io/_uploads/r1X5yM9wA.png) #### Result(Core) ![image](https://hackmd.io/_uploads/BkDGgM5w0.png) #### Conclusion UE to gNB was connected, but failed to receive IP address from Core, Possible cause would be misconfiguration in DNN name.

    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
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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