wiki:Tutorials/Wireless/FR3/Amarisoft

Version 13 (modified by rifatbin, 2 days ago) ( diff )

Amarisoft 5G over FR3 in Pi-Radio

Description

This tutorial contains instructions for setting up amarisoft 5G NR network using SDRs(USRP N310/USRP 2974) in COSMOS SB1. 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 such as Amarisoft PCIe SDR50, SDR100, and USRPs such as N310, X310, 2974. In this tutorial, we run 5GCore, gNB(SA) on a host node+USRP 2974 in COSMOS SB1, and the UE simulator on another host node+USRP 2974. The UE simulator can simulate one or more UEs, enabling experiments with large number of users connected to a base station.

Prerequisites

  • COSMOS account and active reservation in Sandbox 1.
  • Familiarity with USRP-2974 (embedded X310, 10 MHz–6 GHz, 160 MHz BW).
  • FR3 hardware access (2×Pi-Radio FR3 front-ends) and the 5G-tutorial-cosmos_pi_radio_1.ndz disk image for the USRPs.

Resources required

  • Nodes: sdr1-piradio, sdr2-piradio, rfdev-sdr1-piradio, rfdev-sdr2-piradio.
  • Antennas: 2× Vivaldi (Tx/Rx) connected to the Pi-Radio front-ends. (See FR3 hardware pages for antenna layout.)
  • Browser access to Pi-Radio web UI on the rfdev-* nodes (port 5006).

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  
    

  1. Load 5G-tutorial-cosmos_pi_radio_1.ndz on sdr1-piradio, sdr2-piradio nodes.
    omf load -i 5G-tutorial-cosmos_pi_radio_1.ndz -t sdr1-piradio,sdr2-piradio
    
  2. Turn all the required resources (2 USRPs and 2 Pi-Radio SDRs) on and check the status.
    omf tell -a on -t sdr1-piradio,sdr2-piradio,rfdev-sdr1-piradio,rfdev-sdr2-piradio
    
    omf stat -t sdr1-piradio,sdr2-piradio,rfdev-sdr1-piradio,rfdev-sdr2-piradio
    
  3. After a minute (giving internal PCs enough time to boot), ssh to the USRP 2974s nodes and start the chrome remote desktop session (follow the instructions for setting remote access).
  4. Open a Chrome browser sessions in each of the two CDRs and access the Pi-Radio configuration pages
     http://rfdev-sdr1-piradio.sb1.cosmos-lab.org:5006/
     http://rfdev-sdr2-piradio.sb1.cosmos-lab.org:5006/
    

Experiment Execution

Use the Pi-Radio web UI Frequency panel on both rfdev pages (Tx and Rx) and set:

  • Low LO Frequency (GHz): 2.680000
  • High LO Frequency (GHz): 12.000000

This example pairs a 2.68 GHz IF with a 12 GHz high-side LO (and a 2.68 GHz low-side LO) to place the RF tone at ~12 GHz, and back to 2.68 GHz on the receive path. (Exact placement depends on mixer sign/paths; the screenshot below shows the working settings used in this demo.) Leave Filters, Gain (except where noted), and LO Suppression at defaults for the first run.

  • rfdev-sdr1:

  • rfdev-sdr2:

Run MME

  • We are going to run the MME, gNodeB on sdr1-piradio and the UE simulator on sdr2-piradio.
  • Run the Amarisoft MME on sdr1-piradio. 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@sdr1-piradio:~# cd /opt/amarisoft/ltemme-linux-2024-09-13
    root@sdr1-piradio:/opt/amarisoft/ltemme-linux-2024-09-13# ./lte_init.sh
    Select eno0 default interface
    Configure NAT for eno0
    net.ipv4.tcp_congestion_control = bbr
    net.core.rmem_max = 50000000
    net.core.wmem_max = 5000000
    root@sdr1-piradio:/opt/amarisoft/ltemme-linux-2024-09-13# ./ltemme config/mme.cfg
    Core Network version 2024-09-13, Copyright (C) 2012-2024 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 2025-08-18.
    
    (mme)
    
    
  • Type 'help' at the prompt to explore the available mme commands.

Run eNodeB/gNodeB

  • Disable CPU hyper-threading to ensure stable CPU timing for real-time SDR tasks:
root@sdr1-piradio:~# echo off | sudo tee /sys/devices/system/cpu/smt/control
off
root@sdr1-piradio:
  • 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 2974) address, operating band, bandwidth and other parameters.
