wiki:Tutorials/4G5G/amarisoftcotsue

Version 6 (modified by prasanthi, 18 months ago) ( diff )

Amarisoft 5G Network with COTS UEs

Description

This tutorial contains instructions for setting up amarisoft 5G NR network using COTS user equipment. Amarisoft provides software based gNB, 5GCore (eNB,EPC), and UE simulator that run on commodity off-the-shelf devices. A typical software-based cellular basestation/UE consists of a host PC and an SDR, where host PC is used for processing the baseband signals sent to and received from the SDR. Amarisoft supports various SDRs including USRPs such as N310, X310. In this tutorial, we run 5GCore, gNB(SA) on a host server+USRP N310 in COSMOS SB1. The UEs used in this experiment are

1)SIMCOM SIM8200EA-M2 USB modem on sdr1-in3.sb1.cosmos

2)OnePlus8T KB2005 phone (remotely accessible on srv1-in3.sb1.cosmos)

Prerequisites

In order to access the test bed, create a reservation and have it approved by the reservation service. Access to the resources is granted after the reservation is confirmed. Please follow the process shown on the COSMOS getting started page to get started.

Resources required

1 server, 1 USRP N310 for the base station and sdr1-in3 or srv1-in3 to access the UE. in COSMOS SB1 domain

Tutorial Setup

