wiki:Tutorials/4G5G/srslte

Version 3 (modified by prasanthi, 3 months ago) ( diff )

srsRAN 5G network in COSMOS SB1

srsRAN is an open-source software radio suite for 4G/5G provided by SRS(Software Radio Systems). The srsRAN suite includes: srsUE - a full-stack SDR 4G/5G UE application srsENB - a full-stack SDR 4G/5G e(g)NodeB application srsEPC - a light-weight 4G core network implementation with MME, HSS and S/P-GW Source code for srsRAN can be found here and documentation can be found here

Description

This tutorial contains instructions for setting up a 4G/5G network in COSMOS SB1.

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 COSMOS server, 1 USRP (N310/X310), node equipped with 5G modems and/or node equipped with 5G phones in COSMOS SB1 domain

Tutorial Setup

Follow the steps below to gain access to the Weeks hall 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 a server srv1-lg1, USRP N310 sdr1-s1-lg1, and sdr2-md1 that has a Waveshare SIM8200-EA and Quectel RM510Q-GL attached over USB.
  5. Load srsran-cosmos.ndz on srv1-lg1
    omf load -i srsran-cosmos.ndz -t srv1-lg1
    
    omf load -i 5G-UE-cosmos.ndz -t sdr2-md1
    
  6. Turn all the required resources on and check the status
    omf tell -a on -t srv1-lg1,sdr2-md1,sdr1-s1-lg1
    
    omf stat -t system:topo:allres
    
  7. ssh to the nodes

Tutorial Execution

Check the USRP

  • Upon logging into srv1-lg1, run the shell script eth_config.sh that sets up appropriate IP addresses for the Ethernet interfaces and network buffer sizes on the server.
    root@srv1-lg1:~# ./eth_config.sh
    net.core.rmem_max = 62500000
    net.core.wmem_max = 62500000
    root@srv1-lg1:~# ifconfig -a
    eno1np0: 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 909  bytes 80670 (80.6 KB)
            RX errors 0  dropped 561  overruns 0  frame 0
            TX packets 193  bytes 16622 (16.6 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eno2np1: 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 827  bytes 82338 (82.3 KB)
            RX errors 0  dropped 562  overruns 0  frame 0
            TX packets 291  bytes 23782 (23.7 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    
  • With the interfaces configured as above, the server should be able to access the SDRs in the domain. Test with
    root@srv1-lg1:~# uhd_find_devices --args="addr=10.38.2.1"
    [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.4.0.HEAD-0-g3cf9529f
    --------------------------------------------------
    -- UHD Device 0
    --------------------------------------------------
    Device Address:
        serial: 3176DF5
        claimed: False
        fpga: XG
        mgmt_addr: 10.38.2.1
        name: ni-n3xx-3176DF5
        product: n310
        type: n3xx
    
    

Setup 5G Core

  • For this tutorial, we use Open5GS Core. All the components of the core are setup to run as systemd services. To reconfigure the services, please refer this guide.
  • Follow the AMF log
    root@srv1-lg1:~# tail -f /var/log/open5gs/amf.log 
    
    Open5GS daemon v2.7.1
    
    04/04 20:47:27.874: [app] INFO: Configuration: '/etc/open5gs/amf.yaml' (../lib/app/ogs-init.c:133)
    04/04 20:47:27.874: [app] INFO: File Logging: '/var/log/open5gs/amf.log' (../lib/app/ogs-init.c:136)
    04/04 20:47:27.877: [metrics] INFO: metrics_server() [http://127.0.0.5]:9090 (../lib/metrics/prometheus/context.c:299)
    04/04 20:47:27.877: [sbi] INFO: NF Service [namf-comm] (../lib/sbi/context.c:1841)
    04/04 20:47:27.877: [sbi] INFO: nghttp2_server() [http://127.0.0.5]:7777 (../lib/sbi/nghttp2-server.c:414)
    04/04 20:47:27.908: [amf] INFO: ngap_server() [127.0.0.5]:38412 (../src/amf/ngap-sctp.c:61)
    04/04 20:47:27.908: [sctp] INFO: AMF initialize...done (../src/amf/app.c:33)
    
    

Run srsran gNB

  • Run the gnb application in band n41 at 20MHz with 1T1R.
    root@srv1-lg1:~# gnb -c ~/srsRAN_Project/configs/gnb_rf_n310_tdd_n41_20mhz.yml
    
    --== srsRAN gNB (commit 40b17b429) ==--
    
    
    The PRACH detector will not meet the performance requirements with the configuration {Format B4, ZCZ 0, SCS 30kHz, Rx ports 1}.
    Lower PHY in quad executor mode.
    N2: Connection to AMF on 127.0.0.5:38412 completed
    Cell pci=1, bw=20 MHz, 1T1R, dl_arfcn=518670 (n41), dl_freq=2593.35 MHz, dl_ssb_arfcn=517710, ul_freq=2593.35 MHz
    
    Available radio types: uhd and zmq.
    [INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.4.0.HEAD-0-g3cf9529f
    [INFO] [LOGGING] Fastpath logging disabled at runtime.
    Making USRP object with args 'type=n3xx,addr=10.39.3.1,master_clock_rate=122.88e6,send_frame_size=8000,recv_frame_size=8000'
    [INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=10.39.3.1,type=n3xx,product=n310,serial=3196937,name=ni-n3xx-3196937,fpga=XG,claimed=False,addr=10.39.3.1,master_clock_rate=122.88e6,send_frame_size=8000,recv_frame_size=8000
    [INFO] [MPM.PeriphManager] init() called with device args `fpga=XG,master_clock_rate=122.88e6,mgmt_addr=10.39.3.1,name=ni-n3xx-3196937,product=n310,recv_frame_size=8000,send_frame_size=8000,clock_source=internal,time_source=internal'.
    [WARNING] [0/Radio#0] Attempting to set tick rate to 0. Skipping.
    ==== gNB started ===
    Type <h> to view help
    
    
  • In the AMF log, you should see the gNB connected to the core
    04/04 21:22:32.078: [amf] INFO: gNB-N2 accepted[127.0.0.1]:52741 in ng-path module (../src/amf/ngap-sctp.c:113)
    04/04 21:22:32.079: [amf] INFO: gNB-N2 accepted[127.0.0.1] in master_sm module (../src/amf/amf-sm.c:757)
    04/04 21:22:32.090: [amf] INFO: [Added] Number of gNBs is now 1 (../src/amf/context.c:1236)
    
    

UEs

  • As the base station runs, the modems can be seen registering at the AMF
    04/04 21:31:17.641: [gmm] INFO: [imsi-310014000000011] Registration complete (../src/amf/gmm-sm.c:2313)
    04/04 21:31:17.641: [amf] INFO: [imsi-310014000000011] Configuration update command (../src/amf/nas-path.c:591)
    
    
    04/04 21:31:18.189: [gmm] INFO: [imsi-310014000000013] Registration complete (../src/amf/gmm-sm.c:2313)
    04/04 21:31:18.189: [amf] INFO: [imsi-310014000000013] Configuration update command (../src/amf/nas-path.c:591)
    
  • Run connection manager scripts on sdr2-md1 for the modems to establish PDU sessions

Throughput test

Note: See TracWiki for help on using the wiki.