root@sdr1-piradio:~# cd /opt/amarisoft/lteenb-linux-2024-09-13
root@sdr1-piradio:/opt/amarisoft/lteenb-linux-2024-09-13# ./lteenb config/gnb-sa-2974-n7-5M.cfg
Base Station version 2024-09-13, Copyright (C) 2012-2024 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 2025-08-18.

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.4.0.HEAD-0-g3cf9529f
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Connecting to niusrpriorpc at localhost:5444...
[INFO] [X300] Using LVBITX bitfile /usr/local/share/uhd/images/usrp_x310_fpga_XG.lvbitx
[INFO] [GPS] Found an internal GPSDO: LC_XO, Firmware Rev 0.929b
[INFO] [X300] Radio 1x clock: 184.32 MHz
RF0: sample_rate=7.680 MHz dl_freq=2680.000 MHz ul_freq=2560.000 MHz (band n7) dl_ant=1 ul_ant=1
WARNING: The GPS is not locked. If you need time synchronization, you should restart the program when the GPS is locked.
(enb)
(enb) ng
gNB NG connection state:
  - server=127.0.1.100:38412 state=setup_done name=amarisoft.amf.5gc.mnc014.mcc310.3gppnetwork.org PLMN=310014
(enb)
(enb) cell phy
[gnb0012345] PLMN=310014 gNB_ID=0x12345
--------Global-------- -----------DL-------------- -----------UL---------- -----SSB---
Cell    RAT BAND  BW P   ARFCN ANT NL SCS  QAM POW   ARCFN ANT NL SCS  QAM   ARFCN SCS
0x001    NR   n7   5 0  536000   1  1  15  256 -39  512000   1  1  15  256  535937  15
(enb)
(enb) tx_gain
Chan Port Gain(dB)
 TX0    0     10.0