Follow the steps below to gain access to the sandbox 1 console and set up nodes with appropriate images.

  1. If you don't have one already, sign up for a COSMOS account
  2. Create a resource reservation on sandbox 1
  3. Login into sandbox 1 console (console.sb1.cosmos-lab.org).
  4. Make sure all the resources in the domain are turned off:
    omf tell -a offh -t system:topo:allres  
    
    In this tutorial, for the Amarisoft base station we will be using the SB1 server srv2-lg1, and the USRP N310 sdr1-s1-lg1.
  5. Load amarisoft-tutorial-cosmos.ndz on srv2-lg1.
    omf load -i amarisoft-tutorial-cosmos.ndz -t srv2-lg1
    
  6. To access the UE, Waveshare SIM8200 USB modem connected to sdr1-in3, load the image waveshare-sim8200.ndz on sdr1-in3. This image has the SIMCOM network drivers installed to control the modem.
    omf load -i waveshare-sim8200.ndz -t sdr1-in3
    
  7. To access the phones connected to srv1-in3, load the image vysor-cosmos.ndz on srv1-in3. This image has [Vysor https://www.vysor.io/] and chrome remote desktop client installed in order to provide remote access to the phones.
    omf load -i vysor-cosmos.ndz -t srv1-in3
    
  8. Turn all the required resources on and check the status
    omf tell -a on -t srv2-lg1,sdr1-s1-lg1,sdr1-in3,srv1-in3
    
    omf stat -t system:topo:allres
    

Tutorial Execution

Run the Amarisoft base station

Check the USRP

  • Log in to the server srv2-lg1 with 2 SSH sessions.
    ssh root@srv2-lg1
    
  • Upon logging into the server, run eth_config.sh. This sets up the 10G data interfaces DATA1, DATA2. After running the script, you should see that the data interfaces have the appropriate IP addresses assigned, as per this table. The server should then be able to access the USRP N310 sdr1-md1 which can be checked by running uhd_find_devices.
root@srv2-lg1:~# ./eth_config.sh
root@srv2-lg1:~# ifconfig DATA1
DATA1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 10.38.1.2  netmask 255.255.0.0  broadcast 10.38.255.255
        inet6 fe80::ba59:9fff:fedd:bd94  prefixlen 64  scopeid 0x20<link>
        ether b8:59:9f:dd:bd:94  txqueuelen 1000  (Ethernet)
        RX packets 2764979088  bytes 8198039666643 (8.1 TB)
        RX errors 0  dropped 295845  overruns 0  frame 0
        TX packets 3653147129  bytes 11884176775843 (11.8 TB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@srv2-lg1:~# ifconfig DATA2
DATA2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 10.39.1.2  netmask 255.255.0.0  broadcast 10.39.255.255
        inet6 fe80::ba59:9fff:fedd:bd95  prefixlen 64  scopeid 0x20<link>
        ether b8:59:9f:dd:bd:95  txqueuelen 1000  (Ethernet)
        RX packets 334886  bytes 31982544 (31.9 MB)
        RX errors 0  dropped 295867  overruns 0  frame 0
        TX packets 10148  bytes 3378247 (3.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
root@srv2-lg1:~# uhd_find_devices
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: 3176DF5
    addr: 10.38.2.1
    claimed: False
    mgmt_addr: 10.37.2.1
    mgmt_addr: 10.38.2.1
    mgmt_addr: 10.39.2.1
    product: n310
    type: n3xx
  • Notice the IP addresses of the N310 - 10.37.2.1 is the 1G management interface, where as the other 2 are 10G data interfaces.

Run the MME

  • We are going to run the MME, gNodeB on srv2-lg1.
  • Run the Amarisoft MME on srv2-lg1. Run lte_init.sh to setup IP forwarding so that the UEs can connect to the Internet, once they establish a connection with the base station. This network uses PLMN 310014 (USA Test network) as configured in mme.cfg.
    root@srv2-lg1:~# cd /opt/amarisoft/ltemme-linux-2022-09-16
    root@srv2-lg1:/opt/amarisoft/ltemme-linux-2022-09-16# ./lte_init.sh
    Select CTRL default interface
    Configure NAT for CTRL
    net.ipv4.tcp_congestion_control = bbr
    net.core.rmem_max = 50000000
    net.core.wmem_max = 5000000
    root@srv2-lg1:/opt/amarisoft/ltemme-linux-2022-09-16# ./ltemme config/mme.cfg
    Core version 2022-09-16, Copyright (C) 2012-2022 Amarisoft
    This software is licensed to Rutgers University (The State University of New Jersey).
    License server: license.orbit-lab.org (0b-b4-46-dc-2f-83-58-cb)
    Support and software update available until 2023-08-18.
    
    (mme)
    
  • Type 'help' at the prompt to explore the available mme commands.

Run the gNodeB

  • Run Amarisoft 5G NR Stand alone gNodeB as shown below by passing the gNodeB configuration file as an argument. The configuration file defines SDR(USRP N310) address, operating band, bandwidth and other parameters.
    root@srv2-lg1:~# cd /opt/amarisoft/lteenb-linux-2022-09-16
    root@srv2-lg1:/opt/amarisoft/lteenb-linux-2022-09-16#
    root@srv2-lg1:/opt/amarisoft/lteenb-linux-2022-09-16# ./lteenb config/gnb-sa-n310.cfg
    Base Station version 2022-09-16, Copyright (C) 2012-2022 Amarisoft
    This software is licensed to Rutgers University (The State University of New Jersey).
    License server: license.orbit-lab.org (0b-b4-46-dc-2f-83-58-cb)
    Support and software update available until 2023-08-18.
    
    [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
    [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.38.2.1,type=n3xx,product=n310,serial=3176DF5,claimed=False,addr=10.38.2.1,master_clock_rate=122.88e6
    [INFO] [MPM.PeriphManager] init() called with device args `master_clock_rate=122.88e6,clock_source=internal,product=n310,time_source=internal,mgmt_addr=10.38.2.1'.
    [INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004)
    [INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000011312)
    [INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000011312)
    [INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
    [INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
    [INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000002)
    [INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000002)
    [INFO] [0/FIFO_0] Initializing block control (NOC ID: 0xF1F0000000000000)
    [INFO] [0/FIFO_1] Initializing block control (NOC ID: 0xF1F0000000000000)
    [INFO] [0/FIFO_2] Initializing block control (NOC ID: 0xF1F0000000000000)
    [INFO] [0/FIFO_3] Initializing block control (NOC ID: 0xF1F0000000000000)
    RF0: sample_rate=30.720 MHz dl_freq=2589.420 MHz ul_freq=2589.420 MHz (band n41) dl_ant=2 ul_ant=1
    Warning, CPU hyperthreading is enabled, we do not recommend using it.
    (enb) WARNING: The GPS is not locked. If you need time synchronization, you should restart the program when the GPS is locked.
    Chan Gain(dB)   Freq(MHz)
     TX1     45.0 2589.420000
     TX2     45.0 2589.420000
     RX1     50.0 2589.420000
    
    (enb) ng
    gNB NG connection state:
      - server=127.0.1.100:38412 state=setup_done PLMN=310014
    (enb) cell phy
    [gnb0012345] PLMN=310014 gNB_ID=0x12345
    --------Global-------- -----------DL---------- -----------UL---------- -----SSB---
    Cell    RAT BAND  BW P   ARFCN ANT NL SCS  QAM   ARCFN ANT NL SCS  QAM   ARFCN SCS
    0x001    NR  n41  20 0  517884   2  2  30  256  517884   1  1  30  256  517710  30
    (enb)
    
    
  • Type 'help' at the prompt and use commands like 'cell phy' to look at the various parameters of the base station.

Run Amarisoft UE Simulator

  • Run the Amarisoft UE simulator on srv2-lg1 by passing the configuration file ue-nr-sa-n310.cfg as an argument. To run UE simulator in 4G LTE mode, please use ue-n310.cfg.
root@srv2-lg1:~# cd /opt/amarisoft/lteue-linux-2021-09-18
root@srv2-lg1:/opt/amarisoft/lteue-linux-2021-09-18# ./lteue config/ue-nr-sa-n310.cfg
LTE UE version 2021-09-18, Copyright (C) 2012-2021 Amarisoft
This software is licensed to Rutgers University (The State University of New Jersey).
License server: license.orbit-lab.org (0b-b4-46-dc-2f-83-58-cb)
Support and software update available until 2022-08-18.

[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.38.3.1,type=n3xx,product=n310,serial=3196937,claimed=False,addr=10.38.3.1,master_clock_rate=122.88e6
[INFO] [MPM.PeriphManager] init() called with device args `clock_source=internal,mgmt_addr=10.38.3.1,time_source=internal,master_clock_rate=122.88e6,product=n310'.
[INFO] [0/Replay_0] Initializing block control (NOC ID: 0x4E91A00000000004)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000011312)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000011312)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000002)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000002)
[INFO] [0/FIFO_0] Initializing block control (NOC ID: 0xF1F0000000000000)
[INFO] [0/FIFO_1] Initializing block control (NOC ID: 0xF1F0000000000000)
[INFO] [0/FIFO_2] Initializing block control (NOC ID: 0xF1F0000000000000)
[INFO] [0/FIFO_3] Initializing block control (NOC ID: 0xF1F0000000000000)
RF0: sample_rate=30.720 MHz dl_freq=3489.420 MHz ul_freq=3489.420 MHz (band n78) dl_ant=2 ul_ant=1
(ue) WARNING: The GPS is not locked. If you need time synchronization, you should restart the program when the GPS is locked.
Chan Gain(dB)   Freq(MHz)
 TX1     35.0 3489.420000
 RX1     45.0 3489.420000
 RX2     45.0 3489.420000

(ue) ue
      # UE_ID CL RNTI    RRC_STATE               EMM_STATE #ERAB IP_ADDR
5G    0     1  0    0      offline               power off     0
5G    1     2  0    0      offline               power off     0
(ue) power_on 1 2
(ue) ue
      # UE_ID CL RNTI    RRC_STATE               EMM_STATE #ERAB IP_ADDR
5G    0     1  0    0         idle              registered     1 192.168.2.2
5G    1     2  0 4602      running              registered     1 192.168.2.6
(ue)

  • Type 'ue' at the prompt to see the status of the UEs and type 'power_on' to start a UE. The above simulation shows 2 UEs, and the number of UEs is specified UE_COUNT in the configuration file.
  • Go back to 'mme' prompt in srv1-lg1 and check the gnb, ue list.
(mme) gnb
  PLMN     RAN_ID                        IP:Port #UEctx     TACs
310014    0x12345                127.0.1.1:49526      0     0x64
(mme) ue
            SUPI           IMEISV  CN M-TMSI/5G-TMSI REG           TAC #BEARER IP_ADDR
 001010123456789 0123456700000101 5GC     0x526d3bcc   Y 310014.  0x64       1 192.168.2.2
 001010123456790 0123456700000201 5GC     0xf33020aa   Y 310014.  0x64       1 192.168.2.6
(mme)

  • The base station (srv1-lg1) can now talk to the UEs via the IP addresses assigned above.

Using the Web Interface

  • Amarisoft Web Interface can be used to analyse software logs and get information in real time. It can also be used to execute UE scenarios.
  • Point your web browser to http://10.37.1.1/lte/ (10.37.1.1 is the CTRL IP address of srv1-lg1, where the MME and gNodeB are running)
  • Click 'server' in the left client panel, and add MME, gNodeB, UE to look at the logs. Use the appropriate IP addresses and ports as shown below

No image "web_client_creation.png" attached to Tutorials/4G5G/amarisoftcotsue

Server IP addr Port
MME 10.37.1.1 9000
gNodeB 10.37.1.1 9001
UE 10.37.1.2 9002

No image "amarisoft_web_interface.png" attached to Tutorials/4G5G/amarisoftcotsue

Attachments (7)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.