wiki:Tutorials/4G5G/amarisoft

Amarisoft 4G/5G SDR System

Description

This tutorial contains instructions for running the amarisoft 5G NR base station and UE simulator on USRP N310s in COSMOS SB1. Amarisoft provides software based gNB, 5GCore (eNB,EPC) that run on commodity off-the-shelf devices. The software generates and sends baseband signals to the RF front-end for digital to analog conversion. Various RF front-ends are supported, including USRP N310, USRP X310. In this tutorial, we run 5GCore, gNB on a server+USRP N310, and the UE simulator on another server+USRP N310 in COSMOS SB1, in stand-alone (SA) mode. The UE simulator can simulate one or more UEs, enabling experiments with large number of users connected to a base station.

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

2 servers, 2 USRP N310s 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) with two SSH sessions.
  4. Make sure all the resources in the domain are turned off:
    omf tell -a offh -t system:topo:allres  
    
    For this tutorial we will be using the SB1 servers, srv1-lg1, srv2-lg1 and USRP N310s, sdr1-md1, sdr1-s1-lg1
  5. Load amarisoft-tutorial-cosmos.ndz on srv1-lg1,srv2-lg1.
    omf load -i amarisoft-tutorial-cosmos.ndz -t srv1-lg1,srv2-lg1
    
  6. Turn all the required resources on and check the status
    omf tell -a on -t srv1-lg1,srv2-lg1,sdr1-md1,sdr1-s1-lg1
    
    omf stat -t system:topo:allres
    
  7. ssh to the nodes, use option -Y for using GUI.

Tutorial Execution

Check the USRPs

  • Upon logging into the nodes, run eth_config.sh script on both the nodes. 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 nodes should then be able to access the USRP N310s sdr1-s1-lg1 and sdr1-md1 which can be checked by running uhd_find_devices.
root@srv1-lg1:~# ./eth_config.sh
root@srv1-lg1:~# ifconfig DATA1
DATA1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 10.38.1.1  netmask 255.255.0.0  broadcast 10.38.255.255
        inet6 fe80::1e34:daff:fe42:c3c  prefixlen 64  scopeid 0x20<link>
        ether 1c:34:da:42:0c:3c  txqueuelen 1000  (Ethernet)
        RX packets 61195963  bytes 199994153268 (199.9 GB)
        RX errors 0  dropped 6680  overruns 0  frame 0
        TX packets 58734853  bytes 190912589303 (190.9 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


root@srv1-lg1:~# ifconfig DATA2
DATA2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 10.39.1.1  netmask 255.255.0.0  broadcast 10.39.255.255
        inet6 fe80::1e34:daff:fe42:c3d  prefixlen 64  scopeid 0x20<link>
        ether 1c:34:da:42:0c:3d  txqueuelen 1000  (Ethernet)
        RX packets 7378  bytes 651944 (651.9 KB)
        RX errors 0  dropped 6682  overruns 0  frame 0
        TX packets 282  bytes 82239 (82.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@srv1-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
--------------------------------------------------
-- UHD Device 1
--------------------------------------------------
Device Address:
    serial: 3196937
    addr: 10.38.3.1
    claimed: False
    mgmt_addr: 10.37.3.1
    mgmt_addr: 10.38.3.1
    mgmt_addr: 10.39.3.1
    product: n310
    type: n3xx

Run MME

  • We are going to run the MME, gNodeB on srv1-lg1 and the UE simulator on srv2-lg1.
  • Run the Amarisoft MME on srv1-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@srv1-lg1:~# cd /opt/amarisoft/ltemme-linux-2021-09-18
    root@srv1-lg1:/opt/amarisoft/ltemme-linux-2021-09-18# ./lte_init.sh
    Select CTRL default interface
    root@srv1-lg1:/opt/amarisoft/ltemme-linux-2021-09-18# ./ltemme config/mme.cfg
    Core 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.
    
    (mme)
    
    
  • Type 'help' at the prompt to explore the available mme commands.

Run eNodeB/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. To run 4G LTE eNodeB, please use enb-n310.cfg
    root@srv1-lg1:~# cd /opt/amarisoft/lteenb-linux-2021-09-18
    root@srv1-lg1:/opt/amarisoft/lteenb-linux-2021-09-18# ./lteenb config/gnb-sa-n310.cfg
    Base Station 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.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 `product=n310,mgmt_addr=10.38.2.1,time_source=internal,clock_source=internal,master_clock_rate=122.88e6'.
    [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
    (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     35.0 3489.420000
     TX2     35.0 3489.420000
     RX1     40.0 3489.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  n78  20 0 632628   2  2  30  256 632628   1  1  30  256 632544  30
    (enb)
    
    
  • Type 'help' at the prompt and use commands like 'cell phy' to look at the various parameters of the base station.

Run UE

  • Run the Amarisoft MME 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

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

Last modified 4 months ago Last modified on Feb 2, 2022, 6:08:30 PM

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.