(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 sdr2-piradio by passing the configuration file 'ue-nr-sa-2974-n7-5M.cfg' as an argument.
root@sdr2-piradio:~# cd /opt/amarisoft/lteue-linux-2024-09-13
root@sdr2-piradio:/opt/amarisoft/lteue-linux-2024-09-13# ./lteue config/ue-nr-sa-2974-n7-5M.cfg
UE version 2024-09-13, Copyright (C) 2012-2024 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 2025-08-18.

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.4.0.HEAD-0-g3cf9529f
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Connecting to niusrpriorpc at localhost:5444...
[INFO] [X300] Using LVBITX bitfile /usr/local/share/uhd/images/usrp_x310_fpga_XG.lvbitx
[INFO] [GPS] Found an internal GPSDO: LC_XO, Firmware Rev 0.929a
[INFO] [X300] Radio 1x clock: 184.32 MHz
RF0: sample_rate=23.040 MHz dl_freq=2680.000 MHz ul_freq=2560.000 MHz (band n7) dl_ant=1 ul_ant=1
WARNING: The GPS is not locked. If you need time synchronization, you should restart the program when the GPS is locked.
(ue) Cell 0: SIB found
ue
        # UE_ID CL RNTI    RRC_STATE               EMM_STATE #ERAB IP_ADDR
  NR    0     1  0    0      offline               power off     0
(ue) power_on
(ue) ue
        # UE_ID CL RNTI    RRC_STATE               EMM_STATE #ERAB IP_ADDR
  NR    0     1  0 461b      running              registered     1 192.168.2.2
(ue) t

  • After the UE is recognized by the gNodeB, it receives the System Information Block (SIB) — but only after a long chain of processing that includes detecting the SSB, decoding PBCH for the MIB, using pdcch-ConfigSIB1, locating CORESET#0, monitoring the PDCCH/DCI, and then decoding the PDSCH as shown below. Then is it ready to establish real connectivity and start receiving traffic such as data streams or user applications.

  • Type 'ue' at the prompt to see the status of the UEs and type 'power_on' to start a UE. The above simulation shows 1 UE, and the number of UEs is specified as 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:49084      0      0x1
(mme) ue
            SUPI           IMEISV  CN M-TMSI/5G-TMSI REG           TAC #BEARER IP_ADDR
 001010123456789 0123456700000101 5GC      0xa5fa281   Y 310014.   0x1       1 cosmos-5G/192.168.2.2
(mme)

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

Iperf test

  • Network name space and tunnels for each UE.
    root@sdr2-piradio:~# ip netns list
    ue1 (id: 1)
    root@sdr2-piradio:~# ip netns exec ue1 ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    19: pdn0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500
        link/none
        inet 192.168.2.2/24 scope global pdn0
           valid_lft forever preferred_lft forever
    
    
  • Iperf server on the UE
    root@sdr2-piradio:~# ip netns exec ue1 iperf3 -s -B 192.168.2.2
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    
    
  • Iperf client on the base station
    root@sdr1-piradio:~# iperf3 -c 192.168.2.2 -b 30M -i 1 -u -t 10
    Connecting to host 192.168.2.2, port 5201
    [  5] local 192.168.2.1 port 37967 connected to 192.168.2.2 port 5201
    [ ID] Interval           Transfer     Bitrate         Total Datagrams
    [  5]   0.00-1.00   sec  3.57 MBytes  30.0 Mbits/sec  2588
    [  5]   1.00-2.00   sec  3.58 MBytes  30.0 Mbits/sec  2590
    [  5]   2.00-3.00   sec  3.58 MBytes  30.0 Mbits/sec  2589
    [  5]   3.00-4.00   sec  3.58 MBytes  30.0 Mbits/sec  2590
    [  5]   4.00-5.00   sec  3.58 MBytes  30.0 Mbits/sec  2590
    [  5]   5.00-6.00   sec  3.58 MBytes  30.0 Mbits/sec  2590
    [  5]   6.00-7.00   sec  3.58 MBytes  30.0 Mbits/sec  2590
    [  5]   7.00-8.00   sec  3.58 MBytes  30.0 Mbits/sec  2589
    [  5]   8.00-9.00   sec  3.58 MBytes  30.0 Mbits/sec  2590
    [  5]   9.00-10.00  sec  3.58 MBytes  30.0 Mbits/sec  2590
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
    [  5]   0.00-10.00  sec  35.8 MBytes  30.0 Mbits/sec  0.000 ms  0/25896 (0%)  sender
    [  5]   0.00-10.00  sec  0.00 Bytes  0.00 bits/sec  0.000 ms  0/0 (0%)  receiver
    iperf3: error - the server has terminated
    root@sdr1-piradio:~#
    
  • Comprehensive report of the transmission (UE_ID, SINR, RSRP, mcs, Bitrate) can be obtained by activating the status display on the UE side.
(ue) power_on
(ue) ue
        # UE_ID CL RNTI    RRC_STATE               EMM_STATE #ERAB IP_ADDR
  NR    0     1  0 461b      running              registered     1 192.168.2.2
(ue) t
Press [return] to stop the trace
----------------------Hz---ppm----dB----dBm-----------------------DL---------- ---------------------UL-
UE_ID  RAT CL RNTI   CFO   SRO  SINR   RSRP  mcs retx rxko rxok brate     #its  mcs  ta retx   tx brate
    1   NR 00 461c  -697  -0.5   2.0  -77.2  0.0   15   17   51  376k  1/3.6/5 17.0   6    0    1 14.3k
    1   NR 00 461c  -733  -1.5   1.8  -76.9  0.0  339  358  935  345k  1/3.8/5 15.7   7    4   26 16.8k
    1   NR 00 461c  -750  -2.2   0.3  -77.0  0.0  342  363  908  335k  1/3.8/5 14.2   9    4   21 12.4k
    1   NR 00 461c  -746  -0.8  -2.5  -79.3  0.0  336  357  926  343k  1/3.8/5 14.6  11    5   22 13.2k
    1   NR 00 461c  -855  -1.8   0.2  -77.6  0.0  340  363  906  334k  1/3.8/5 14.6  13    1   24 14.2k
    1   NR 00 461c  -841  -2.1  -1.4  -79.4  0.0  351  369  913  338k  1/3.8/5 15.3  14    5   20 12.5k
    1   NR 00 461c  -848   0.2  -5.2  -81.9  0.0  330  353  916  340k  1/3.8/5 14.3  16    5   25 14.7k
    1   NR 00 461c  -764  -0.2  -0.1  -78.7  0.0  357  372  898  332k  1/3.8/5 14.7  16    7   24 14.9k
    1   NR 00 461c  -743  -0.4   2.5  -77.3  0.0  327  355  906  334k  1/3.8/5 15.0  16    4   27 16.7k
    1   NR 00 461c  -761  -0.5  -2.3  -80.4  0.0  333  363  902  332k  1/3.8/5 14.9  16    3   19 11.3k
----------------------Hz---ppm----dB----dBm-----------------------DL---------- ---------------------UL-

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.